Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The Manage Display of a Product Display type should check the Referenced Product Type field to only show the available fields for the selected Product Types.
source issue: #1629966: Check the allowed types of referenced product when managing content type display.
Comment | File | Size | Author |
---|---|---|---|
#3 | referenced_product_types_fields_for_display-1672118-3.patch | 1.62 KB | vasike |
#1 | referenced_product_types_fields_for_display-1672118-1.patch | 2.96 KB | vasike |
Comments
Comment #1
vasikehere is a patch
it limits the fields to the referenced product types, based on the instance of the product_reference field
and all fields of all product types if there is no product type selected.
Comment #2
bojanz CreditAttribution: bojanz commentedYou can replace this with
Might make sense to not duplicate the field adding code, and just give it a list of all product bundles if the list of referenceable types is empty, but that's more of a code style issue...
Comment #3
vasikethank you Bojan.
what about this new patch?
Comment #4
bojanz CreditAttribution: bojanz commentedMuch better! Other than perhaps documentation tweaks, this seems ready.
Comment #5
bojanz CreditAttribution: bojanz commentedLet's get this to Ryan.
Comment #6
bojanz CreditAttribution: bojanz commentedTagging.
Comment #7
rszrama CreditAttribution: rszrama commentedTouched up the comments and also used commerce_product_types() to get a list of "all" product types in the event no filter has been applied. For some reason as written it wasn't working in my testing.
Commit: http://drupalcode.org/project/commerce.git/commitdiff/957a599