Skip to content

Commit 1acd06f

Browse files
mdykasgelanivishal
authored andcommitted
issue/14056 - Coupon API not working for guest user
1 parent f947cad commit 1acd06f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ public function set($cartId, $couponCode)
5555
if (!$quote->getItemsCount()) {
5656
throw new NoSuchEntityException(__('The "%1" Cart doesn\'t contain products.', $cartId));
5757
}
58+
if (!$quote->getStoreId()) {
59+
throw new NoSuchEntityException(__('Cart isn\'t assigned to correct store'));
60+
}
5861
$quote->getShippingAddress()->setCollectShippingRates(true);
5962

6063
try {

0 commit comments

Comments
 (0)