[-] 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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user