View Single Post
  #1  
Old 02-04-2006, 12:48 AM
  thundernugs's Avatar 
thundernugs thundernugs is offline
 

Senior Member
  
Join Date: May 2003
Location: Bend, OR
Posts: 117
 

Default search box on the side

searched for a while but didn't see this already done, so here is my mod for a search box that utilizes the left hand side menu

create file "sidesearch.tpl"
Code:
{* $Id: sidesearch.tpl 2006/02/04 mteam *} {capture name=menu} <TABLE border="0" cellpadding="0" cellspacing="0"> <FORM method="POST" action="search.php" name="productsearchform"> <INPUT type="hidden" name="simple_search" value="Y"> <INPUT type="hidden" name="mode" value="search"> <INPUT type="hidden" name="posted_data[by_title]" value="Y"> <INPUT type="hidden" name="posted_data[by_shortdescr]" value="Y"> <INPUT type="hidden" name="posted_data[by_fulldescr]" value="Y"> <tr align=center> <TD valign="middle"> <INPUT type="text" name="posted_data[substring]" size="16" value="{$search_prefilled.substring|escape}"> </TD> <TD valign="middle"> <A href="javascript: document.productsearchform.submit()">{include file="buttons/search_head.tpl"}</A> </TD> </tr> <tr align=center> <TD colspan=2 height=25><U>{$lng.lbl_advanced_search}</U></TD> </TR> </FORM> </TABLE> {/capture} { include file="menu.tpl" menu_title=$lng.lbl_search menu_content=$smarty.capture.menu}

then, put this in your home.tpl where you want the search box to go:

Code:
{ include file="customer/sidesearch.tpl" }

then, i removed this from my head.tpl

Code:
<TR> <TD class="HeadLine" height="22"> {if $usertype eq "C"} { include file="customer/search.tpl" } {/if} </TD> <TD class="HeadLine" align="right"> {if ($usertype eq "C" || $usertype eq "B")and $all_languages_cnt gt 1} <TABLE border="0" cellpadding="0" cellspacing="0"> <FORM action="home.php" method="GET" name="sl_form"> <INPUT type="hidden" name="redirect" value="{$smarty.server.PHP_SELF}?{$smarty.server.QUERY_STRING}"> <TR> <TD> {$lng.lbl_select_language}: <SELECT name="sl" onChange="javascript: document.sl_form.submit()"> {section name=ai loop=$all_languages} <OPTION value="{$all_languages[ai].code}"{if $store_language eq $all_languages[ai].code} selected{/if}>{$all_languages[ai].language}</OPTION> {/section} </SELECT> </TD></TR> </FORM> </TABLE> {else} {/if} </TD> </TR>

you could remove more or less, depending on what you use up there.

hope this helps someone, let me know if it doesn't work as it should

mike
__________________
X-Cart Gold 4.0.17 & 4.0.18
Linux Server
Hands-On Hosting
http://www.CoreCases.com - Ipod Cases
http://www.InnovativeOutlet.com - Pet Plants and other cool stuff you need
Reply With Quote