Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default turn off sidebox

    I have created a new side box called reward_points

    I want this side box to only appear on select category pages.

    I have read the tips and copied the "featured" example to do so, but I cannot get it to work. The side box still appears on every page.

    in includes/modules/sideboxes/my_template/reward_points.php
    i added:

    if ($this_is_home_page) {
    $flag_disable_left = true;
    }

    but nothing! Any suggestion?

  2. #2
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: turn off sidebox

    I figured it out

    I replaced:
    if ($this_is_home_page) {
    $flag_disable_left = true;
    }

    With:
    // test if box should display
    if (in_array($current_page_base,explode(",",'contact_us,privacy,conditions')) ) {
    $show_rewards_points = true;
    } else {
    $show_rewards_points = false;
    }

    now that sidebox only appears on the contact_us, privacy & conditions pages.

    This is just an example and/or test, it worked for me and may work for you.

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: turn off sidebox

    Yep, that is the official way to do this for that kind of page, and will always work if you follow the instructions correctly.

  4. #4
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: turn off sidebox

    Either I am an idiot today or I just need a break.

    // test if box should display
    if (in_array($current_page_base,explode(",",'contact_us,privacy,conditions')) ) {
    $show_rewards_points = true;
    } else {
    $show_rewards_points = false;
    }

    Whats the difference with disabling the whats_new sidebox?

  5. #5
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: turn off sidebox

    I got it!

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

    Default Re: turn off sidebox

    What was the solution that worked for you ...
    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!

  7. #7
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: turn off sidebox

    I saw no other way but to piggyback of existing code:

    changed:
    Code:
    if ($random_whats_new_sidebox_product->RecordCount() > 0 ) {
    to:
    Code:
    if ($random_whats_new_sidebox_product->RecordCount() > 0 and (isset($cPath) and $cPath == '0')) {
    hope it makes sense!

 

 

Similar Threads

  1. v151 Turn off advanced search in sidebox?
    By doooomed in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Feb 2013, 04:27 PM
  2. Turn off sidebox on index page
    By creamcrackers in forum General Questions
    Replies: 3
    Last Post: 29 Apr 2012, 10:53 AM
  3. Turn Off EZ Pages Sidebox
    By Nick1973 in forum General Questions
    Replies: 5
    Last Post: 14 Feb 2011, 09:56 PM
  4. Turn Off Sidebox Header Titles?
    By jenzi in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 9 Sep 2008, 04:01 AM
  5. Turn Off Sub-Categories in Sidebox
    By jacque427 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 26 Dec 2006, 03:01 AM

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