Magento get products from a specific category
Posted on: September 29, 2010 /
Categories: Magento
Next code is a sample to extract all products from a specific category:
$prodCat = Mage::getModel('catalog/category')->load($catId);
$prodCat = $prodCat->getProductCollection();
foreach( $prodCat->getAllIds() as $prodId)
{
$_product=Mage::getModel('catalog/product')->load($prodId);
print $_product->getName()."
";
}