3

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

thanks

Geert BE
  • 31
  • 1
  • 1
  • 2

1 Answers1

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"}}
Marius
  • 197,939
  • 53
  • 422
  • 830
  • ,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?

    – Abdul Ghaffar May 27 '16 at 05:17
  • Would you help me please – Abdul Ghaffar May 27 '16 at 06:30
  • @AbdulGhaffar. I don't understand your problem. – Marius May 27 '16 at 06:31
  • As I can't upload pic in comment, please see bellow details – Abdul Ghaffar May 27 '16 at 06:42
  • 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 [![enter image description here](http://i.stack.imgur.com/QhWw4.p – Abdul Ghaffar May 27 '16 at 06:40
  • Am I missing some thing? – Abdul Ghaffar May 27 '16 at 06:58
  • please ask a different question explaining what the problem is. – Marius May 27 '16 at 06:59
  • @Marius I used the as you suggested , but problem is only "Catalog Advanced Search" heading and search button is shown no form input boxes. – inrsaurabh Jul 07 '17 at 09:49