Showing posts with label Display product count in Magento. Show all posts
Showing posts with label Display product count in Magento. Show all posts

Sunday, 13 April 2014

How to Get category products count in magento


How to Get category products count in magento

$products = Mage::getModel('catalog/category')->load($_category->getId())
->getProductCollection()
->addAttributeToSelect('entity_id')
->addAttributeToFilter('status', 1)
->addAttributeToFilter('visibility', 4);
echo $products->count();