16

I have a "Product Display" node showing a "Product" (powered by the Drupal Commerce module).

I have installed the Display Suite module, and created a new view mode for the "Product Display" content type.

The problem is that this new mode is associated with the default view mode of "Product," and I see no way to change this.

What I need is to create a new mode for "Product" and get the view mode of "Product Display" associated with this new one.

Is there anyway to do it?

5
  • You don't say if "Product" is another content type.
    – apaderno
    Mar 16 '12 at 13:14
  • Product is a "product type" of drupal.org/project/commerce module at admin/commerce/products/types/product/display
    – chefnelone
    Mar 16 '12 at 17:45
  • 3
    i haven't used the display suite but understand it's purpose. for sake of moving your project forward, have you attempted to theme your display with a standard template file for node type product?
    – au_stan
    Mar 19 '12 at 12:37
  • upvoting @austin's comment, that's the way I would go.
    – user5005
    Mar 22 '12 at 10:35
  • 1
    It is a known problem, see drupal.org/node/733044 and AFAIK there's no proper solution (yet).
    – Attiks
    Apr 29 '12 at 14:23
3

Go to the Manage Display tab of your product entity and enable the same "View Mode" you use at "Product Display". Do it in the "Custom display settings" fieldset.

Then set up image style for the Image field. And see changes at the "Product display" page

1

Found a solution to this...it's undocumented and really tricky. In you Product Display content type, add a display mode with a custom machine name my_custom_display. Now go to your Commerce Product, and add a new display mode and name it node_my_custom_display. When you prepend the node_ it matches up to the other other display and will allow you to chang the field setting from the Product Display content type display mode.

Quick Summary

Product View Content Type Display Mode name: my_custom_dispaly

Commerce Product Display Mode name: node_my_custom_display

0

Since "Product" is implemented as an entity in Drupal, you should be able to do something similar to the example provided here to create a new View Mode for it: http://mearra.com/blogs/juha-niemi/drupal-7-custom-node-view-modes.

3
  • problem is not how to create a View Mode for "Product" but how to get a View Mode created for "Product Display" related to a new View mode created for "Product"
    – chefnelone
    Mar 19 '12 at 13:35
  • under your view, you'd set your row style to something like fields. from there, you can theme your view. click on the theme:information link and use one of those templates to theme your output.
    – au_stan
    Mar 25 '12 at 21:56
  • @chefnelone, you musn't get a View Mode created for "Product Display" related to a new View mode. Just go to Manage Display tab of your product entity and enable the same "View Mode" you use at "Product Dispaly". Do it in Custom display settings fieldset. Then set up image style for the Image field. And see changes at the "Product display" page
    – milkovsky
    Aug 16 '13 at 8:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.