[-] FO: Fix #PSCFV-5052 update the cart rules in the cart when the address is changed
This commit is contained in:
1 parent
c374380a92
commit
0d141e204c
1 file changed
+4
@@ -270,6 +270,10 @@ class OrderControllerCore extends ParentOrderController
|
|||||||
{
|
{
|
||||||
$this->context->cart->id_address_delivery = (int)Tools::getValue('id_address_delivery');
|
$this->context->cart->id_address_delivery = (int)Tools::getValue('id_address_delivery');
|
||||||
$this->context->cart->id_address_invoice = Tools::isSubmit('same') ? $this->context->cart->id_address_delivery : (int)Tools::getValue('id_address_invoice');
|
$this->context->cart->id_address_invoice = Tools::isSubmit('same') ? $this->context->cart->id_address_delivery : (int)Tools::getValue('id_address_invoice');
|
||||||
|
|
||||||
|
CartRule::autoRemoveFromCart($this->context);
|
||||||
|
CartRule::autoAddToCart($this->context);
|
||||||
|
|
||||||
if (!$this->context->cart->update())
|
if (!$this->context->cart->update())
|
||||||
$this->errors[] = Tools::displayError('An error occurred while updating your cart.');
|
$this->errors[] = Tools::displayError('An error occurred while updating your cart.');
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user