Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Product reference
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Jul 2011 at 10:08 UTC
Updated:
29 Jul 2011 at 15:51 UTC
One product display linked to two products each with a different image. When the referenced product is changed in teaser view of a product display, the view mode is changed to the default for the referenced product and shows fields not made visible in the teaser view.
This problem affects any product display-referenced product view mode where the default display shows different fields from the other displays (teaser, full etc) and the product is updated via the select box.
This also affects the full node page and appears to be that the view mode is lost by the AJAX post back. This worked in version pre beta 4.
| Comment | File | Size | Author |
|---|---|---|---|
| productdisplay-teaser002.jpg | 15.92 KB | iaugur | |
| productdisplay-teaser001.jpg | 9.93 KB | iaugur |
Comments
Comment #1
rszrama commentedAhh, the problem lay in commerce_cart_field_attach_view_alter(). I was using a += operator on an array to alter the context for the current display node's view mode... but since the view_mode parameter was already set, it wasn't updating it for use when rendering product fields.
Commit: http://drupalcode.org/project/commerce.git/commit/9a4fe37
Comment #2
rszrama commented(This commit made it into the RC1, I just forgot to submit my comment form. : )
Comment #3
iaugur commentedGreat stuff Ryan! just upgraded to latest rc1 and yay that's fixed and even more goodies to discover! Thanks a million.
Comment #4
rszrama commentedw00t! Glad to hear it. : )
Comment #5.0
(not verified) commentedtypo