I had the x-cart guys write a custom search (advanced search) for me some months back and I love how well it works. In fact I love it so much I want to make it available (at least in part) on all pages.
So I created a new template and added the code from customer/main/search_result.tpl (minus the 'more search options' feature) to display the textfields. There are 5 fields in all: Title (which is the standard product field), Author, ISBN, Publisher & Series (all of which are extra fields).
Problem is, it won't display the extra fields or their textfields, just the product field and the search button. Is there a way to make the extra fields show up so I can call this template to be shown as a menu item on any page?
Here is the code of the template I made. It's basically the search_result.tpl minus the 'more search options':
Code:
{include file="main/include_js.tpl" src="reset.js"}
<script type="text/javascript">
<!--
var searchform_def = new Array();
searchform_def[0] = new Array('posted_data[category_main]', true);
searchform_def[1] = new Array('posted_data[search_in_subcategories]', true);
searchform_def[2] = new Array('posted_data[by_title]', true);
searchform_def[3] = new Array('posted_data[by_shortdescr]', true);
searchform_def[4] = new Array('posted_data[by_fulldescr]', true);
searchform_def[5] = new Array('posted_data[by_keywords]', true);
searchform_def[6] = new Array('posted_data[price_min]', '{$zero}');
searchform_def[7] = new Array('posted_data[avail_min]', '0');
searchform_def[8] = new Array('posted_data[weight_min]', '{$zero}');
-->
</script>
{capture name=menu}
<form name="searchform" action="search.php" method="post">
<input type="hidden" name="mode" value="search" />
Enter your serch terms below. For ISBN field do not use dashes or spaces.
<table width="100%" cellpadding="1" cellspacing="5" bgcolor="#F6F6E6">
<tr>
<td height="10" width="20%" class="FormButton2" nowrap="nowrap" align="right">{$lng.lbl_title}:</td>
<td width="10" height="10"></td>
<td height="10" width="80%">
<input type="text" name="posted_data[substring]" size="30" style="width:70%"/>
</td>
</tr>
{if $exf ne ''}
{foreach from=$exf item=field}
{assign var="ex_key" value=$field.fieldid}
<tr>
<td height="10" width="20%" class="FormButton2" nowrap="nowrap">{$field.field}:</td>
<td width="5" height="10"></td>
<td height="10" width="80%">
<input type="text" name="posted_data[extra_fields][{$ex_key}]" size="30" style="width:70%"/>
</td>
</tr>
{/foreach}
{/if}
<tr>
<td height="10" width="20%" class="FormButton" nowrap="nowrap"> </td>
<td width="10" height="10"></td>
<td height="10" width="80%">
<input type="submit" value="{$lng.lbl_search|strip_tags:false|escape}" />
</td>
</tr>
<input type="hidden" id="posted_data_by_title" name="posted_data[by_title]" value='Y' />
</table></form>
{/capture}
{ include file="menu_cat.tpl" menu_title="Search" menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}