Problem/Motivation

I need to reference products which have custom description associated so they can be more optimally described as add-on depending on the product they're add-on to.

To associate that text with the product reference, we can use https://www.drupal.org/project/entity_reference_override
but then that reference field doesn't appear as an option for the Pado formatter 'Add to cart form with add-ons' of the Variations field of a product.

Proposed resolution

Loosen the requirement for supported reference fields from the exact field type id to the type of items such reference field returns.

User interface changes

More options listed at the 'The product entity reference field to select add-ons from.' select box of the 'Add to cart form with add-ons' formatter configuration form.
No need to change its label and description because those are already generic enough.

API changes

None, AFAIK.

Data model changes

None, AFAIK.

Release notes snippet

Add support for Entity Reference Override fields and other field types that use \Drupal\Core\Field\EntityReferenceFieldItemList as their list_class instead of only supporting Drupal core's Entity reference field type.

Comments

PieterDC created an issue. See original summary.

pieterdc’s picture

Status: Active » Needs review
StatusFileSize
new1.01 KB
japerry’s picture

Status: Needs review » Reviewed & tested by the community

Works for me. +1

  • japerry committed d7a6742 on 8.x-1.x authored by PieterDC
    Issue #3113263 by PieterDC: Add support for Entity Reference Override
    
japerry’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.