This snippet works fine except that it returns a different set of product collection, mainly due to
is anchor attribute:
$category = Mage::getModel('catalog/category')->load(1371); $collection = Mage::getModel('catalog/product') ->getCollection() ->addCategoryFilter($category);
The snippet above returns the complete products including the child category products. However, when running through cron, it returns only a small amount of items. I could simulate what the cron is getting by defining:
I want to get the collection that includes the sub category products. How can I achieve this?