Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Specials on Default


Snowman

Recommended Posts

This is a simple update to my origianl module that brings it uptodate to MS2 standards.

 

an adjustment, as suggested by Randy Newman can be made to the module by changing the following code from the readme file:

 

CHANGE:

 

<tr>

           <td><br><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>

         </tr>

 

to

 

<?php 

   $default_specials_query = tep_db_query("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 s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and s.status = '1' order by s.specials_date_added DESC limit " . MAX_DISPLAY_SPECIAL_PRODUCTS); 

   $default_specials = tep_db_fetch_array($default_specials_query); 

     if (isset($default_specials['products_id'])) { 

?> 

         <tr> 

           <td><br><?php include(DIR_WS_MODULES . FILENAME_DEFAULT_SPECIALS); ?></td> 

         </tr> 

<?php 

     } 

?

 

This will ensure that the module is displayed only when there is active specials.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...