Closed (won't fix)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Product
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
12 Aug 2015 at 11:41 UTC
Updated:
15 Nov 2015 at 11:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dbolinovski commentedComment #3
dbolinovski commentedMinor changes.
Comment #4
bojanz commentedI realized changing the cardinality directly can't work because it's a field storage setting, which means that it is changed for all product types.
We'll need to store the setting inside the product type, then use it in the widget + implement a validator.
I'm going to commit #2556401: Add a custom widget for referencing stores first.
Comment #5
bojanz commentedDecided not to do this for now. It's not essential to our store use cases, so I want to give it time and see how people actually use stores in the wild.
The selection can easily be limited by a hook_field_widget_form_alter() that sets #multiple => FALSE on the entity_select element.
An additional validator can enforce the same thing on the API level.
Thank you for the exploratory work, dbolinovski.