// Fix product visibility on Product::getAccessories and ProductSale::getBestSales #PSCFV-9760
This commit is contained in:
+2
-1
@@ -3160,8 +3160,9 @@ class ProductCore extends ObjectModel
|
||||
LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (p.`id_manufacturer`= m.`id_manufacturer`)
|
||||
'.Product::sqlStock('p', 0).'
|
||||
WHERE `id_product_1` = '.(int)$this->id.
|
||||
($active ? ' AND product_shop.`active` = 1' : '').'
|
||||
($active ? ' AND product_shop.`active` = 1 AND product_shop.`visibility` != \'none\'' : '').'
|
||||
GROUP BY product_shop.id_product';
|
||||
|
||||
if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql))
|
||||
return false;
|
||||
foreach ($result as &$row)
|
||||
|
||||
Reference in New Issue
Block a user