Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I don't think I get the new product feature.


arretx

Recommended Posts

Posted

Can I not set a specific item to be shown as a new item? I would think that the site would display an item for a given period of time from the date it was added.

 

I have stuff that was "new in may" that now shows "new in june."

 

???

Posted

New Items should show just that, if you have not added anything for june , it will keep showing the last items you added.

Posted

add this clause to your SQL

 

where p.products_date_added > SUBDATE( now( ) , INTERVAL 30 DAY )

 

for example in my catalog/products_new.php

 

$products_new_query_raw = "select p.products_id, pd.products_name, pd.products_description_short, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_date_added > SUBDATE( now(  ) ,  INTERVAL 30  DAY  ) order by p.products_date_added DESC, pd.products_name";

 

that will give you only new products for the 30 days

 

if you want it so it literally does just give products added in the month of June then you can change your SQL statement to do that as well, but I can't really see the need to be that picky.

Archived

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

×
×
  • Create New...