B-219 Sec-55 Noida, India
+918010221733

Magento Layered Navigation in Drop-Down

Magento Layered Navigation in Drop-Down

It is very simple.
We just need to replace the contents of file
/app/design/frontend/default/your-magento-template/template/catalog/layer/filter.phtml
with

<select onchange=”setLocation(this.value)”>
  <option value=””><?php echo ‘Choose an Option…’ ?></option>
<?php foreach ($this->getItems() as $_item): ?>
    <option
        <?php if ($_item->getCount() > 0): ?>
        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>

(Visited 53 times, 1 visits today)

Leave a reply

You must be logged in to post a comment.