Hello, I read about different issues (mostly server load related) with the random products mods...
So what would be the most efficient way to have random products (3 or 5) displayed from a certain category?
ie: lets say I have category "fridges" and I want the random products to be only from this category (if possible)...
Thanks a lot!
Hi,
That's a good way to reduce any loading problems, and can work in exactly the same way as the method described to select random products from a given merchant. Based on the code in this thread:
http://www.pricetapestry.com/node/2276
To select random products from a selected category; simply replace the original SQL with something like:
$sql = "SELECT name,1 AS sequence FROM `".$config_databaseTablePrefix."products` WHERE category='Fridges' ORDER BY RAND() LIMIT 3";
Cheers,
David.