Hello,
I want to use searchExternal to do price comparison under wordpress. But I found it shows "more information" (link back to the pt site) instead of "visit store" (link directly to merchant page). Can I show "visit store" in searchExternal? is it possible? Thanks.
Hi,
Just to confirm, do you mean that you would rather it show each product separately within the search results rather than grouped?
If that's the case, it should do the trick if you simply remove every instance of:
GROUP BY name
...from searchExternal.php (4 instances), and that should do the trick!
Cheers,
David.
Hi,
Sure - in seachExternal.php you will find this code beginning at line 210:
if ($config_useRewrite)
{
$searchresults["products"][$k]["productHREF"] = $config_baseHREF."product/".tapestry_hyphenate($product["name"]).".html";
}
else
{
$searchresults["products"][$k]["productHREF"] = $config_baseHREF."products.php?q=".urlencode($product["name"]);
}
The following alternative version will link directly to the merchant if there is only one merchant for the product:
if ($searchresults["products"][$k]["numMerchants"] == 1)
{
$searchresults["products"][$k]["productHREF"] = tapestry_buyURL($searchresults["products"][$k]);
}
elseif ($config_useRewrite)
{
$searchresults["products"][$k]["productHREF"] = $config_baseHREF."product/".tapestry_hyphenate($product["name"]).".html";
}
else
{
$searchresults["products"][$k]["productHREF"] = $config_baseHREF."products.php?q=".urlencode($product["name"]);
}
Cheers,
David.