From 7a2eeea33f447c5bbcd09742bb522e3c4aa43e05 Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Fri, 6 Jul 2012 07:40:32 +0000 Subject: [PATCH] [-] FO : #PSCFV-3016 - Fix bug on removing quantity of a product with a customisation git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16253 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Cart.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/Cart.php b/classes/Cart.php index 0f13cf670..4278ef83e 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -470,10 +470,11 @@ class CartCore extends ObjectModel if (Customization::isFeatureActive()) { $sql->select('cu.`id_customization`, cu.`quantity` AS customization_quantity'); - $sql->leftJoin('customization', 'cu', 'p.`id_product` = cu.`id_product`'); + $sql->leftJoin('customization', 'cu', + 'p.`id_product` = cu.`id_product` AND cp.`id_product_attribute` = cu.id_product_attribute'); } else - $sql->select('0 AS customization_quantity'); + $sql->select('0 AS customization_quantity, 0 AS id_customization'); if (Combination::isFeatureActive()) { @@ -498,7 +499,6 @@ class CartCore extends ObjectModel 'p.`reference` AS reference, p.`supplier_reference` AS supplier_reference, p.`ean13`, p.`upc` AS upc, product_shop.`minimal_quantity` AS minimal_quantity' ); - $result = Db::getInstance()->executeS($sql); // Reset the cache before the following return, or else an empty cart will add dozens of queries