Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Jul 2004
    Location
    Bristol Virginia
    Posts
    162
    Plugin Contributions
    0

    Default Disable Side Boxes on Product Listings Page

    I have read several threads in the forum about removing side boxes and know how to do it for pages like the privacy page, etc but...

    Is it possible to add the $flag_disable_left = true; and $flag_disable_right = true; to the page that displays a list of category products?

    I added the tags above to tpl_modules_product_listing.php but it only removed the right side boxes and not the left side boxes.

    Thanks in advance!
    Proimpulse Web Site Design

  2. #2
    Join Date
    Jul 2004
    Location
    Bristol Virginia
    Posts
    162
    Plugin Contributions
    0

    Default Re: Disable Side Boxes on Product Listings Page

    I have added the following to tpl_main_page.php:

    if ($current_page_base == 'index' and $cPath == '1')
    $flag_disable_right = true;

    if ($current_page_base == 'index' and $cPath == '1')
    $flag_disable_left = true;


    This works great but will I need to put a repeat of this for every single category path?

    like:

    if ($current_page_base == 'index' and $cPath == '2')
    $flag_disable_right = true;

    if ($current_page_base == 'index' and $cPath == '2')
    $flag_disable_left = true;

    then

    if ($current_page_base == 'index' and $cPath == '3')
    $flag_disable_right = true;

    if ($current_page_base == 'index' and $cPath == '3')
    $flag_disable_left = true;


    It seems there should be a more logical way of doing this but I'm not a programmer.

    Thanks again!
    Proimpulse Web Site Design

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

    Default Re: Disable Side Boxes on Product Listings Page

    Have your tried using:
    if ($current_page_base == 'index' and $cPath > 0)

    This would turn if off when the $cPath is defined as in accessed via the Category sidebox ...

    What do you want to happen when coming from the Search or the manufacturers sidebox?

    You could add those conditions as well ...
    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. #4
    Join Date
    Jul 2004
    Location
    Bristol Virginia
    Posts
    162
    Plugin Contributions
    0

    Default Re: Disable Side Boxes on Product Listings Page

    Thanks a bunch, that did it!

    I would like the same things to happen when coming from search or manufactures also so it would be:

    if ($current_page_base == 'index' and manufacturers_id > 0) ?

    If I read correctly for the search it would be:

    if (in_array($current_page_base,explode(",",'advanced_search_result')) ) {
    $flag_disable_right = true;
    $flag_disable_left = true;
    }


    Is this correct?
    Proimpulse Web Site Design

  5. #5
    Join Date
    Apr 2006
    Posts
    242
    Plugin Contributions
    0

    Default Re: Disable Side Boxes on Product Listings Page

    I'm trying to also disable the "right" sideboxes when the manufacturers product listings is shown I've tired a few things said here, but can't get it to work for some reason.

    Whenever products are shown I need to disable to right side cause they are in columns of 4. I already have all the categories disabled. I think I need the manufacturers listings, and search listing to disable as well.

    proimpulse did you ever figure this out?

  6. #6
    Join Date
    Apr 2006
    Posts
    242
    Plugin Contributions
    0

    Default Re: Disable Side Boxes on Product Listings Page

    I got the search page to disable the right side, but still having issues with the manufacturers pages.

  7. #7
    Join Date
    Jan 2008
    Posts
    173
    Plugin Contributions
    0

    Default Re: Disable Side Boxes on Product Listings Page

    This is a real old thread but I would like to get some help on this. I do want to hide the left side box when a product is displayed. I have located the tpl_modules_product_listing.php in the template default file. I do not have this file in my override file.

    Where do I place this code and is this complete.

    thanks

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

    Default Re: Disable Side Boxes on Product Listings Page

    The test would go in /includes/templates/your_template/common/tpl_main_page.php (copy it from /includes/templates/template_default/common/tpl_main_page.php if you do not already have a custom copy). Never change a file in a default folder; copy it to a /your_template/ folder first, as the tutorials describe.

    The complete test code is
    PHP Code:
    if ($current_page_base == 'index' and $cPath 0) {
      
    $flag_disable_left true;


  9. #9
    Join Date
    Jan 2008
    Posts
    173
    Plugin Contributions
    0

    Default Re: Disable Side Boxes on Product Listings Page

    I am sorry that works for the category page and after rereading the post that is what the original poster wanted.


    But what I am after is for the left side-box to be hidden when a individual product is selected. It would help if I understood what the code meaning is.

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

    Default Re: Disable Side Boxes on Product Listings Page

    That is a different kind of page. Use
    PHP Code:
    if ($current_page_base == 'product_info') {
      
    $flag_disable_left true;

    "index" refers to one of a group of pages - home page, category listing or product listing.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v155 Main Page Righthand Side Boxes align at bottom of page
    By Evil Rob in forum General Questions
    Replies: 10
    Last Post: 21 Nov 2016, 05:49 PM
  2. v151 Disable side-boxes on mobile devices diy template
    By Adrian Ciocîrlan in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 7 Jun 2016, 11:37 AM
  3. Replies: 5
    Last Post: 15 Oct 2012, 09:57 PM
  4. Disable side columns for home page..
    By 19gary72 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 24 Dec 2011, 03:33 PM
  5. Product listings side by side...
    By Arkwright in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 21 Nov 2007, 07:56 PM

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