Page 18 of 19 FirstFirst ... 816171819 LastLast
Results 171 to 180 of 189
  1. #171
    Join Date
    Sep 2010
    Posts
    612
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    I've seen a few posts about hiding boxes at checkout...it's still Greek to me. One was close but then it looks like they went with the css route.

    I don't understand the if and array code in the sidebox files...can someone help? Thank you.

    For starters I'd like to get the Best Sellers, Who's Online and Reviews boxes hidden.

  2. #172
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    I have read over this forum, I have got it mostly to work but not 100%. The categories sidebox I want to show on EVERY page except the main page. I also would like the Blank Sidebox to ONLY show on the main page.


  3. #173
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    Got it heres how I did it:
    Blank sidebox in: blank_sidebox.php
    PHP Code:
     // test if box should display

      
    if ($this_is_home_page) {
        
    $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_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
     }
    ?> 
    For Categories:
    PHP Code:
    $show_categoriestrue;

    if (
    $this_is_home_page) {
    $show_categoriesfalse;
    }


    if (
    $show_categories == true) {
    $main_category_tree = new category_tree;
    $row 0;
    $box_categories_array = array();

    // don't build a tree when no categories
    $check_categories $db->Execute("select categories_id from " TABLE_CATEGORIES " where categories_status=1 limit 1");
    if (
    $check_categories->RecordCount() > 0) {
    $box_categories_array $main_category_tree->zen_category_tree();
    }

    require(
    $template->get_template_dir('tpl_categories.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_categories.php');

    $title BOX_HEADING_CATEGORIES;
    $title_link false;

    require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
    }
    ?> 

  4. #174

    Default Re: Show/Hide sideboxes based on page

    Quote Originally Posted by kuroi View Post
    Create an over-ride file for common/tpl_main_page.php and insert the following block of code at around line 45-46
    Would someone please tell me what I'm doing wrong. I've done the above explicitly and it doesn't work. I used product_info instead of main_page. Is my verbiage incorrect? Should I use the following instead:

    if ($this_is_product_info_page == true) {
    $flag_disable_left = true;
    $flag_disable_right = true;
    }

    Thanks,
    Sam

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

    Default Re: Show/Hide sideboxes based on page

    This is not a real variable:
    $this_is_product_info_page

    You might try:
    Code:
      if (isset($_GET['products_id'])) {
    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!

  6. #176

    Default Re: Show/Hide sideboxes based on page

    Quote Originally Posted by Ajeh View Post
    This is not a real variable:
    $this_is_product_info_page

    You might try:
    Code:
      if (isset($_GET['products_id'])) {
    UREEKA!!! It worked. Thank you Thank you Thank you Thank you

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

    Default Re: Show/Hide sideboxes based on page

    You are most welcome ... thanks for the update that this 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: 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!

  8. #178
    Join Date
    May 2007
    Posts
    16
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    Hello,

    Does anybody know the code to show certain sideboxes on the manufacturers pages?

    Thank you.

    Anthony


  9. #179
    Join Date
    Nov 2006
    Posts
    76
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    I'm using version 1.3.9 and would like to know how to remove all side boxes as well as the header and footer from this page https://letsseethemenu.com/index.php...page=subscribe so that I am left with only "Receive Special Offers & Coupons:HTMLTEXT-Only" any assistance is greatly appreciated.

  10. #180
    Join Date
    Apr 2013
    Location
    eglisau switzerland
    Posts
    567
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    Sorry to drag up an old thread.

    I have been experimenting with not showing side columns on certain pages.

    I used the prepared code in tpl_main_page.php to stop columns on the home page which works fine.

    But does not stop columns for other pages, I assume the page name is this guy? <title>Accessories</title>
    So the code to I used is
    if (in_array($current_page_base,explode(",",'Accessories')) ) {
    $flag_disable_right = true;
    }

    Probably I did something dumb



    <title>Accessories</title>

 

 
Page 18 of 19 FirstFirst ... 816171819 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

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