[-] BO : #PSCFV-3192 - Product::getAttributeGroups return duplicated attributes
// Fix little bug
This commit is contained in:
1 parent
4c6689a4ea
commit
a78960283f
1 file changed
+2
-1
+2
-1
@@ -2481,7 +2481,7 @@ class ProductCore extends ObjectModel
|
|||||||
if (is_array($result) && (!$specific_price || !$specific_price['id_product_attribute']))
|
if (is_array($result) && (!$specific_price || !$specific_price['id_product_attribute']))
|
||||||
{
|
{
|
||||||
$attribute_price = Tools::convertPrice($result['attribute_price'] !== null ? (float)$result['attribute_price'] : 0, $id_currency);
|
$attribute_price = Tools::convertPrice($result['attribute_price'] !== null ? (float)$result['attribute_price'] : 0, $id_currency);
|
||||||
if ($id_product_attribute !== false) // If you want the default combination, please use NULL value instead
|
if ($id_product_attribute !== false && !is_null($id_product_attribute)) // If you want the default combination, please use NULL value instead
|
||||||
$price += $attribute_price;
|
$price += $attribute_price;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2847,6 +2847,7 @@ class ProductCore extends ObjectModel
|
|||||||
WHERE pa.`id_product` = '.(int)$this->id.'
|
WHERE pa.`id_product` = '.(int)$this->id.'
|
||||||
AND al.`id_lang` = '.(int)$id_lang.'
|
AND al.`id_lang` = '.(int)$id_lang.'
|
||||||
AND agl.`id_lang` = '.(int)$id_lang.'
|
AND agl.`id_lang` = '.(int)$id_lang.'
|
||||||
|
GROUP BY a.id_attribute
|
||||||
ORDER BY ag.`position` ASC, a.`position` ASC';
|
ORDER BY ag.`position` ASC, a.`position` ASC';
|
||||||
return Db::getInstance()->executeS($sql);
|
return Db::getInstance()->executeS($sql);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user