Skip to content

Commit

Permalink
Merge pull request #292 from fyndiq/clear-cart
Browse files Browse the repository at this point in the history
Clear cart when abandoned
  • Loading branch information
aquilax committed Nov 6, 2015
2 parents 827dba3 + 4f2b554 commit 06116b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/backoffice/models/FmOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ public function create($fyndiqOrder, $importState, $taxAddressType)
$numArticle = (int)$newRow->quantity;
$result = $cart->updateQty($numArticle, $newRow->productId, $newRow->combinationId);
if (!$result) {
$cart->delete();
throw new PrestaShopException(
sprintf(FyndiqTranslation::get(
'Error adding product with SKU: `%s` (%s-%s) to cart. Possible reasons: not for sale or not enough stock left'
Expand Down

0 comments on commit 06116b2

Please sign in to comment.