Damien and I have discussed this, but we'll still need a clear plan moving forward. We simply know that there will need to be various build modes for product display, including a build mode for display on a referencing entity (i.e. a product display node), one for the shopping cart form, and a full administrative display. Let's see if we can get some Skitches in the comments showing possible build modes we should be thinking about.

Furthermore, when we have an administrative display build mode (most likely the default "View" build mode), it should be linked to through the admin/commerce/product/# links and used on the delete confirmation form. This will take care of the TODO in commerce_product_ui_product_delete_form() of commerce_product_ui.products.inc.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rszrama’s picture

Here's an example from Shopify of a simple cart display build mode. If I'm not mistaken, we should be able to alter this in via the Cart UI module.

Damien Tournoud’s picture

Another example:

marketshare-02

attiks’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta3
Status: Active » Needs review

I found a 'fix':
In commerce_product_reference_node_view.module there's a line

$node->content['product:' . $product_field_name] = field_view_field('commerce_product', $product, $product_field_name, 'node_' . $view_mode);

but i think it has to be, at least then it works for me

$node->content['product:' . $product_field_name] = field_view_field('commerce_product', $product, $product_field_name, $view_mode);

Use case: I use a custom view mode in combination with display suite in my views, I define this view mode on both the product and product display, inside views i select my custom view mode and with the fix above it works

Marking as NR for the moment to get fast feedback ;p

rfay’s picture

Status: Needs review » Active

@attiks, NR is for when there's a patch.

attiks’s picture

@rfay, i know, but i wanted fast feedback from the commerce guys ;p to see if this was a possible solution

attiks’s picture

FileSize
1.06 KB

patch added

attiks’s picture

Status: Active » Needs review
FileSize
1.06 KB

this time for real ;p

disclaimer: i didn't test this extensively, but it appears to work. I made sure that whatever view mode i added for the node i added for the product as well, no idea what happens if you don't do this

attiks’s picture

FYI: Just tested it with a view mode only defined on the node and it still works, the view mode for the product used is the default one

moshe weitzman’s picture

I would add a 'featured' build mode. Something like the products in the top carousel at http://www.dell.com/

rszrama’s picture

Status: Needs review » Active

Actually, that patch is unrelated to this issue, so moving back to active.

Good idea, Moshe. : )

GiorgosK’s picture

would such a feature be able to solve this problem ? #1289414: Display SKU and Product Title in "node--product_display.tpl"
is this feature already implemented ?

joachim’s picture

Would this be useful? http://drupal.org/project/entity_view_mode

(Admittedly, it needs some work to make custom view modes nicely exportable.)

bojanz’s picture

Issue summary: View changes
Status: Active » Closed (outdated)