Page 16 of 19 FirstFirst ... 61415161718 ... LastLast
Results 151 to 160 of 189
  1. #151
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Show/Hide sideboxes based on page

    See if this helps ...

    Code:
    if ($current_category_id > 0 || $_GET['main_page'] == 'product_info') {
      $show_this_box = true;
    } else {
      $show_this_box = false;
    }
    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!

  2. #152
    Join Date
    Apr 2009
    Posts
    84
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    Thanks for the quick reply, but I'm still not getting it, for my situation I'm editing includes/modules/sideboxes/MY TEMPLATE/blank_sidebox.php and now have the following code:

    Code:
    <?php
    
      // test if box should display
      $show_blank_sidebox = true;
    
    if ($current_category_id > 0 || $_GET['main_page'] == 'product_info') {
      $show_blank_sidebox = true;
    } else {
      $show_blank_sidebox = false;
    }
      if ($show_blank_sidebox == true) {
          require($template->get_template_dir('tpl_blank_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_blank_sidebox.php');
          $title =  BOX_HEADING_BLANK_SIDEBOX;
          $title_link = false;
          require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
     }
    ?>


    Quote Originally Posted by Ajeh View Post
    See if this helps ...

    Code:
    if ($current_category_id > 0 || $_GET['main_page'] == 'product_info') {
      $show_this_box = true;
    } else {
      $show_this_box = false;
    }
    Brian - Connecticut, US --- Using Zen 1.3.9g - Modified Classic Template
    Currently developing: http://www.printdealz.com
    Other Zen Pages: http://www.wholesale4realtors.com 1.3.8a

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

    Default Re: Show/Hide sideboxes based on page

    You indicated that you want this to show when you are navigating the Categories ... and the product _info pages ...

    I see this only if I am navigating through the Category tree ... or if I am on the product _info page ...

    First, test what happens if you make both parts of the IF true ... do you always see the sidebox?

    Next, set the false back in there and go to the home page ... as there isn't a selected Category, you will not see the sidebox ...

    Next, click on a Category, and you should see the sidebox ...

    Now, click on a Product and you should see the sidebox ...

    Is this how you are wanting it to work?
    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!

  4. #154
    Join Date
    Apr 2009
    Posts
    84
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    Quote Originally Posted by Ajeh View Post
    First, test what happens if you make both parts of the IF true ... do you always see the sidebox?

    Next, set the false back in there and go to the home page ... as there isn't a selected Category, you will not see the sidebox ...

    Next, click on a Category, and you should see the sidebox ...

    Now, click on a Product and you should see the sidebox ...
    You're accurate, that this should only display on those pages, the sidebox is a subcategory navigation dropbox system, so it does not need to be on the front page or pages such as add to cart, checkout, etc...

    I had previously added the following code to tpl_main_page.php to at minimum stop it from loading on the page. (per a suggestion in this thread.)

    Code:
    if ($this_is_home_page == true) {
    
        $flag_disable_left = true;
        $flag_disable_right = true;
    
    }
    To test things out further, I removed that code to start clean and then went back to the blank_sidebox.php we've been discussing and tested the if statements per your suggestion. I feel like I'm really missing something obvious now, because regardless of if both are true or both are false, the sidebox is still loading. I feel like I'm working on the wrong file, even though I'm sure I'm not, but just to re-confirm I tested on both the original and over-ride file.
    Brian - Connecticut, US --- Using Zen 1.3.9g - Modified Classic Template
    Currently developing: http://www.printdealz.com
    Other Zen Pages: http://www.wholesale4realtors.com 1.3.8a

  5. #155
    Join Date
    Apr 2009
    Posts
    84
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    Quick correction, I can get the side box to be on all pages or no pages by editing the true/false or even reversing them. I had a silly error when I copied back in your code suggestion I forgot to change to $show_blank_sidebox, but in any case I still can't get it to only show on the pages discussed.
    Brian - Connecticut, US --- Using Zen 1.3.9g - Modified Classic Template
    Currently developing: http://www.printdealz.com
    Other Zen Pages: http://www.wholesale4realtors.com 1.3.8a

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

    Default Re: Show/Hide sideboxes based on page

    Could you go to the Tools ... Developers Tool Kit ... and in the bottom input box enter:
    $show_blank_sidebox

    What files come up?

    If you look at that file on the server, what does the code read?
    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. #157
    Join Date
    Apr 2009
    Posts
    84
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    Error: No matching Configuration Keys were found ... $show_blank_sidebox

    I had added this sidebox from the blank sidebox addon at http://www.zen-cart.com/index.php?ma...roducts_id=174
    Brian - Connecticut, US --- Using Zen 1.3.9g - Modified Classic Template
    Currently developing: http://www.printdealz.com
    Other Zen Pages: http://www.wholesale4realtors.com 1.3.8a

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

    Default Re: Show/Hide sideboxes based on page

    Did you change the blank_sidebox name to something else? If so, that would be the code to search for.

  9. #159
    Join Date
    Apr 2009
    Posts
    84
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    No I left everything as is. Just using it to develop an add-on, so there was no need to do anything. :-/

    I'll go double check I didn't post any portion of it in the wrong location, because multi-site mod is also installed, so it's easier to make a mistake on folders.
    Brian - Connecticut, US --- Using Zen 1.3.9g - Modified Classic Template
    Currently developing: http://www.printdealz.com
    Other Zen Pages: http://www.wholesale4realtors.com 1.3.8a

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

    Default Re: Show/Hide sideboxes based on page

    Could you peek in the Tools ... Layout Boxes Controller ... and ensure that this sidebox is turned on ...

    What is the path on that sidebox?

    When you searched in the Tools ... Developers Tool Kit ... in the bottom input box on:
    $show_blank_sidebox

    did you select Catalog from the dropdown and then click search?
    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!

 

 
Page 16 of 19 FirstFirst ... 61415161718 ... LastLast

Similar Threads

  1. v150 Any way to show/hide payment modules dynamically based on order total?
    By Limitless in forum Addon Payment Modules
    Replies: 2
    Last Post: 27 Sep 2012, 03:22 PM
  2. Show/Hide INformation Sidebox based on page
    By atracksler in forum Basic Configuration
    Replies: 12
    Last Post: 17 Jun 2011, 04:21 PM
  3. Show/Hide sideboxes based on page
    By monkeyjr47906 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 29 Nov 2007, 07:25 PM
  4. Hide sideboxes on main page
    By disciple in forum Templates, Stylesheets, Page Layout
    Replies: 18
    Last Post: 11 Jan 2007, 07:38 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