Currently the field settings form gets three settings added by us:

1) Enable this field to function as an attribute field on Add to Cart forms
2) Attribute widget type
3) Attribute widget title

#1 will become redundant once #2685873: Create our own entity types for product attributes is done, cause every entity_reference field referencing commerce_product_attribute_value entities will be opted in.
#2 and #3 should find a new home. I experimented with putting them on the attribute form, but it doesn't feel right, they're add to cart settings but very far from the rest of the add to cart configuration (which happens on the form display).

#2 belongs in the settings for the "Product variation attributes" widget. There is no need to allow one attribute to be a select box, while another is a set of radios.
Putting the setting on the widget puts it much closer to where all add to cart form display things are configured (enabling quantity, etc).

#3 should be removed for now. The purpose of this is purely visual (override "Size" with "Enter size"), can be accomplished with a form alter, and only solves a part of the problem (you can't do the same override for quantity or other line item fields). I'd rather leave it to a good contrib.

Comments

bojanz created an issue. See original summary.

bojanz’s picture

Assigned: Unassigned » bojanz

Almost done.

bojanz’s picture

Status: Active » Fixed

Committed.

  • bojanz committed 36b6430 on 8.x-2.x
    Issue #2686241: Rework the field attribute settings
    

Status: Fixed » Closed (fixed)

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