For performance reasons, when searching by specific merchant the search is not expanded to re-summarise the minimum price and total number of merchants for every product sold - there is pretty much no efficient way to do this! However, it is possible to re-query the number of merchants for each product in the result set on a per page view basis (so a maximum of 10, fast queries if showing 10 results per page) and therefore, if applicable show "Compare n Prices" instead of "More Information". The price shown however, would still be that of the merchant in context, which is logical.
If you'd like to incorporate this, edit search.php and look for the following code at line 493:
Hi,
For performance reasons, when searching by specific merchant the search is not expanded to re-summarise the minimum price and total number of merchants for every product sold - there is pretty much no efficient way to do this! However, it is possible to re-query the number of merchants for each product in the result set on a per page view basis (so a maximum of 10, fast queries if showing 10 results per page) and therefore, if applicable show "Compare n Prices" instead of "More Information". The price shown however, would still be that of the merchant in context, which is logical.
If you'd like to incorporate this, edit search.php and look for the following code at line 493:
$searchresults["products"][$k]["productHREF"] = tapestry_productHREF($searchresults["products"][$k]);
...and REPLACE with:
$searchresults["products"][$k]["productHREF"] = tapestry_productHREF($searchresults["products"][$k]);
if ($parts[0]=="merchant")
{
$sql4 = "SELECT COUNT(id) AS numMerchants
FROM `".$config_databaseTablePrefix."products`
WHERE name='".database_safe($searchresults["products"][$k]["name"])."'";
database_querySelect($sql4,$rows4);
$searchresults["products"][$k]["numMerchants"] = $rows4[0]["numMerchants"];
}
Hope this helps!
Cheers,
David.
--
PriceTapestry.com