Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Newest 5 Items


Recommended Posts

Does oscommerce have a api where i could get the newest 5 articles to use them in an other application?

Or have i to do this "manual" (connect to db, make an select, etc...)



Link to comment
Share on other sites

ok i got it with

select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
   if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . SHOPDB . ".products
   p left join " . SHOPDB .".specials s on p.products_id = s.products_id,
   " . SHOPDB .".products_description pd
   where p.products_status = '1'
   and p.products_id = pd.products_id
   and pd.language_id = '2'
   order by p.products_date_added desc limit " . $counterNewProducts;

Link to comment
Share on other sites


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

  • Create New...