You are here:  » Numbers of Compare Prices Not showing in merchant page as in category page


Numbers of Compare Prices Not showing in merchant page as in category page

Submitted by keshavkshirsagar on Tue, 2015-08-11 11:07 in

Hello David

When We will in merchant page

Not Displaying Number of seller as in search result page or in category page

I am using 15/09A (Beta)

Submitted by support on Tue, 2015-08-11 11:31

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

Submitted by keshavkshirsagar on Tue, 2015-08-11 11:46

Thanks Its working