Forums / Templates, Stylesheets, Page Layout / Disable Specials, Etc. in Header/Footer

Disable Specials, Etc. in Header/Footer

Started by gezuvor on 24 Apr 2011, 12:29 AM · Views: 920

Results 1 to 4 of 4
24 Apr 2011, 12:29 AM
#1
gezuvor avatar

gezuvor

New Zenner

Join Date:
Apr 2007
Location:
Orange County, CA
Posts:
88
Plugin Contributions:
2

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...

24 Apr 2011, 12:57 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Disable Specials, Etc. in Header/Footer

The code in the categories sidebox template is:

    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!]
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!

25 Apr 2011, 4:57 PM
#3
gezuvor avatar

gezuvor

New Zenner

Join Date:
Apr 2007
Location:
Orange County, CA
Posts:
88
Plugin Contributions:
2

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...

25 Apr 2011, 7:37 PM
#4
gezuvor avatar

gezuvor

New Zenner

Join Date:
Apr 2007
Location:
Orange County, CA
Posts:
88
Plugin Contributions:
2

Re: Disable Specials, Etc. in Header/Footer

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

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

[B]echo [/B]'<a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '<br />' . "\n";