View Single Post
  #37  
Old 09-01-2007, 02:58 PM
 
MoonDog MoonDog is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 93
 

Default Re: Include search by SKU into basic search in v4

shipmerchant,

In v4.1.8 all you have to do is go to your skin1/customer/search.tpl file and add the following code:

Code:
<input type="hidden" name="posted_data[by_sku]" value="Y" />

after this line of code:

Code:
<input type="hidden" name="posted_data[by_shortdescr]" value="Y" />

and that's it.

You can now do a basic search of SKU numbers and the SKU checkbox is also checked.

Or you can just replace your search.tpl code with the one below (the added line of code is in blue):

Code:
{* $Id: search.tpl,v 1.9.2.1 2006/11/27 14:28:38 max Exp $ *} <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_sku]" value="Y" /> <input type="hidden" name="posted_data[by_fulldescr]" value="Y" /> <input type="hidden" name="posted_data[including]" value="all" /> <table cellpadding="0" cellspacing="0"> <tr> <td class="TopLabel" style="padding-left: 20px; padding-right: 5px;">{$lng.lbl_search}:</td> <td valign="middle"><input type="text" name="posted_data[substring]" size="16" value="{$search_prefilled.substring|escape}" /></td> <td valign="middle" style="padding-left: 5px; padding-right: 20px;"><a href="javascript: document.productsearchform.submit();">{include file="buttons/search_head.tpl"}</a></td> <td><a href="search.php"><u>{$lng.lbl_advanced_search}</u></a></td> </tr> </table> </form>

- MoonDog -
__________________
X-CART Gold v4.1.8
Reply With Quote