You are here:  » sku search widget


sku search widget

Submitted by henk on Tue, 2012-11-06 22:55 in

Hi David,

I use the search widget as sku search, is it possible only put a number in the search field and the output is sku:andnumber

Thx
Henk

Submitted by support on Wed, 2012-11-07 11:41

Hi Henk,

Sure - in pto.php look for where the $pto_q variable is constructed by the following code around line 363:

$pto_q = (isset($pto_q)?pto_common_normalise(urldecode($pto_q),":\."):"");

...and REPLACE with:

$pto_q = (isset($pto_q)?pto_common_normalise(urldecode($pto_q),":\."):"");
if (isset($_GET["pto_q"]) && is_numeric($pto_q)) $pto_q = "sku:".$pto_q;

Cheers,
David.
--
PriceTapestry.com

Submitted by henk on Wed, 2012-11-07 11:54

Hi David,

oooh this is much better then I suggested :)

Thx
Henk