Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

search box on the side

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #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
  #2  
Old 03-29-2006, 09:49 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Moving to custom mods.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 08-05-2007, 09:11 AM
 
typologist typologist is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 51
 

Default Re: search box on the side

Thanks, it was useful. I included this search in the same box that my manufacturers. Much better organized now
__________________
4.1.8 Gold (Unix)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:57 PM.

   

 
X-Cart forums © 2001-2020