To get the search to pick up product codes (sku's) in my 4.0.13 store where
I do not use the full description field, I did a search and replace with my text editor in the following files:
search.php
include/search.php
skin1/customer/search.tpl
I replaced "fulldescr" with "productcode". This seems to work great for picking up the product code.
To get the s's stripped from the search term, I revised funkydunk's original code a bit.
In the 4.0.13 include/search.php file,
I replaced this
Code:
$data["substring"] = trim($data["substring"]);
with this
Code:
$data["substring"] = trim($data["substring"]);
// code to strip last s from search string
$start = (strlen($data["substring"])-1);
// echo $start;
// echo "
";
if ((substr($data["substring"],$start,1)=="s")||(substr($data["substring"],$start,1)=="S")){
$data["substring"] = substr($data["substring"],0,$start);
// echo $substring;
}
// end of code to strip last s from search string
This seems to work fine.
Hope this helps.