I have set the box to display 8 Products. Is there any way to get the box to randomise the products every time the page is refreshed?
I have over 50 products so would be good to randomise between them.
I am running v1.4.8b.
Thanks in Advance

10% Discount on all Shared and Reseller Hosting Packages at Vidahost.com
Discount Code: DISCOUNT10
Code: Select all
order by random()
10% Discount on all Shared and Reseller Hosting Packages at Vidahost.com
Discount Code: DISCOUNT10
Code: Select all
order by rand()
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Ah thanks, any idea exactly where to put it?Xsecrets wrote:Code: Select all
order by rand()
10% Discount on all Shared and Reseller Hosting Packages at Vidahost.com
Discount Code: DISCOUNT10
Code: Select all
. "' ORDER BY rand() DESC LIMIT "
Code: Select all
public function getFeaturedProducts($limit) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_featured f LEFT JOIN " . DB_PREFIX . "product p ON (f.product_id=p.product_id) LEFT JOIN " . DB_PREFIX . "product_description pd ON (f.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id)
WHERE pd.language_id = '" . (int)$this->config->get('config_language_id') . "'
AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "' ORDER BY rand() DESC LIMIT " . (int)$limit);
10% Discount on all Shared and Reseller Hosting Packages at Vidahost.com
Discount Code: DISCOUNT10
Users browsing this forum: No registered users and 1 guest