0
votes

I have a tab name "Product" in menu , when I mouseover it , its show me all the categories . What i want that it also show me all the products of the category .

I am new to Magento is there any widget which I can use or i have to write the custom code . try this link

http://www.magentocommerce.com/boards/viewthread/21707/

But I don't have navigation folder at this path app/design/frontend/default/default/template/catalog/navigation/top.phtml

1

1 Answers

0
votes

Try following code to display the products from specific category -

$_category = Mage::getModel('catalog/category')->load($catId); 
$_productCollection =Mage::getResourceModel('catalog/product_collection')->addCategoryFilter($_category)->setOrder('updated_at', 'DESC');

foreach ($_productCollection AS $_product)
{
    $cur_product = Mage::getModel('catalog/product')->load($_product->getId()); 
    echo '<li><span>&raquo </span><a href="'.$cur_product->getUrl_key().'" title="'.$cur_product->getExtName().'"> '.$cur_product->getExtName().'</a></li>';  
}

$catId - you need to pass it category id here