X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Search by SKU/Product code in quick search - 4.1.1 (https://forum.x-cart.com/showthread.php?t=22671)

vulcan-works 06-21-2006 12:07 PM

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}');

Dawn Howard 07-06-2006 11:22 AM

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

:?:

vulcan-works 07-07-2006 12:42 PM

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 :(

mrkenzie 07-30-2006 05:21 AM

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

Thanks again!

chrisollar 09-19-2006 09:24 AM

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!!

vulcan-works 09-26-2006 06:45 PM

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


All times are GMT -8. The time now is 09:58 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.