The following code returns all products from within a certain category in a collection.
1 2 3 |
// category id = 5 // addAttributeToSelect is optional $products = Mage::getModel('catalog/category')->load(5)->getProductCollection()->addAttributeToSelect('*'); |
Getting products from a category
You want or need help implementing this solution? Maybe you did not find what you were looking for? Contact me and I will assist you with whatever Magento problem troubles you!