Forums / Templates, Stylesheets, Page Layout / Different Product Info Display for Different Category

Different Product Info Display for Different Category

Locked

Views: 1,194

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
7 Mar 2010, 3:09 PM
#1
fairy avatar

fairy

New Zenner

Join Date:
Aug 2008
Posts:
48
Plugin Contributions:
0

Different Product Info Display for Different Category

Hi! I have been searching for this for a while. I want to have a different Product Info Display for different Categories. I have seen some threads that have the address column layouts and such, but I want to layout the page of 1 category differently than the others.

For instance I have my T-shirt page the way that I want it here:
http://www.graphxfairy.com/t-shirts/twilight-saga/twilight-photo-tshirt-edward-cullen?cPath=47_49

but then I have a listing that has many color options with swatches that doesn't look right with that layout here:
http://www.graphxfairy.com/auction-templates/bling-sparkle-auction-templates/glittering-borders-auction-template

Is it possible to just add c_(category_id) to the tpl_product_info_display.php. I tried it but it doesn't seem to work.

7 Mar 2010, 3:36 PM
#2
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Different Product Info Display for Different Category

You may be able to do what you want using just the stylesheet. Read about how to create category-specific stylesheets in the CSS readme file in the default css folder.

Rob

Breakfast: the most important donut of the day.

7 Mar 2010, 3:41 PM
#3
fairy avatar

fairy

New Zenner

Join Date:
Aug 2008
Posts:
48
Plugin Contributions:
0

Re: Different Product Info Display for Different Category

rstevenson:

You may be able to do what you want using just the stylesheet. Read about how to create category-specific stylesheets in the CSS readme file in the default css folder.

Rob

Thanks so much for the quick reply. I know how to change the style sheet for categories, but that won't be enough.

I am looking to have the product info layout completely different. I would like to have the attributes with the swatches display underneath the product description so that it isn't crunched up on the side of the Main Product Image.

7 Mar 2010, 3:44 PM
#4
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Different Product Info Display for Different Category

There are several threads around here somewhere telling how to make that change, and I'm pretty sure it's done in the stylesheet. Almost anything can be styled, including moving things around on the page using CSS positioning -- within limits, of course.

But if all that doesn't work, then you can use a bit of php to check what category is being called and load a different chunk of code. I'm no expert in that, but that answer too is here in the forum somewhere.

Rob

Breakfast: the most important donut of the day.

19 Mar 2010, 6:47 PM
#5
new_tokkie avatar

new_tokkie

New Zenner

Join Date:
Mar 2010
Posts:
33
Plugin Contributions:
0

Re: Different Product Info Display for Different Category

You can make different displays for different categories.

Through admin get the category. Eg. 'Shoes' may be category 6.
Then make a stylesheet for that category ie (c_6.css).

In the stylesheet change what you like, only applying it to category 6. It works, but its a little bit messy, because if you ever change your product / category setup you will need to change the stylesheets created, accordingly...

19 Mar 2010, 6:52 PM
#6
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Different Product Info Display for Different Category

new_tokkie:

You can make different displays for different categories.

Through admin get the category. Eg. 'Shoes' may be category 6.
Then make a stylesheet for that category ie (c_6.css).

In the stylesheet change what you like, only applying it to category 6. It works, but its a little bit messy, because if you ever change your product / category setup you will need to change the stylesheets created, accordingly...

Absolutely correct advice... Interesting to see new_tokkie is indeed new, but is posting relevant and good advice.

So how come you've just joined, yet know so much? :cool:

20 years a Zencart User

19 Mar 2010, 7:05 PM
#7
new_tokkie avatar

new_tokkie

New Zenner

Join Date:
Mar 2010
Posts:
33
Plugin Contributions:
0

Re: Different Product Info Display for Different Category

Hi Schoolboy,

Only started with zencart a few months ago. Been programming for about 15 years, but only recently with CSS, HTML, PHP, etc.

Already setup 3 sites :D , each one getting better. Playing with the software 14 hours a day never hurt either :shocking: I wanna become an expert and Zen the world :D . Some would describe me as obsessive-compulsive, which is a good trait for a computer programmer

19 Mar 2010, 7:13 PM
#8
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Different Product Info Display for Different Category

Excellent... I hope you will become a regular on the forum.

20 years a Zencart User