My objective : personalise the design of a personalised product content.
Problem encountered : contemplate do not support the a compiled content new content type - product.

Dear Drupalers,

I've created a new content type through the CCK module, let's call it "Ipod". The content type Ipod contains two fields: a text area and a image, as long I want to depict Ipods.

I want also to sell my Ipods, so each time I create a new Ipod node, I add it to the store (as a apparel product) and I add product variations, because my Ipod don't have same storage capacity and color. At this point, everything works fine: there is no incompatibility between the CCK module suite and the Ecommerce modules suite.

As I want to personalise the theme of my Ipod nodes, so I use contemplate. But when I do so, the products informations (price, product variations, add to cart link) disappear. In other words the contemplate code does not include the product part, and as long as it don't support a detailed personalising scheme of the core / other modules (such as image or product).Indeed, if I simply fill contemplate fields as follows...

<?php print teaser ?>

<?php print body ?>

...all informations are displayed (Ipod content and Product content), yet I cannot personalise the content design anymore: the contemplate module is useless.

Thank you for the help.

Comments

Matthew Davidson’s picture

The way I worked around this in one of my sites was to check if the node is a parent of subproducts (ie. $pparent == 0), if so do a node_load() on each of the nodes in the $children array, and manually construct an "add to cart" form for each subproduct in a nicely-formatted table. So in this setup users would never directly access subproduct nodes.

This can get really messy if you have more than one or two attributes for subproducts (it being hard to map a many-dimensional array of possible subproducts onto a two-dimensional table), so yes, it would be nice to have a generic $addToCart['view'] variable to drop in. However I'm guessing this would be something for eCommerce to provide for themes to work with, rather than leaving it up to the theme, or in this instance Contemplate, to generate. This looks to me more like an eCommerce feature request rather than a Contemplate bug.

duaelfr’s picture

Status: Active » Closed (won't fix)

This version of Content Templates (Contemplate) is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.