Jump to content

changing latest products to randow products


Guest intergemsuk
 Share

Recommended Posts

Guest intergemsuk

Hi, i was wondering how i would change the latest products on the homepage to a random selection of products rather than the latest products added to the store.

Cheers,

Ben.

Link to comment
Share on other sites

To make the random products appear on your main page, go to includes/content/index.inc.php

$latestProducts = $db->select("SELECT productId, image, price, name, sale_price FROM ".$glob['dbprefix']."CubeCart_inventory WHERE `showFeatured` = 1 ORDER BY productId DESC LIMIT ".$config['noLatestProds']);
 



to




$latestProducts = $db->select("SELECT productId, image, price, name, sale_price FROM ".$glob['dbprefix']."CubeCart_inventory WHERE `showFeatured` = 1 ORDER BY RAND() DESC LIMIT ".$config['noLatestProds']);

This should do it, i hope :D

Attention: Remember to backup before you make any changes :)

If this doesnt work, ask in the .org forum ;)

Link to comment
Share on other sites

  • 2 weeks later...
Guest Pete_bolton

Hi, do i need a custom mod if i want to choose which products are featured? ill try .org if so, i would want to choose a category (like xmas) for example, it would rellly matter which prods as long as i could tell it which category, .

Thanks

Pete

Link to comment
Share on other sites

Hi, do i need a custom mod if i want to choose which products are featured? ill try .org if so, i would want to choose a category (like xmas) for example, it would rellly matter which prods as long as i could tell it which category, .

Thanks

Pete

Yes!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...