Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unique Category Image as a Background


Gisele

Recommended Posts

I hope I explain this correctly...

 

I'm trying to set a unique background image for each category and sub-category. So when you click on a category, the background in the actual product page that appears would have a special background image.

 

When you would click on a subcategory, the background image would be the actual background image of the parent category.

 

To complicate things worse, this would be specific by language as well - but that I'll deal with later.

 

has anyone done this before?

 

Thank you.

 

Gisele

Link to comment
Share on other sites

I hope I explain this correctly...

 

I'm trying to set a unique background image for each category and sub-category.  So when you click on a category, the background in the actual product page that appears would have a special background image.

 

When you would click on a subcategory, the background image would be the actual background image of the parent category.

 

To complicate things worse, this would be specific by language as well - but that I'll deal with later.

 

has anyone done this before? 

 

Thank you.

 

Gisele

Yah, it's a pin in the butt.. :)

 

I've done it with limited success..

 

You have to call the image with the category name  i.e.  category1.gif

 

The trick is the category name has to be exactly what the image is called.

 

Here's the code. You can put it anywhere you want in a column in the includes/modules/product_listing.php file.

 

<TD valign="top" width="694" background=images/backgrounds/<?php echo $breadcrumb->last(); ?>.gif>

 

Notice how it works...

<?php echo $breadcrumb->last(); ?>.gif

 

Good luck with it....

 

If you need more help with it, just PM me.

 

Also, this may better suit your needs...

<?PHP echo $categories['categories_name']; ?>.gif

 

TJ

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...