// Fix product visibility on Product::getAccessories and ProductSale::getBestSales #PSCFV-9760

This commit is contained in:
Rémi Gaillard
2013-10-01 09:56:26 +02:00
parent 4a66bdcdf9
commit ecb4ccfdda
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -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)