Quote:
Originally Posted by wardworth
I would like to limit the number of featured products displayed on a subcategory and then randomise this limit so that different featured products (from that category) are displayed per refresh.
For example, I would like only 6 featured products to show but have a different 6 featured products displaying on each refresh.
Any ideas?
|
Hi,
open "featured_products.php" and add 2 lines of code
Quote:
$search_data["products"]["sort_condition"] = "RAND() DESC";
$objects_per_page = 6;
|
before a line
it will show 6 random products with the pages to other featured products (if more exists).
If this variant doesn't meen your wish try this one:
put this code
Quote:
shuffle($products);
array_splice($products,6);
|
before this line:
Quote:
$smarty->assign("f_products",$products);
|