From 21e4d3f45a1c9890a19cabade696c1efd7b2105a 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 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14597 b9a71923-0436-4b27-9f14-aed3839534dd --- 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