Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"Whats New" page


wcrystal

Recommended Posts

Hello all,

 

I need a little help. When I click on the arror for the "Whats New" box the whats new page comes up but it is showing every product I have added as new. Is there a way to have it show just the last 30 days?

 

I am using oscommerce ms2.2

Any help in this matter would be greatly appreciated. Thanks.

Wes Crystal

 

AKA

Intrinsically Dazed And Confused!

Link to comment
Share on other sites

  • 1 month later...

I would like to know how i can better control this as well, or how i can have a whats hot block that i would be able to specify a rotation of a few of the best selling items?

Jeremy Dawes

 

Link to comment
Share on other sites

Disclaimer:

1) Back up your files first!

2) This change is from an osC2.2 December 2002 snapshot

 

I made the following change to the query in products_new.php to show only what was added in the last 30 days. This was based on instructions found here in the forums, which you may still be able to find with a search. It's been a while since I did this and I can't guarantee this was the only change, but I think it was :huh:

 

Note the portion that says "SUBDATE( now( ) , INTERVAL 30 DAY )"

 

  $products_new_query_raw = "select p.products_date_added, p.products_id, pd.products_name, 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_model, 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 products_status = '1' and p.products_date_added > SUBDATE( now(  ) ,  INTERVAL 30  DAY  ) order by p.products_date_added DESC, pd.products_name";

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Humm

 

Every time I try adding:

 

and p.products_date_added > SUBDATE( now( ) , INTERVAL 30 DAY ) order by p.products_date_added DESC, pd.products_name";

 

I get multiple products repeated over and over again. Now I have over 1,000 new items :blink:

 

This used to work with OScommerce MS1 but in MS 2.2 it seems to keep adding new products over and over. Any suggestions to this problem would be greatly appreciated.

 

Thanks.

Wes Crystal

 

AKA

Intrinsically Dazed And Confused!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...