Discussions

Theming Product Display page dependent on product type

I have defined different product types and a common content-type named "Product Display" referencing products. I need to theme products of different product types differently, i.e. different background colors for the product title.

The question is, on the Product Display page, how to fetch information about the product type. I already tried to apply field templates via Display Suite, which had no effect at all. I don't want to use Views. I don't want to create different content-types for Product Display.

Is there any way to get the field product->type into the node page?

Posted: Dec 3, 2012

Comments

DrupalAbility on December 4, 2012

Something is backwards here. Product types come first. The we use content types 'product displays' to present them. So your question is very difficult to answer. Please give some specific use cases. Thanks. Kevin

DrupalAbility on December 4, 2012

Something is backwards here. Product types come first. The we use content types 'product displays' to present them. So your question is very difficult to answer. Please give some specific use cases. Thanks. Kevin

schmitt.kreatil on December 5, 2012

Thanks for paying attention to this.

A list of products, generated by Views
The products of the first line are both based on one single Product type. The third product "Clever..." which is shown in the line below is based on another Product type.

Full view of the first Product display (content type), which references the first Product type

Full view of the second Product display (content type), which references the second Product type

Since my customer has many more Product types, I'm searching for a way not having to create seperate Product display content types for each Product type.