change the menu Magento -
i have tab name "product" in menu , when mouseover , show me categories . want show me products of category .
i new magento there widget can use or have write custom code . try link
http://www.magentocommerce.com/boards/viewthread/21707/
but don't have navigation folder @ path app/design/frontend/default/default/template/catalog/navigation/top.phtml
try following code display products specific category -
$_category = mage::getmodel('catalog/category')->load($catid); $_productcollection =mage::getresourcemodel('catalog/product_collection')->addcategoryfilter($_category)->setorder('updated_at', 'desc'); foreach ($_productcollection $_product) { $cur_product = mage::getmodel('catalog/product')->load($_product->getid()); echo '<li><span>» </span><a href="'.$cur_product->geturl_key().'" title="'.$cur_product->getextname().'"> '.$cur_product->getextname().'</a></li>'; }
$catid - need pass category id here
Comments
Post a Comment