I am working on catalog search but on result page price filter in not working I have used following code on filter.phtml


    <?php foreach ($this->getItems() as $_item): ?>


            <?php if (($_item->getCount() > 0) && (strpos($_SERVER['REQUEST_URI'],'catalogsearch') === false)): ?>

            <a href="<?php echo $this->urlEscape($_item->getUrl()) ?>"><?php echo $_item->getLabel() ?></a>


            elseif(strpos($_SERVER['REQUEST_URI'],'catalogsearch') == true): //afegitó 

                $category = Mage::getResourceModel('catalog/category_collection')->addFieldToFilter('name', $_item->getLabel());




            <a href="<?php echo $_SERVER['REQUEST_URI']?>&cat=<?php echo $category_id ?>"><?php echo $_item->getLabel() //afegitó ?></a>

            <?php else: echo $_item->getLabel() ?>

            <?php endif; ?>

            (<?php echo $_item->getCount() ?>)


    <?php endforeach ?>


And result is showing like this enter image description here

Please anyone provide me solution..

Your Answer

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

Browse other questions tagged or ask your own question.