Guest Posted April 24, 2008 Posted April 24, 2008 Hello, I have a very long list of new products, and I was wondering what I should edit in order to shorten the list. This is making the front page of my website way bigger than it needs to be. Thanks for the help :lol:
dmnalven Posted April 24, 2008 Posted April 24, 2008 In the select query of includes/modules/new_products.php use a 'limit' clause or time interval in the 'where' statement. The limit clause is simply at the end of the query, before the closing ')' LIMIT 15 ) The time interval can seem complicated: where p.product_date_added >= date_sub(curdate(), interval 30 day) will return only those items added within the last 30 days. For ALL problems, please review this link first -> osCommerce Knowledge Base
burt Posted April 24, 2008 Posted April 24, 2008 Use your Admin section to limit the number of new products shown. Try not to delve in the code unless you know exactly what you are doing.
dmnalven Posted April 24, 2008 Posted April 24, 2008 Burt's right. There is already a limit statement in the code that is set with admin Configuration -> Maximum Values -> New Products Module I get carried away sometimes and don't even remember how the original code was written I've made so many tweaks. For ALL problems, please review this link first -> osCommerce Knowledge Base
aaronc Posted April 24, 2008 Posted April 24, 2008 thanks guys, very helpful :) Is there a way of changing the colour of the bar that says 'new products for april'?
dmnalven Posted April 25, 2008 Posted April 25, 2008 Find 'TD.infoBoxHeading' in catalog/stylesheet.css and edit the 'background' color. This will affect the color of all of the box headings though. No way around that but to create another style class and hand edit the code for just the new products module. For ALL problems, please review this link first -> osCommerce Knowledge Base
Fuzzbutt.co.uk Posted May 21, 2008 Posted May 21, 2008 Burt's right. There is already a limit statement in the code that is set with admin Configuration -> Maximum Values -> New Products Module Excellent this is just what I was looking for as I only wanted 3 new products displayed on my front page :) Imperial Sandtrooper TD-2441, UK Garrison Ghostbuster "Dr Smith"
Recommended Posts
Archived
This topic is now archived and is closed to further replies.