Zen Cart Logo
Forums / General Questions / Long shot - Different color scheme based on category selected

Long shot - Different color scheme based on category selected

Views: 634

Results 1 to 5 of 5
30 Aug 2011, 11:37 PM
#1
jimdanforth avatar

jimdanforth

New Zenner

Join Date:
Jul 2011
Posts:
27
Plugin Contributions:
0

Long shot - Different color scheme based on category selected

IT's a long shot, but here goes.....
I sell tractor parts and customers are quite brand loyal. Each brand is also quite color specific.
Is there any way that when a customer selects a top-tier category, something (even a colored line) changed to that brand's color.
For example, Allis Chalmers tractors are orange. John Deere is green.
Once a customer selects Deere, a header, a colored line, something, changes to green to make them feel brand loyal.......

31 Aug 2011, 12:39 AM
#2
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,284
Plugin Contributions:
37

Re: Long shot - Different color scheme based on category selected

I would use a hook for the category to display an image or such.

Like this only the hook is the category

http://www.zencartmarketing.com/main-page-include-only/

~Melanie

31 Aug 2011, 12:46 AM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Long shot - Different color scheme based on category selected

You can use category-specific stylesheets to set the color (for instance) of an element based on the current category.
Say the John Deere category is id 23; add a file c_23.css to /includes/templates/your_template/css/, with content of

#yourElementID {color: 00ff00;}/green for jd/

The base stylesheet would have a rule like

#yourElementID {color: #aabbcc;}/gray or whatever you want/

31 Aug 2011, 12:51 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Long shot - Different color scheme based on category selected

You could do the same with a background image for the header or another image; you could also use Smart Backgrounds for fine control of this.

31 Aug 2011, 1:56 AM
#5
bobthemolder avatar

bobthemolder

Zen Follower

Join Date:
Nov 2008
Posts:
164
Plugin Contributions:
0

Re: Long shot - Different color scheme based on category selected

gjh42:

You can use category-specific stylesheets to set the color (for instance) of an element based on the current category.
Say the John Deere category is id 23; add a file c_23.css to /includes/templates/your_template/css/, with content of

#yourElementID {color: 00ff00;}/green for jd/

The base stylesheet would have a rule like

#yourElementID {color: #aabbcc;}/gray or whatever you want/

Very cool - did not know this!