Currently, Commerce Warehouses can be linked to Channels. When a Warehouse is linked to a channel, it means that the inventory in that warehouse is available in that channel. If a channel is not linked to a warehouse, it means that any inventory in that warehouse cannot be used for orders from that channel. Prior to 2.1.0, warehouse channel restrictions were set on the warehouse settings.
There are two issues with this setup, though:
- Conceptually, it makes more sense to have the warehouse restrictions on the channel level, since it's where we put payment restrictions and shipping restrictions.
- As a matter of consistency and ease of use, it makes more sense to make this a restriction instead of the current logic where the warehouse defaults to being available in none of the channels.
Currently, an admin needs to explicitly configure each warehouses to be available in each channel. For simple use cases, though, we expect most sellers to allow all warehouses to be used in all channels. To lower the amount of configuration needed (and reduce confusion), it would be better to make all warehouses available in all channels and have a configuration that restricts the warehouses if needed.
- Revise the mocks so that warehouse restrictions can be set
- By default, no restrictions are set
- An admin can set a restriction for a warehouse and channel combination. When they do, it tells the system that the warehouse's inventory is not available for that channel
- The UI of this should follow the same pattern as the Shipping Restrictions and Payments Restrictions.
- Add these warehouse restrictions to the Channel detail settings
- Add help text or an alert or a short description to help users understand how this setting works (see COMMERCE-3854)
Functionality needs to move from here to the Channel settings mocks