// Code cleaning and small fixes

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15524 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dMetzger
2012-05-21 15:17:21 +00:00
parent d422dae42a
commit 1d3126f99d
2 changed files with 9 additions and 9 deletions
+6 -2
View File
@@ -882,10 +882,14 @@ class CartRuleCore extends ObjectModel
if ($product['id_product'] == $this->gift_product && $product['id_product_attribute'] == $this->gift_product_attribute)
{
// The free gift coupon must be applied to one product only (needed for multi-shipping which manage multiple product lists)
if (!isset(CartRule::$only_one_gift[$this->id.'-'.$this->gift_product]) || CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == $id_address)
if (!isset(CartRule::$only_one_gift[$this->id.'-'.$this->gift_product])
|| CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == $id_address
|| CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == 0
|| $id_address == 0)
{
$reduction_value += ($useTax ? $product['price_wt'] : $product['price']);
CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] = $id_address;
if (!isset(CartRule::$only_one_gift[$this->id.'-'.$this->gift_product]) || CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == 0)
CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] = $id_address;
}
}
}