[-] FO : Cart rules local cache wasn't cleaned correctly #PSCFV-91

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14992 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dMetzger
2012-05-02 09:35:04 +00:00
parent f65bb22580
commit 216961588b
+9 -3
View File
@@ -752,8 +752,11 @@ class CartCore extends ObjectModel
'id_cart' => (int)$this->id
)))
return false;
Cache::clean('Cart::getCartRules'.$this->id);
Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_ALL);
Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_SHIPPING);
Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_REDUCTION);
Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_GIFT);
if ((int)$cartRule->gift_product)
$this->updateQty(1, $cartRule->gift_product, $cartRule->gift_product_attribute, false, 0, 'up', null, false);
@@ -1072,7 +1075,10 @@ class CartCore extends ObjectModel
public function removeCartRule($id_cart_rule)
{
Cache::clean('Cart::getCartRules'.$this->id);
Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_ALL);
Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_SHIPPING);
Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_REDUCTION);
Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_GIFT);
$result = Db::getInstance()->execute('
DELETE FROM `'._DB_PREFIX_.'cart_cart_rule`