Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Products Help


Guest

Recommended Posts

Hi all... Some time ago, I found a topic to have the new products infobox on the default page show only the products added in the current month with the products filter in english.php:

define('THE_NEW_PRODUCTS_FILTER',"and date_format(p.products_date_added, '%Y%m') >= date_format(now(), '%Y%m')"); 

define('THE_NEW_PRODUCTS_FILTER2',"and date_format(products_date_added, '%Y%m') >= date_format(now(), '%Y%m')");

 

This works for both the new products infobox and products_new.php. What I need to do, and I am sure it is just a simple change in these 2 filters, is to change it from products in the current month, to products added in the last 30 days. For example, instead of showing nothing added in July, show everything added from June 3 to July 3, etc.

 

Can someone point me in the right direction to do the date arithmetic for these filters?

 

Thanks in advance...

Charlie

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...