Skip to content

Commit 1091a30

Browse files
#26107: Exception message on cart with no shipment items
1 parent 1e8bbc6 commit 1091a30

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/code/Magento/Quote/Model/ShippingAddressManagement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $addres
8888
$quote = $this->quoteRepository->getActive($cartId);
8989
if ($quote->isVirtual()) {
9090
throw new NoSuchEntityException(
91-
__('The Cart includes virtual product(s) only, so a shipping address is not used.')
91+
__('Shipping address is not allowed on cart: cart contains no items for shipment.')
9292
);
9393
}
9494

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingAddressOnCartTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function testSetNewShippingAddressOnCartWithSimpleProduct()
149149
public function testSetNewShippingAddressOnCartWithVirtualProduct()
150150
{
151151
$this->expectException(\Exception::class);
152-
$this->expectExceptionMessage('The Cart includes virtual product(s) only, so a shipping address is not used.');
152+
$this->expectExceptionMessage('Shipping address is not allowed on cart: cart contains no items for shipment.');
153153

154154
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');
155155

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetShippingAddressOnCartTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function testSetNewShippingAddressOnCartWithSimpleProduct()
9797
public function testSetNewShippingAddressOnCartWithVirtualProduct()
9898
{
9999
$this->expectException(\Exception::class);
100-
$this->expectExceptionMessage('The Cart includes virtual product(s) only, so a shipping address is not used.');
100+
$this->expectExceptionMessage('Shipping address is not allowed on cart: cart contains no items for shipment.');
101101

102102
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');
103103

0 commit comments

Comments
 (0)