The idea is to keep the form in catalogsearch/advanced/

and to post the result to catalogsearch/advanced/result/

without all parameters added by the get method.

What are the necessary changes to have toolbar working ?



You need to do two things here.

1. Change Form Method to POST

File : app\design\frontend\{package|\{theme}\template\catalogsearch/advanced/form.phtml

<form action="<?php echo $this->getSearchPostUrl() ?>" method="post" id="form-validate">

Here we just changed form action method to POST.

2.Rewrite controller Mage_CatalogSearch_AdvancedController

To do this in proper way, you have to create a small module. Let me call it as MagentoSE_CatalogSearch.

File : app\code\local\MagentoSE\CatalogSearch\etc\config.xml

<?xml version="1.0"?>
                        <magentose_catalogsearch before="Mage_CatalogSearch">MagentoSE_CatalogSearch</magentose_catalogsearch>

File : app\code\local\MagentoSE\CatalogSearch\controllers\AdvancedController.php

class MagentoSE_CatalogSearch_AdvancedController extends Mage_CatalogSearch_AdvancedController
    public function resultAction()
        try {
        } catch (Mage_Core_Exception $e) {

Change here is obvious. Instead of $this->getRequest()->getQuery(), we are now using $this->getRequest()->getPost() to fetch form data correctly.

| improve this answer | |
  • Thanks for your answer. Can you please give changes needed to have toolbar working properly ? Actually not working with changes given in your answer. – vhanahrni Jun 21 '16 at 8:21
  • @Jordan My answer is just hint. You need to have min. knowledge about Magento module development. You should study it if not. This is a platform to learn, not a platform to get code snippets or extension :) – Rajeev K Tomy Jun 21 '16 at 9:16
  • I agree with you. what I know is that get method send parameters to url and toolbar.php return current url with rewrites and additional parameters. As post method don't send parameters to url, toolbar.php need changes. – vhanahrni Jun 21 '16 at 18:14

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.