diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php index 942c5a8afcf..db14c317071 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php @@ -1233,19 +1233,15 @@ public function getChildrenAmount($category, $isActiveFlag = true) /** * Get products count in category - * - * @param Mage_Catalog_Model_Category $category - * @return int */ - public function getProductCount($category) + public function getProductCount(Mage_Catalog_Model_Category $category): int { $select = $this->_getReadAdapter()->select() ->from( $this->getTable('catalog/category_product'), "COUNT({$this->getTable('catalog/category_product')}.product_id)", ) - ->where("{$this->getTable('catalog/category_product')}.category_id = ?", $category->getId()) - ->group("{$this->getTable('catalog/category_product')}.category_id"); + ->where("{$this->getTable('catalog/category_product')}.category_id = ?", $category->getId()); return (int) $this->_getReadAdapter()->fetchOne($select); }