Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2006
    Location
    Columbus, OH
    Posts
    99
    Plugin Contributions
    0

    Default sideboxes for specific product pages

    I want to create sideboxes that only appear on certain pages. I downloaded the blank sidebox module. What I need help with is how to write the code that enables the box to only appear in certain product pages. I'm a PHP novice, so I'm not very familiar with the syntax. Is there an existing sidebox that functions this way that I can cut and paste the code into my new sidebox and then modify?

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

    Default Re: sideboxes for specific product pages

    Look at the various sidebox modules in:
    /includes/modules/sideboxes

    You will see that most have a variable that starts with: $show_

    That when true, will allow the sidebox to display ...

    If you write conditions that alter when that is true, you can control when it shows ...
    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!

  3. #3
    Join Date
    Apr 2006
    Location
    Columbus, OH
    Posts
    99
    Plugin Contributions
    0

    Default Re: sideboxes for specific product pages

    Alright. I'm making progress. My next question is, how do I determine what to put in place of 'common' to limit which page(s) the sideboxes appear on? For instance, if I want a particular sidebox to appear on a specific product page, do I use the product id in place of 'common', do I use info from the actual url of that page, a keyword, etc.?

  4. #4
    Join Date
    Apr 2006
    Location
    Columbus, OH
    Posts
    99
    Plugin Contributions
    0

    Default Re: sideboxes for specific product pages

    looking into this further, I realize that replacing the 'common' would be bad, since that brings in all the info that's universal for the site. I'm stumped now as to how to include code that limits which pages the sidebozes go to. This is what I have so far in the sidebox I created:

    $show_coffeeside = true;

    if ($show_coffeeside == true) {
    $left_corner = false;
    $right_corner = false;
    $right_arrow = false;
    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    }

    If I want this sidebox to appear on only the coffee product page, can anyone help me out with what to add to make that work?

  5. #5
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: sideboxes for specific product pages

    http://www.zen-cart.com/forum/showthread.php?t=44364
    Similar discussion on thread above may help

  6. #6
    Join Date
    Apr 2006
    Location
    Columbus, OH
    Posts
    99
    Plugin Contributions
    0

    Default Re: sideboxes for specific product pages

    Thanks Misty. I'll play around with it and see if I can get it to work.

  7. #7
    Join Date
    Mar 2005
    Posts
    33
    Plugin Contributions
    0

    Default Re: sideboxes for specific product pages

    Ok.. I must be a crayon short of a full box (well not must but.. rofl) I have read this thread as well as several others as to how I can display the custom sidebox in only one category.

    I tried to add all the pages I didn't want it on to the tpl_main_page in my custom template folder but it didn't seem to work.

    I would REALLLLLLY appreciate some help with this. I am also looking for a way to add a link to the cart page that would link to the my account page.

    TIA!!

 

 

Similar Threads

  1. Turn Off Sideboxes On Specific Pages
    By ewramos in forum Addon Sideboxes
    Replies: 2
    Last Post: 24 Jun 2011, 12:54 PM
  2. Disabling sideboxes on specific pages (ie the Checkout page)
    By dcENS in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 25 Apr 2010, 09:56 PM
  3. Removing Sideboxes from Specific Pages?
    By eyal8r in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 29 Mar 2010, 10:52 PM
  4. adding product specific info into <head> tags on product pages for facebook
    By donplay in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 17 Feb 2010, 01:34 PM
  5. Enabling Sideboxes on Specific Pages
    By ideasgirl in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 10 Jul 2006, 03:30 PM

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