Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2007
    Location
    Orange County, CA
    Posts
    88
    Plugin Contributions
    5

    Default Disable Specials, Etc. in Header/Footer

    Hi All,

    Did a lot of searching and don't see where this has been referenced.

    The Specials, New Products, etc. links in the categories sidebox are programmed only to show up when there is a special, etc. I have a Specials link in my header and footer and would like to have a similar level of control.

    Does anyone know if how I might transfer that functionality? I tried to reuse the code from the sidebox, but it doesn't seem to work outside of there...

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Disable Specials, Etc. in Header/Footer

    The code in the categories sidebox template is:
    Code:
        if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
          $show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1");
          if ($show_this->RecordCount() > 0) {
            $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '<br />' . "\n";
          }
        }
    You could adapt all or part of that for where you want to use it ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Apr 2007
    Location
    Orange County, CA
    Posts
    88
    Plugin Contributions
    5

    Default Re: Disable Specials, Etc. in Header/Footer

    Thanks Linda. I tried that before I posted the question, but I'll look at it again to see if I missed something...

  4. #4
    Join Date
    Apr 2007
    Location
    Orange County, CA
    Posts
    88
    Plugin Contributions
    5

    Default Re: Disable Specials, Etc. in Header/Footer

    Okay, I got it to work by changing...

    Code:
    $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '<br />' . "\n";
    ...to...

    Code:
    echo '<a class="category-links" href="' .  zen_href_link(FILENAME_SPECIALS) . '">' .  CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '<br />' .  "\n";
    If there is a more correct/elegant way to do it, I would appreciate the input. I tried to include $content = ""; before the IF statement, but it didn't work...

 

 

Similar Threads

  1. Replies: 0
    Last Post: 25 Apr 2012, 01:14 AM
  2. Header Logo Image Error Report etc etc...
    By myemmadoodle in forum General Questions
    Replies: 1
    Last Post: 6 Jul 2010, 04:27 PM
  3. Featured, Specials, etc.
    By FatGuyinAZ in forum General Questions
    Replies: 0
    Last Post: 9 Mar 2008, 12:01 AM
  4. Static main page that doesn't call header, footer, etc, etc
    By tqualizer_man in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 23 Nov 2006, 06:30 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR