Random Products on Front Page
Almost daily, I see this question asked in the osCommerce Forum...
How can I have 9 random products showing in the the "New Products For..." box in the front page of my osCommerce site?
The answer is really, really simple - you need to change the SQL that selects the 9 products, like this;
Open up /includes/modules/new_products.php
Find:
-
p.products_date_added desc
Change to:
Upload the file and refresh your index page. You'll get 9 random products rather than the last 9 added/amended products. A better option in my opinion would be to add a "Featured Products" contribution, as I think that no customer wants to see Random Products.



I tried the script, but I still see the same old products that stay until I load something different. It made no difference. Not sure if I did something wrong.
I used Front Page.
Inaddition, my site is slower than molasses and I have been making lots of modifications and could use some help and or advise to improve the speed.
Thanks
Ron
Comment by Ron Wilmot — August 12, 2008 @ 7:55 am
Ron - never ever use a wusiwyg editor with oscommerce files. Try ultrapad or textpad or any other text editor…
Make sure that your site uses that particular module to show the new_products, and make sure that no other contribution is contaminating it (eg featured products).
For speeding up, it's a case of applying some code changes, making sure images are small, using 2 sizes of image if necessary, eliminatin html as much as possible. I wrote a short tutorial on it.
Comment by Gary — August 12, 2008 @ 8:30 am