I've tried using the changes provided here but they just didn't work at all. So I changed some things here and there to make it work. The changes below make the specials page display with or without specials in it, a must for those of us who like to add images of coupons and promo codes to our specials page.
STEP 1. open includes/modules/pages/specials/main_template_vars.php
Find:
PHP Code:
$num_products_count = $specials->RecordCount();
if ($num_products_count) {
if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS==0 ) {
$col_width = floor(100/$num_products_count);
} else {
$col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS);
}
Replace with:
PHP Code:
//show page even if no specials
$num_products_count = $specials->RecordCount();
if ($num_products_count > SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS==0 and $num_products_count!=0) {
$col_width = floor(100/$num_products_count);
$col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS);
} else {
if ($num_products_count == 0) {
$col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS);
}
STEP 2. open up includes/templates/YOUR_TEMPLATE/templates/tpl_specials_default.php
Find:
PHP Code:
<h1 id="specialsListingHeading"><?php echo BOX_HEADING_SPECIALS; ?></h1>
Replace with:
PHP Code:
<h1 id="specialsListingHeading"><?php echo BOX_HEADING_SPECIALS; ?></h1>
<?php echo TEXT_SPECIALS_PAGE; }?>
STEP 3. You need to add a define for the above code. Open up includes/languages/YOUR_TEMPLATE/english.php
Add this:
PHP Code:
define('TEXT_SPECIALS_PAGE', 'Add any images or text you want to display here.');
Instead of step 3 above I've hardcoded my tpl_specials_default.php file. It's up to you.
You can see one of my specials page here http://www.byvalenti.com/index.php?main_page=specials
Hope someone can find this helpful.