From 3fd4003c369eac2e81beb89b9762beb746b53762 Mon Sep 17 00:00:00 2001 From: rGaillard Date: Thu, 8 Mar 2012 10:22:37 +0000 Subject: [PATCH] [-] Core : If a specific price is applied to a combination the combination impact is no longer applied git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13959 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Product.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/classes/Product.php b/classes/Product.php index 1242f17b7..a398c06ec 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -2488,11 +2488,14 @@ class ProductCore extends ObjectModel // convert only if the specific price is in the default currency (id_currency = 0) if (!$specific_price || !($specific_price['price'] > 0 && $specific_price['id_currency'])) $price = Tools::convertPrice($price, $id_currency); - + // Attribute price - $attribute_price = Tools::convertPrice(array_key_exists('attribute_price', $result) ? (float)$result['attribute_price'] : 0, $id_currency); - if ($id_product_attribute !== false) // If you want the default combination, please use NULL value instead - $price += $attribute_price; + if (!$specific_price || !$specific_price['id_product_attribute']) + { + $attribute_price = Tools::convertPrice(array_key_exists('attribute_price', $result) ? (float)$result['attribute_price'] : 0, $id_currency); + if ($id_product_attribute !== false) // If you want the default combination, please use NULL value instead + $price += $attribute_price; + } // Tax $address = new Address();