[-] FO : improvements with OPC, Cart Rules and refresh #PSCFV-377 #PSCFV-2196
This commit is contained in:
@@ -175,7 +175,8 @@ class FrontControllerCore extends Controller
|
|||||||
$this->context->customer->logout();
|
$this->context->customer->logout();
|
||||||
|
|
||||||
// Login information have changed, so we check if the cart rules still apply
|
// Login information have changed, so we check if the cart rules still apply
|
||||||
CartRule::autoRemoveFromCart();
|
CartRule::autoRemoveFromCart($this->context);
|
||||||
|
CartRule::autoAddToCart($this->context);
|
||||||
|
|
||||||
Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null);
|
Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -323,7 +323,8 @@ class AuthControllerCore extends FrontController
|
|||||||
Hook::exec('actionAuthentication');
|
Hook::exec('actionAuthentication');
|
||||||
|
|
||||||
// Login information have changed, so we check if the cart rules still apply
|
// Login information have changed, so we check if the cart rules still apply
|
||||||
CartRule::autoRemoveFromCart();
|
CartRule::autoRemoveFromCart($this->context);
|
||||||
|
CartRule::autoAddToCart($this->context);
|
||||||
|
|
||||||
if (!$this->ajax)
|
if (!$this->ajax)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -242,7 +242,8 @@ class ParentOrderControllerCore extends FrontController
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Carrier has changed, so we check if the cart rules still apply
|
// Carrier has changed, so we check if the cart rules still apply
|
||||||
CartRule::autoRemoveFromCart();
|
CartRule::autoRemoveFromCart($this->context);
|
||||||
|
CartRule::autoAddToCart($this->context);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -373,7 +374,8 @@ class ParentOrderControllerCore extends FrontController
|
|||||||
$this->context->cart->update();
|
$this->context->cart->update();
|
||||||
|
|
||||||
// Address has changed, so we check if the cart rules still apply
|
// Address has changed, so we check if the cart rules still apply
|
||||||
CartRule::autoRemoveFromCart();
|
CartRule::autoRemoveFromCart($this->context);
|
||||||
|
CartRule::autoAddToCart($this->context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If delivery address is valid in cart, assign it to Smarty */
|
/* If delivery address is valid in cart, assign it to Smarty */
|
||||||
|
|||||||
@@ -578,6 +578,9 @@ function updateCartSummary(json)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if ($('.cart_discount').length == 0)
|
||||||
|
location.reload();
|
||||||
|
|
||||||
if (priceDisplayMethod != 0)
|
if (priceDisplayMethod != 0)
|
||||||
$('#total_discount').html(formatCurrency(json.total_discounts_tax_exc, currencyFormat, currencySign, currencyBlank));
|
$('#total_discount').html(formatCurrency(json.total_discounts_tax_exc, currencyFormat, currencySign, currencyBlank));
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user