Skip to content

Commit

Permalink
issue/14056 - Coupon API not working for guest user
Browse files Browse the repository at this point in the history
  • Loading branch information
mdykas authored and gelanivishal committed Jul 5, 2018
1 parent f947cad commit 1acd06f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/code/Magento/Quote/Model/CouponManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public function set($cartId, $couponCode)
if (!$quote->getItemsCount()) {
throw new NoSuchEntityException(__('The "%1" Cart doesn\'t contain products.', $cartId));
}
if (!$quote->getStoreId()) {
throw new NoSuchEntityException(__('Cart isn\'t assigned to correct store'));
}
$quote->getShippingAddress()->setCollectShippingRates(true);

try {
Expand Down

0 comments on commit 1acd06f

Please sign in to comment.