3

How do I show the "advanced search" on the front page. I want to open the website showing the advanced search options.

thanks

1 Answer 1

6

First create this template file in your theme:

app/design/frontend/{package}/{theme}/template/catalogsearch/advanced/home_form.phtml.
Then copy the contents of the file catalogsearch/advanced/form.phtml to your new file.
Replace

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

with

<form action="<?php echo $this->getUrl('catalogsearch/advanced/result') ?>" method="get" id="form-validate">

Add this to your homepage content from CMS->Pages.

{{block type="catalogsearch/advanced_form" template="catalogsearch/advanced/home_form.phtml"}}
8
  • ,I followed you, search options are being shown on my home page, on performing search, it leads to result page, there it shows wrong no results(leave it), it shows just count, not results....like under Catalog Advanced Search, it says 10 item(s) were found using the following search criteria, Name: star Don't see what you're looking for? Modify your search, Am I missing some thing? May 27, 2016 at 5:17
  • Would you help me please May 27, 2016 at 6:30
  • @AbdulGhaffar. I don't understand your problem.
    – Marius
    May 27, 2016 at 6:31
  • This is comment Not an Answer. My is issue is this, before this there was no search option on home page. I make changes as you said. After that search option is available on home page as show in pic1, after performing search, result page is shown, on result page, result count is incorrect(that is logical issue, leave it for now), but searched product are now shown,just count is shown on page as you can see in pic2, this kills purpose of search. ![pic1](i.stack.imgur.com/JydyN.png) [![enter image description here](i.stack.imgur.com/QhWw4.p May 27, 2016 at 6:40
  • As I can't upload pic in comment, please see bellow details May 27, 2016 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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