Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Drop Down Menu Showing All Products. Place anywhere you like. 
 
g17owner
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2012-03-27
New Jersey
 

Check this out. I basically created a drop down menu that can be placed anywhere in your template. It shows ALL products in a drop down menu and when you select one, takes you to that product.

I am using magento 1.7.0.2 and it works flawlessly. Dont know what other versions it works with.

If you want to see it in action, look towards the bottom of any page of my site.
[url=http://www.lightsnholsters.com/]http://www.lightsnholsters.com/[/url]

<?php $_items $this->getCollection()->setOrder('name','ASC'); // this is how i set the drop down list to alphabetize ?>
<div id="product-select">
  <
table id="product-menu">
    <
tr>
      <
th><label for="prod_sel">Choose Product: </label>
      </
th>
      <
td><select name="prod_sel" id="prod_sel" onchange="redirectMe(this);">
          <
option value="Select a Product"Quick jump to any of our <?php echo count($_items); ?> products by selecting from this menu</option>
          
<?php foreach ($_items as $_item{ ?>
          
<option value="<?php echo $this->getItemUrl($_item) ?>"><?php echo $this->escapeHtml($_item->name?></option>
          
<?php } ?>
        
</select></td>
    </
tr>
  </
table>
<
script type="text/javascript">
  
//<![CDATA[    
    
function redirectMe (sel{
    
var url sel[sel.selectedIndex].value;
    
[removed] url;
    
};
//]]>
</script> 
</div>

Enjoy. If anyone has any cool features, please share back.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top