You are here:  » Brand + Query Combo

Support Forum



Brand + Query Combo

Submitted by Harvey on Fri, 2008-09-12 15:59 in

Hi David, thanks for sending that file earlier in the week :)

Is there a way to search for a specific brand + query - where brand = adidas & query = t shirt. In a search engine I'd normally type "brand:Adidas t shirt", but that yields no results in pricetapestry...

Also, I tried adding %SKU% to the Name field to make all products unique - which it does - but it'd be ideal if I could print the name without the SKU on the search page. I tried mapping "description" to the product name field without the SKU addition, but that didn't work.

One last thing - on html/searchresults.php, is there a way to link straight to the merchant, i.e. to jump.php?

Thanks :)

Submitted by support on Fri, 2008-09-12 16:11

Hi Harvey,

A second ":" will separate the brand from the query part - for example:

brand:Adidas:T Shirt

For the direct to merchant links, is this the same thing as you did an older site...

http://www.pricetapestry.com/node/414

Cheers,
David.

Submitted by Harvey on Fri, 2008-09-12 16:28

Thanks David, works perfectly.

Any creative ideas of how I can get the ugly SKU out of the name? Maybe I could use PHP to trim the last 9 characters of name when it's printed in searchresults.php?:

<?php print $product["productHREF"]; ?>'><?php print $product["name"]; ?></a>

Submitted by support on Fri, 2008-09-12 16:34

Hi Harvey,

Most robust thing to do is probably to print the string up to the last space... Try this:

<?php print $product["productHREF"]; ?>'><?php print substr($product["name"],0,strrpos($product["name"]," ")); ?></a>

Cheers,
David.