Advanced search as a block on a page v4

Getting the Advanced Search to be embedded on a Page has always been tricky. We wanted a way to have a Page with the Categories List in a block on the left side and the Advanced Search form in a block to the right in the main content area.



So we created a Page. On the left side we added a gird and put the standard Categories block in it. Then we create another grid and inside it we put an HTML Block with Smarty Support.



The content for the block is the code that is used in the standard Advanced Search template found at: design/themes/basic/templates/views/products/products_search_form.tpl



Just paste the template code into the Smarty Block content.



By default, the dispatch is dynamic which does not work when you are coming from a Page. In order for it to work as a block in a Page we had to hard code the dispatch on the button code near the bottom of the template.



Original template code:

<div class="buttons-container"><br />
	{include file="buttons/search.tpl" but_name="dispatch[`$dispatch`]"}&nbsp;{__("or")}&nbsp;&nbsp;<a class="text-button nobg cm-reset-link">{__("reset")}</a><br />
</div>
```<br />
<br />
New code in block:<br />
```php
<div class="buttons-container"><br />
	{include file="buttons/search.tpl" but_name="dispatch[products.search]"}&nbsp;{__("or")}&nbsp;&nbsp;<a class="text-button nobg cm-reset-link">{__("reset")}</a><br />
</div>