Guest Posted June 3, 2003 Posted June 3, 2003 Here is a quick and easy hack for the anyone using the Default Specials contribution... THE PROBLEM If you don't not have any Products assigned as Specials, the ContentBox Header of the Default Specials content box still appears on Default.php, just without any ContentBoxContents. THE FIX This code modification basically shows the Default Specials ContentBox ONLY if there are any Products assigned as Specials, otherwise, it won't show the Default Specials ContentBox at all. Locate the following code in your DEFAULT.PHP file... <tr> <td><br><?php include(DIR_WS_MODULES . FILENAME_DEFAULT_SPECIALS); ?></td> </tr> Replace it with this... <?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 } ? Thats it. Hope this helps! Good Luck. -R Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.