[-] FO : fixed bug where you couldn't get a free product with a cart rule if you already had the same product in your cart #PSTEST-1063

This commit is contained in:
dMetzger
2012-04-12 09:31:53 +00:00
parent c570fa0e24
commit e5b665deb7
+1 -1
View File
@@ -500,7 +500,7 @@ class CartRuleCore extends ObjectModel
$cartTotal += $context->cart->getOrderTotal($this->minimum_amount_tax, Cart::ONLY_SHIPPING);
// If a product is given for free in this rule and already in the cart, the price is subtracted
if ($this->gift_product)
if ($this->gift_product && $alreadyInCart)
{
$in_cart = (bool)Db::getInstance()->getValue('
SELECT id_product