[-] BO : fixed gift deletion when there is no products anymore in the cart

This commit is contained in:
Damien Metzger
2013-05-16 11:03:21 +02:00
parent da15136c67
commit 21d45b61bd
2 changed files with 14 additions and 8 deletions
+2 -6
View File
@@ -2958,12 +2958,8 @@ class CartCore extends ObjectModel
return false;
foreach ($this->getProducts() as $product)
if (!$product['active']
|| (
!$product['allow_oosp'] && $product['stock_quantity'] < $product['cart_quantity']
)
|| !$product['available_for_order'])
if (!$product['active'] || !$product['available_for_order']
|| (!$product['allow_oosp'] && $product['stock_quantity'] < $product['cart_quantity']))
return false;
return true;