[-] 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
This commit is contained in:
+3
-3
@@ -470,10 +470,11 @@ class CartCore extends ObjectModel
|
|||||||
if (Customization::isFeatureActive())
|
if (Customization::isFeatureActive())
|
||||||
{
|
{
|
||||||
$sql->select('cu.`id_customization`, cu.`quantity` AS customization_quantity');
|
$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
|
else
|
||||||
$sql->select('0 AS customization_quantity');
|
$sql->select('0 AS customization_quantity, 0 AS id_customization');
|
||||||
|
|
||||||
if (Combination::isFeatureActive())
|
if (Combination::isFeatureActive())
|
||||||
{
|
{
|
||||||
@@ -498,7 +499,6 @@ class CartCore extends ObjectModel
|
|||||||
'p.`reference` AS reference, p.`supplier_reference` AS supplier_reference, p.`ean13`,
|
'p.`reference` AS reference, p.`supplier_reference` AS supplier_reference, p.`ean13`,
|
||||||
p.`upc` AS upc, product_shop.`minimal_quantity` AS minimal_quantity'
|
p.`upc` AS upc, product_shop.`minimal_quantity` AS minimal_quantity'
|
||||||
);
|
);
|
||||||
|
|
||||||
$result = Db::getInstance()->executeS($sql);
|
$result = Db::getInstance()->executeS($sql);
|
||||||
|
|
||||||
// Reset the cache before the following return, or else an empty cart will add dozens of queries
|
// Reset the cache before the following return, or else an empty cart will add dozens of queries
|
||||||
|
|||||||
Reference in New Issue
Block a user