diff --git a/controllers/front/AddressController.php b/controllers/front/AddressController.php index 8449dffc3..b079e21ea 100644 --- a/controllers/front/AddressController.php +++ b/controllers/front/AddressController.php @@ -210,6 +210,8 @@ class AddressControllerCore extends FrontController // Update id address of the current cart if necessary if (isset($address_old) && $address_old->isUsed()) $this->context->cart->updateAddressId($address_old->id, $address->id); + else // Update cart address + $this->context->cart->autosetProductAddress(); if ($this->ajax) { diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php index d3181d6c6..eed158a60 100644 --- a/controllers/front/AuthController.php +++ b/controllers/front/AuthController.php @@ -558,6 +558,10 @@ class AuthControllerCore extends FrontController // If a logged guest logs in as a customer, the cart secure key was already set and needs to be updated $this->context->cart->update(); + + // Avoid articles without delivery address on the cart + $this->context->cart->autosetProductAddress(); + Hook::exec('actionCustomerAccountAdd', array( '_POST' => $_POST, 'newCustomer' => $customer