简体   繁体   中英

Show product dropdown list in magento

Not sure if this is a theme/design question or programming question?

I am using magento 1.9.x

I have list of categories and products added under it. I am trying to design a drop-down menu for the left side category menu. But don't know how to achieve it.

My structure is like this Root-category -> product-category -> Products

Yes its possible. There could be many solution:

Sol 1: You can enable path hints and get the file path of the navigation menu

Sol 2: You can download an extension or mega menu extension for this. Search it up. http://www.magestore.com/magento-mega-menu-extension.html?gclid=CjwKEAjwgPe4BRCB66GG8PO69QkSJAC4EhHh8XuIMd__e6R66jukVa4MyGsCPHP4om9GE9Tz0WptzhoCylbw_wcB#menu-templates

Sol 3: You can write your custom code into the below file

.../template/catalog/navigation/top.phtml



<?php
$products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
?>
<ul id="nav">
        <?php echo $_menu ?>
  <li>
      <ul>
        <?php 
foreach ($products as $_product) { ?>
   <li><?php echo $_product->getName(); ?></li>
<?php } ?>
</ul>
</li>
</ul>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM