Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Infobox Display


Mighty Mike

Recommended Posts

Posted

Hi all,

 

Hope someone can help me out here.

 

I have an infobox which i would like to be shown when only on a certain category ie if category = x then display else do nothing?

 

For the life of me i can not fiqure out how to do this, i can get it to display only when on a category page but i will appear on all category pages and i need it for only one.

 

I have something like this in their at the moment

 

if (isset($current_category_id) && (current_category_id > 0)) {

 

now if i was to just change the "> 0" to say "= 78" that dont work for some reason and i get errors!

 

Anybody know how to do this.

 

Thanks

 

Mike

Posted
Hi all,

 

Hope someone can help me out here.

 

I have an infobox which i would like to be shown when only on a certain category ie if category = x then display else do nothing?

 

For the life of me i can not fiqure out how to do this, i can get it to display only when on a category page but i will appear on all category pages and i need it for only one.

 

I have something like this in their at the moment

 

if (isset($current_category_id) && (current_category_id > 0)) {

 

now if i was to just change the "> 0" to say "= 78" that dont work for some reason and i get errors!

 

Anybody know how to do this.

 

Thanks

 

Mike

 

this is just a guess, but are you being sure to use the double equal sign:

if (isset($current_category_id) && (current_category_id == 78)) {

Posted
this is just a guess, but are you being sure to use the double equal sign:

if (isset($current_category_id) && (current_category_id == 78)) {

 

duh, silly me. thanks for that it works now. any idea how i would add in another category to that statement == 78,79,80 ???

 

cheers

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...