1

In my filter.phtml i have this code:

<select name="layered-nav-select" onChange="setLocation(this.value)">
<option selected="selected" value="#">Please Select </option>
<?php foreach ($this->getItems() as $_item): ?>             
        <?php if ($_item->getCount() > 0): ?>
            <option value="<?php echo $this->urlEscape($_item->getUrl()) ?>">
                <?php
                echo $_item->getLabel();
                if ($this->shouldDisplayProductCount()):
                    echo '(' . $_item->getCount() . ')';
                endif; 
                ?>
            </option>               
        <?php else: ?>
            <option value="#">
                <?php
                echo $_item->getLabel();
                if ($this->shouldDisplayProductCount()):
                    echo '(' . $_item->getCount() . ')';
                endif; 
                ?>
            </option>
        <?php endif; ?>     
<?php endforeach ?>

code is working correctly see link: http://prntscr.com/b2ibsg

But I need the Filter name instead of Please Select , for example in first filter instead Please select - display Manufacturer name,

Thanks

0

To get the filter frontend label, replace Please select with the following:

<?php echo $this->escapeHtml($this->getName()) ?>

See app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php to see what the method does.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.