From a768213b3c64390aee4a2ebcef33eca259d33944 Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Wed, 21 Dec 2011 17:24:16 +0000 Subject: [PATCH] // Fix some problems with multishipping --- classes/Cart.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/classes/Cart.php b/classes/Cart.php index 6f7beba10..12334fe05 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -1927,6 +1927,17 @@ class CartCore extends ObjectModel return; } + $delivery_option_list = $this->getDeliveryOptionList(null , true); + + foreach ($delivery_option_list as $id_address => $options) + if (!isset($delivery_option[$id_address])) + foreach ($options as $key => $option) + if ($option['is_best_price']) + { + $delivery_option[$id_address] = $key; + break; + } + if (count($delivery_option) == 1) $this->id_carrier = $this->getIdCarrierFromDeliveryOption($delivery_option); @@ -2909,6 +2920,7 @@ class CartCore extends ObjectModel AND id_address_delivery = '.(int)$new_id_address_delivery; Db::getInstance()->execute($sql); } + return true; }