X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Searching by productcode (sku) not so easy after upgrade??? (https://forum.x-cart.com/showthread.php?t=1395)

wayne@industrialeye.com 02-04-2003 10:46 PM

Searching by productcode (sku) not so easy after upgrade???
 
ok so before i could do
$search_query = "($sql_tbl[products].product like '%$substring%' or $sql_tbl[products].descr like '%$substring%'or $sql_tbl[products].productcode like '%$substring%') and $sql_tbl[categories].category like '$search_category%' and $sql_tbl[products].forsale='Y' $price_condition ".$sort_by_price;

now if i attempt that it doesn't return any results using the sku #
(version 3.3.1) anyone sucessfully able to search by sku/productcode in this version (or others?)

thanks for your time, wayne

wayne@industrialeye.com 02-04-2003 11:01 PM

fixxed it!
http://forum.x-cart.com/viewtopic.php?t=1261&highlight=productcode
worked totaly!
here's the answer
the new system for searching also does a seperate search to find the quantity of products taht match the search field, so when it does the search with out adding what is said in the above link in bold (on the big post with lots of code) it would find the matching products yet when the next search for quantity hit it wouldn't search by the productcode (again this is the key it's explained above the bold is all that matters in that code excerpt) thus getting 0 and returning a "no results" answer. hope this helps anyone whit problems! see ya!


All times are GMT -8. The time now is 03:01 AM.

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