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

This commit is contained in:
mDeflotte
2012-03-14 13:40:39 +00:00
parent 9ad21b51d4
commit b91e211440
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;
}