[-] FO : #PSTEST-990 - Fix bug with bad ajax return on adding product to the cart with a new cart reduction applyed

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14150 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-03-14 13:40:39 +00:00
parent fa77f2cddc
commit 72917cad5c
6 changed files with 111 additions and 52 deletions
+3 -3
View File
@@ -114,7 +114,7 @@ class CartControllerCore extends FrontController
}
}
$removed = CartRule::autoRemoveFromCart();
if (count($removed))
if (count($removed) && (int)Tools::getValue('allow_refresh'))
$this->ajax_refresh = true;
}
@@ -232,14 +232,14 @@ class CartControllerCore extends FrontController
else
{
$cart_rules2 = $this->context->cart->getCartRules();
if (count($cart_rules2) != count($cart_rules))
if (count($cart_rules2) != count($cart_rules) && (int)Tools::getValue('allow_refresh'))
$this->ajax_refresh = true;
}
}
}
$removed = CartRule::autoRemoveFromCart();
if (count($removed))
if (count($removed) && (int)Tools::getValue('allow_refresh'))
$this->ajax_refresh = true;
}