Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I modify the SQL query in boxes/specials.php...


Sketchy

Recommended Posts

...to return a random special offer from a specific category rather than just a random special offer?

 

I think this is the bit of code that needs to be edited:

 

 if ($random_product = tep_random_select("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . $languages_id . "' and s.status = '1' order by s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS)) {

 

Thanks in advance,

 

Joe.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...