Im working on a new module that will store stock levels in multiple inventory locations. What is the "best" way to store the data? Im slow to just attach and array of key/values to the product object and think I should use an entity instance for each warehouse. A few things that might effect what "best" is:
- need to be conflict free with existing commerce simple stock module
- need to be able to show individual stock locations via Field UI using conditional fields or Rules.
- need to be able to iterate through all of the stock location
- Each stock will have name, stock value, and a few other properties such as geo location
- List item would like to use field group to displace the multiple values with existing formatters and widgets.
- Commerce uses inline entity fields that might be good pattern to use
- I intend to be a Commerce Stock submodule and would like to leverage as much Commerce Stock functionality as possible.