Forums / Templates, Stylesheets, Page Layout / How to display some sitebox only on certain category or product page?

How to display some sitebox only on certain category or product page?

Locked

Views: 981

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
5 Mar 2009, 7:15 AM
#1
ericgu avatar

ericgu

New Zenner

Join Date:
Aug 2005
Posts:
58
Plugin Contributions:
0

How to display some sitebox only on certain category or product page?

I mean, if I have category A and category B.

I want to put some common content on all category A products info page.
Like, I have 50 products added in category A, and in each product info page, there are some common content and may need modification frequently. I want to add a 'include(***)' code between description and attributes.

I know there are kind of code called 'case .....'. I don't know how to use it.

like:
in tpl_product_info_display.php

add:
case category ID = A
include(productadditionalinfoA.php)
case category ID = B
include(productadditionalinfob.php)

I don't know how to write these codes correctly.
Please help, Thanks

5 Mar 2009, 9:15 AM
#2
ericgu avatar

ericgu

New Zenner

Join Date:
Aug 2005
Posts:
58
Plugin Contributions:
0

Re: How to display some sitebox only on certain category or product page?

Never mind, I got it.

in tpl_product_info_display.php

add:

<?php if ($cPath == 8) {?> this is category 8 <?php }?>

8 is category ID.
something like that.