Category Product Collection

Updated . Posted . Visible to the public.

This snippet provides a collection of products within a category

$cat = Mage::getModel('catalog/category')->load(1);

$coll = Mage::getResourceModel('catalog/product_collection');
$coll->addCategoryFilter($cat);

Mike Whitby
Last edit
Posted by Mike Whitby to Magento (2012-04-23 11:09)