// fixed bug on category count

This commit is contained in:
sThiebaut
2011-12-05 16:52:27 +00:00
parent 11a180175c
commit da881e8e17
+1 -2
View File
@@ -594,8 +594,7 @@ class CategoryCore extends ObjectModel
LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON p.`id_product` = cp.`id_product`
WHERE cp.`id_category` = '.(int)$this->id.
($active ? ' AND p.`active` = 1' : '').
($id_supplier ? 'AND p.id_supplier = '.(int)$id_supplier : '').
' GROUP BY p.id_product';
($id_supplier ? 'AND p.id_supplier = '.(int)$id_supplier : '');
return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
}