[-] Core : If a specific price is applied to a combination the combination impact is no longer applied
This commit is contained in:
+7
-4
@@ -2488,11 +2488,14 @@ class ProductCore extends ObjectModel
|
|||||||
// convert only if the specific price is in the default currency (id_currency = 0)
|
// 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']))
|
if (!$specific_price || !($specific_price['price'] > 0 && $specific_price['id_currency']))
|
||||||
$price = Tools::convertPrice($price, $id_currency);
|
$price = Tools::convertPrice($price, $id_currency);
|
||||||
|
|
||||||
// Attribute price
|
// Attribute price
|
||||||
$attribute_price = Tools::convertPrice(array_key_exists('attribute_price', $result) ? (float)$result['attribute_price'] : 0, $id_currency);
|
if (!$specific_price || !$specific_price['id_product_attribute'])
|
||||||
if ($id_product_attribute !== false) // If you want the default combination, please use NULL value instead
|
{
|
||||||
$price += $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;
|
||||||
|
}
|
||||||
|
|
||||||
// Tax
|
// Tax
|
||||||
$address = new Address();
|
$address = new Address();
|
||||||
|
|||||||
Reference in New Issue
Block a user