I've built a new block that displays products placed in a specific category (chosen via ID) and renders them out with some fancy jQuery. Now to test this I passed a id of 17, a category with plenty of products 10+. All works fine, products are found and rendered out propperly.
If i however pass it the id for a root category (I have called featured products) that has 6 products in, it fails to work.
<!-- Global Variables --> <?php $category = Mage::getModel('catalog/category'); ?> <?php $_helper = $this->helper('catalog/output'); ?> <?php $featured_category = Mage::getModel('catalog/category')->load(17); $products = Mage::getModel('catalog/product') ->getCollection() ->addCategoryFilter($featured_category) ->addAttributeToSelect("*") ->load(); ?> <ul> <?php $counter = 0; ?> <?php foreach($products as $_item): ?>
Is there anything major I've done wrong that would stop this from working in a root category but not a sub category?