Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Product reference
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Oct 2011 at 10:54 UTC
Updated:
6 Jul 2012 at 19:41 UTC
Hi,
I'm using field collection module to group common field for every product type, simply to save time on adding the same fields on and on to about 30 product types. While everything displays properly on the product display node, switching products in the "Add to Card" form doesn't refresh fields attached to the field collection (rest of the fields like price is refreshed as desired). Should I loose a whole day on switching to normal fields setup or rather there's a work around?
Comments
Comment #1
rszrama commentedI don't think you need to lose a day anywhere, but it could be that the abstraction provided by the Field Collection prevents its fields from being rendered to the page with the necessary wrappers provided for the other fields. Check the HTML to see if there's a span around the Field Collection fields that the Add to Cart form could use to target those rendered fields for replacement. I have no knowledge of how that module renders fields, so it could be that it just won't be compatible without extra integration in that module. : ?
Comment #2
rszrama commentedComment #3
rszrama commentedNever heard back from the OP, but I went ahead and tried this and discovered that indeed the wrapper div wasn't being set around the rendered field collection because its content array already included a #prefix and #suffix before we tried to add the div with a union. I've changed the way we add the div around injected fields and extra fields to support pre-existing prefixes and suffixes.