Page 2 of 19 FirstFirst 123412 ... LastLast
Results 11 to 20 of 189
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Show/Hide sideboxes based on page

    You could add a trigger to the reviews sidebox that it only displays if there is a products_id defined ...

    However ... on the product _info pages the review sidebox is showing reviews just for the given product and if there are no reviews it shows write a review ...

    Is that what you are wanting?
    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!

  2. #12
    Join Date
    May 2005
    Location
    Sweden
    Posts
    151
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    That is exactly what I want..

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

    Default Re: Show/Hide sideboxes based on page

    Look at the other sideboxes and many have a setting for when to show the sidebox, example, /includes/modules/sideboxes/featured.php uses:

    PHP Code:
    // test if box should display
      
    $show_featuredtrue
    Then there is an IF statement surrounding the whole content that starts with:
    PHP Code:
      if ($show_featured == true) { 
    You would make something similar where the IF would test for the existance of the products_id ... if > 0 set the show to true ... if <= 0 set the show to false ...

    Now it only shows the reviews sidebox when there is a products_id and that only exists when on the product _info page ...
    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!

  4. #14
    Join Date
    May 2005
    Location
    Sweden
    Posts
    151
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    Thank you Linda!

    It was a little bit to do but now it seems to work just fine..

    If anyone is interested, this is what I did:
    I inserted this
    Code:
      $show_review= false;
    
      if (isset($_GET['products_id']) and zen_products_id_valid($_GET['products_id'])) {
        if (!($_GET['main_page']==FILENAME_REVIEWS)) $show_review = true;
      }
      if ($show_review == true) {
    above
    Code:
      $review_status = " and r.status = 1 ";
    and finished it of with a
    Code:
    }
    before
    Code:
    ?>
    It's possible this isn't the way to do it but hey! It worked!

  5. #15
    Join Date
    Mar 2006
    Location
    Tennessee
    Posts
    310
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    Okay...I'm totally confused (as usual ).

    I have the Quick Order mod installed and I want to turn off all the sideboxes for this page only.

    What do I need to do to accomplish this?

    I did it on my 1.2.7 cart by creating an override tpl_main_page.php file in my quick_order folder, BUT the older file looks nothing like my new file and I can't figure out what I need to change.

    So far, I made a copy of the tpl_main_page.php file and put it in my custom templates. But everything I've tried to 'un-comment' has caused a page error.
    I'll finish that project tomorrow, I've made enough mistakes today!

  6. #16
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Show/Hide sideboxes based on page

    Quote Originally Posted by Boggled View Post
    I have the Quick Order mod installed and I want to turn off all the sideboxes for this page only.

    What do I need to do to accomplish this?

    ...

    So far, I made a copy of the tpl_main_page.php file and put it in my custom templates.
    add this:
    Code:
    $flag_disable_left = true;
     $flag_disable_right = true;
    right above this:
    Code:
       $header_template = 'tpl_header.php';
      $footer_template = 'tpl_footer.php';
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #17
    Join Date
    Mar 2006
    Location
    Tennessee
    Posts
    310
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    PERFECT!! Now I can link directly from the description of my eBay auction to my Quick Order page.

    DrByte you are the best!
    I'll finish that project tomorrow, I've made enough mistakes today!

  8. #18
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    I see that this thread is from early October, at least a version or two back. In viewing the tpl_main_page.php it seems that the capability of commenting out sideboxes is built it.

    However, I'm having a difficult time getting things set properly so as to not disrupt other pages. What I would like to do is turn off the sideboxes on the homepage only. Can anyone tell me what the procedure is?

    Thanks so much!!

    Tim

  9. #19
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Show/Hide sideboxes based on page

    Create an over-ride file for common/tpl_main_page.php and insert the following block of code at around line 45-46
    if ($this_is_home_page == true) {
    $flag_disable_left = true;
    $flag_disable_right = true;
    }
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  10. #20
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    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

    That did it!! Thanks Kuroi

 

 
Page 2 of 19 FirstFirst 123412 ... 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