Zen Cart Logo
Forums / General Questions / Change colour depending on catogory selected

Change colour depending on catogory selected

Locked

Views: 1,413

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
30 Mar 2007, 8:35 PM
#1
ardgouge avatar

ardgouge

New Zenner

Join Date:
Mar 2007
Location:
England
Posts:
13
Plugin Contributions:
0

Change colour depending on catogory selected

Hey all!

I got a idea for my site but i wanna know if it is possible at all.

The idea is that the user is on ones section and its one colour and then when they go onto another section the page and sidebox colours all change?

I've tried a few things to no avail so any help would be greatly recieved.

Check out my store at the bottom to!

30 Mar 2007, 8:47 PM
#2
birdoasis avatar

birdoasis

Inactive

Join Date:
Jun 2005
Location:
Cheney WA
Posts:
1,123
Plugin Contributions:
0

Re: Change colour depending on catogory selected

I'm not sure this will help, but I know you can change the layout with different product types, but there's not a category type that I know of.

I've been working on this tow, but simply trying to change the header photo instead of the colors.

28 May 2007, 8:41 AM
#3
alex_clarke avatar

alex_clarke

Totally Zenned

Join Date:
Mar 2006
Posts:
909
Plugin Contributions:
1

Re: Change colour depending on catogory selected

This can be done using different stylesheets.

Check the readme_css_system.html file in your docs folder. That should sort you out! :)

3 Jun 2007, 1:33 PM
#4
ardgouge avatar

ardgouge

New Zenner

Join Date:
Mar 2007
Location:
England
Posts:
13
Plugin Contributions:
0

Re: Change colour depending on catogory selected

thanks for the response but im still having trouble, and thats not just with my broken arm!

The pages i want to change have been automatically generated by zen cart when i created the different catogories. If you have a look at my sight, i want most of the pages as they are now but to have to girls page as pink would be great!

thanks again

3 Jun 2007, 1:43 PM
#5
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Change colour depending on catogory selected

That would be simple create a style sheet named c_2.css (c is for category and the 2 is the the category ID). Only put the the statements in that stylesheet you want to change from the default you have in the main stylesheet. This stylesheet will only load when you are in category 2. This can be taken out further to include sub cats by adding the sub cat id # (c_2_10.css)......have fun

8 Jun 2007, 7:24 PM
#6
ardgouge avatar

ardgouge

New Zenner

Join Date:
Mar 2007
Location:
England
Posts:
13
Plugin Contributions:
0

Re: Change colour depending on catogory selected

guys thanks for all the help - it was perfect - check my site out mow and tell me what you think any comments are always helpful! :laugh:

9 Jun 2007, 2:35 PM
#7
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Change colour depending on catogory selected

As the main stylesheet is loaded first it is redundant to reload all of the statements for the c_2.css So the minimum that should be in c_2.css would be the following:```
/**

  • Main CSS Stylesheet
  • @package templateSystem
  • @copyright Copyright 2003-2006 Zen Cart Development Team
  • @copyright Portions Copyright 2003 osCommerce
  • @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  • @version $Id: stylesheet.css 4813 2006-10-23 02:13:53Z drbyte $
    */

body {
background-color: #FF00FF;/Side boarder colour/
}

input:focus, select:focus, textarea:focus {
background: #FF00FF;
}

#navMainWrapper, #navSuppWrapper, #navCatTabsWrapper {
background-image: url(../images/tile_backpinktop.gif);/this is the title bar colour/
}

#navCatTabsWrapper { /this is the link bar under the title bar/
background-color: #ffffff;
color: #000000;
background-image: url(../images/tile_backpinkbottom.gif);
}

#navEZPagesTop {
background-image: url(../images/tile_backpinktop.gif);
}

.leftBoxHeading, .centerBoxHeading, .rightBoxHeading {
background-image: url(../images/tile_backpinktop.gif);
}

.productListing-rowheading {
background-image: url(../images/tile_backpinktop.gif);
}