Zen Cart Logo
Forums / Basic Configuration / sideboxes for specific product pages

sideboxes for specific product pages

Locked

Views: 1,981

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
16 Jul 2006, 4:59 PM
#1
whiteboxer avatar

whiteboxer

New Zenner

Join Date:
Apr 2006
Location:
Columbus, OH
Posts:
97
Plugin Contributions:
0

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?

16 Jul 2006, 5:03 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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 ...

19 Aug 2006, 5:34 PM
#3
whiteboxer avatar

whiteboxer

New Zenner

Join Date:
Apr 2006
Location:
Columbus, OH
Posts:
97
Plugin Contributions:
0

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.?

25 Aug 2006, 8:52 PM
#4
whiteboxer avatar

whiteboxer

New Zenner

Join Date:
Apr 2006
Location:
Columbus, OH
Posts:
97
Plugin Contributions:
0

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?

25 Aug 2006, 9:20 PM
#6
whiteboxer avatar

whiteboxer

New Zenner

Join Date:
Apr 2006
Location:
Columbus, OH
Posts:
97
Plugin Contributions:
0

Re: sideboxes for specific product pages

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

31 Jan 2007, 2:25 AM
#7
rainedazze avatar

rainedazze

New Zenner

Join Date:
Mar 2005
Posts:
24
Plugin Contributions:
0

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!!