// fixed bug on category count

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10944 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
sThiebaut
2011-12-05 16:52:27 +00:00
parent 1fc3cdf043
commit 30de26176b
+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);
}