- Issue created by @zaporylie
AvailabilityManager
is only used once across the Commerce codebase - in AvailabilityOrderProcessor
to delete unavailable order items from the cart. We currently do not implement any default AvailabilityCheckerInterface
so this functionality, by on standard Commerce install, is never used.
I find the behavior sub-optimal from the UX point of view. It doesn't help that Order Items are deleted without any message whatsoever so the Customer may not even notice that one item they care about a lot out of 1000 other items also in the cart was deleted from it only because the quantity was set to 1001 and only 1000 items are left in stock.
The proposal is to rather than deleting order items directly via the mentioned processor, flag them as "unavailable" with a reason and allow the customer to manually fix their cart. As part of this issue, we must also prevent checkout from completing with a meaningful message as to why did that happen.
To maintain backward compatibility the old and the new behavior must be implemented simultaneously with a setting exposed to Site Builder where the expected strategy can be selected. The new behavior should be default on the newly installed Drupal Commerce instance.
Active
3.0
Order
A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.