Magento display drop down in layer navigation

Default magento does not show the drop down in layer navigation. you need to code for this functionality. Please follow the below step to achieve the display drop down in layer navigation.


Go to this file path 
/app/design/frontend/default/YOUR-THEME/template/catalog/layer/filter.phtml

if you could not find the file from this path , than copy file 
from Base directory to your local theme.
/app/design/frontend/base/default/template/catalog/layer/filter.phtml


Paste below code to filter.phtml file

<select onchange="setLocation(this.value)">
<option value=""><?php echo 'Choose an Option...' ?></option>
<?php foreach ($this->getItems() as $_item): ?>
<?php if ($_item->getCount() > 0): ?>
<option value="<?php echo $this->urlEscape($_item->getUrl()) ?>">
<?php echo $_item->getLabel() ?>
<?php else: echo '->' . $_item->getLabel() ?>
<?php endif; ?>
(<?php echo $_item->getCount() ?>)
</option>
<?php endforeach ?>
</select>

Leave a Reply