From e5b665deb75a440019794eaced47df85941c3649 Mon Sep 17 00:00:00 2001 From: dMetzger Date: Thu, 12 Apr 2012 09:31:53 +0000 Subject: [PATCH] [-] 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 --- classes/CartRule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/CartRule.php b/classes/CartRule.php index d372bfd5d..16594ecfd 100644 --- a/classes/CartRule.php +++ b/classes/CartRule.php @@ -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