You are here:  » Limit number of prices/merchants on price comparison tables


Limit number of prices/merchants on price comparison tables

Submitted by JustJ on Tue, 2010-10-05 13:55 in

I'm sure this is a very simple process and it has probably been answered before, but I just can't seem to find any reference to it on the forum so would really appreciate it if someone could point me in the right direction.

How do I limit the number of entries/prices/merchants in the product price comparison tables? I've got some products which are sold by lots of merchants but I only want to display the top 3-4.

thanks

Alex

Submitted by support on Tue, 2010-10-05 13:58

Hi Alex,

In products.php look for the following code at line 12:

    $sql = "SELECT * FROM `".$config_databaseTablePrefix."products` WHERE normalised_name = '".database_safe($q)."' ORDER BY price";

...and REPLACE with:

    $sql = "SELECT * FROM `".$config_databaseTablePrefix."products` WHERE normalised_name = '".database_safe($q)."' ORDER BY price LIMIT 4";

- simply change LIMIT 4 to the number you want to restrict the comparison table results to...

Cheers,
David.
--
PriceTapestry.com

Submitted by JustJ on Tue, 2010-10-05 16:22

brilliant David, thank you.