View Single Post
  #1  
Old 06-21-2006, 12:07 PM
 
vulcan-works vulcan-works is offline
 

Senior Member
  
Join Date: Feb 2004
Posts: 143
 

Default Search by SKU/Product code in quick search - 4.1.1

This will allow you to search by the sku in the search box on the home page, it seems pretty stupid that this is not enabled anyways in xcart.

In search.php

Add:
Code:
"by_sku",

Anywhere between "substring", and "manufacturers");
Code:
$allowable_search_fields = array ( "substring", ...................... "manufacturers");

In skin1/customer/search.tpl

Add:

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

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

In skin1/customer/main/search_result.tpl

Add:
Code:
searchform_def[9] = new Array('posted_data[by_sku]', true);

after:
Code:
searchform_def[8] = new Array('posted_data[weight_min]', '{$zero}');
__________________
X-cart--4.7.12

vulcanworks.net
Reply With Quote