[-] FO: Fix #PSCFV-5052 update the cart rules in the cart when the address is changed
This commit is contained in:
@@ -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_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())
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating your cart.');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user