Page 3 of 3 FirstFirst 123
Results 21 to 22 of 22
  1. #21
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: Default Specials Page

    Quote Originally Posted by nrg77 View Post
    To add to what I just said, I refer back to the post where that person also experienced what I experienced as well. So I started counting the braces and yours is correct 4 open 4 close. So he too deleted one from yours thinking you put one too many but that is not the case...
    Well, that was old code... old code had one too many, the new code does not have one too many.

  2. #22
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: Default Specials Page

    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==) {
          
    $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==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.
    M.Valenti
    Contemporary Artist - Entrepreneur
    http://www.manuelavalenti.com - http://www.byvalenti.com

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. v139h Catalog / Specials Page, How to change the number of specials displayed
    By lynbor in forum Customization from the Admin
    Replies: 2
    Last Post: 12 Jun 2015, 07:19 PM
  2. specials page is not displaying items that were set to be specials
    By mayleine in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 2 Dec 2010, 12:49 PM
  3. Specials sidebox not showing at Specials page
    By JuanDBB in forum Basic Configuration
    Replies: 2
    Last Post: 15 Mar 2009, 04:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg