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

Search by SKU/Product code in quick search - 4.1.1
 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #1  
Old 06-21-2006, 12:07 PM
 
vulcan-works vulcan-works is offline
 

Senior Member
  
Join Date: Feb 2004
Posts: 118
 

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.6.5

vulcanworks.net
Reply With Quote
  #2  
Old 07-06-2006, 11:22 AM
 
Dawn Howard Dawn Howard is offline
 

Senior Member
  
Join Date: Apr 2006
Posts: 179
 

Default

Maybe my version is different; I can't find the code referenced in search.php or skin1/customer/main/search_result.tpl

__________________
Dawn
X-Cart Business 5.3.6.3 - Testing Phase
Mods:
Order Forms - Custom Mod
Freight on Board - Custom Mod
Catalog Order Form
Call For Price

X-Cart 4.4.3 Gold - Live Store


Running on Windows
Reply With Quote
  #3  
Old 07-07-2006, 12:42 PM
 
vulcan-works vulcan-works is offline
 

Senior Member
  
Join Date: Feb 2004
Posts: 118
 

Default

Quote:
Originally Posted by Dawn Howard
Maybe my version is different; I can't find the code referenced in search.php or skin1/customer/main/search_result.tpl

i did this for version 4.1.1, im sure the the older version is different, so it wont work
__________________
X-cart--4.6.5

vulcanworks.net
Reply With Quote
  #4  
Old 07-30-2006, 05:21 AM
 
mrkenzie mrkenzie is offline
 

Senior Member
  
Join Date: May 2006
Posts: 182
 

Default

Works great in 4.1.0. Thanks for sharing the code. Can't believe this is not there be default.

Thanks again!
__________________
Mike Kenzie
X Cart Gold Ver. 4.1.3
X-RMA
X-AOM
X-Product Comparison
Reply With Quote
  #5  
Old 09-19-2006, 09:24 AM
 
chrisollar chrisollar is offline
 

Member
  
Join Date: Mar 2006
Location: waco, texas, usa
Posts: 20
 

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

Quote:
Originally Posted by Dawn Howard
Maybe my version is different; I can't find the code referenced in search.php or skin1/customer/main/search_result.tpl



Did you go through the ftp or through the xcart admin. You won't be able to find the files only using admin, you can find them easily through ftp.


Vulcan THANKS THANKS THANKS THANKS so much!!
__________________
Shannon Williams for Chris Ollar
chrisollar@grandecom.net
x-cart gold 4.0.18
x-cart gold 4.1
LC v2.1
LC v2.2 beta 1
unix
Reply With Quote
  #6  
Old 09-26-2006, 06:45 PM
 
vulcan-works vulcan-works is offline
 

Senior Member
  
Join Date: Feb 2004
Posts: 118
 

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

Quote:
Originally Posted by chrisollar
Did you go through the ftp or through the xcart admin. You won't be able to find the files only using admin, you can find them easily through ftp.


Vulcan THANKS THANKS THANKS THANKS so much!!

ya the php files have to be done through ftp/ssh...xcart admin should let us edit php files to! lol
__________________
X-cart--4.6.5

vulcanworks.net
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


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 09:28 AM.

   

 
X-Cart forums © 2001-2018