From 78ec4a1883aef2c4da7297e7d8a013a0bad66dc0 Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Wed, 4 Jul 2012 08:35:41 +0000 Subject: [PATCH] [-] FO : #PSCFV-3014 - On account creation, address delivery of all cart products must be set with the user address --- controllers/front/AddressController.php | 2 ++ controllers/front/AuthController.php | 4 ++++ 2 files changed, 6 insertions(+) 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