From 25f3f74ee36b2ca445ee1431b2078373b70d98d5 Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Fri, 16 Mar 2012 10:19:21 +0000 Subject: [PATCH] [-] FO : #PSFV-660 - Fix bug with multishipping proposed whereas de multishipping is disable git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14214 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Cart.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/Cart.php b/classes/Cart.php index 0dd27c2b6..adbb0b8ec 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -771,7 +771,9 @@ class CartCore extends ObjectModel if (Context::getContext()->customer->id) { - if ($id_address_delivery == 0) // The $id_address_delivery is null, get the default customer address + if ($id_address_delivery == 0 && (int)$this->id_address_delivery) // The $id_address_delivery is null, use the cart delivery address + $id_address_delivery = $this->id_address_delivery; + elseif ($id_address_delivery == 0) // The $id_address_delivery is null, get the default customer address $id_address_delivery = (int)Address::getFirstCustomerAddressId((int)Context::getContext()->customer->id); elseif (!Customer::customerHasAddress(Context::getContext()->customer->id, $id_address_delivery)) // The $id_address_delivery must be linked with customer $id_address_delivery = 0;