From 43d0a4dee2faae32e236ddd347a19c543f61ce8b Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Tue, 6 Mar 2012 14:29:00 +0000 Subject: [PATCH] // Fix bug with address changing and multi-address on opc git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13892 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Cart.php | 2 +- controllers/front/OrderOpcController.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/Cart.php b/classes/Cart.php index 250654629..c40296c81 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -3012,7 +3012,7 @@ class CartCore extends ObjectModel )'; Db::getInstance()->execute($sql); - // upgradng address delivery + // Upgrading address delivery $sql = 'UPDATE `'._DB_PREFIX_.'cart_product` SET `id_address_delivery` = ( diff --git a/controllers/front/OrderOpcController.php b/controllers/front/OrderOpcController.php index 0e2baa77d..aac8c7b46 100644 --- a/controllers/front/OrderOpcController.php +++ b/controllers/front/OrderOpcController.php @@ -189,6 +189,9 @@ class OrderOpcControllerCore extends ParentOrderController $this->context->cart->id_address_invoice = Tools::isSubmit('same') ? $this->context->cart->id_address_delivery : (int)(Tools::getValue('id_address_invoice')); if (!$this->context->cart->update()) $this->errors[] = Tools::displayError('An error occurred while updating your cart.'); + + if (!$this->context->cart->isMultiAddressDelivery()) + $this->context->cart->setNoMultishipping(); // As the cart is no multishipping, set each delivery address lines with the main delivery address if (!count($this->errors)) {