CartQuantityValidator
Magento\InventoryQuoteGraphQl\Model\Cart\MergeCarts\CartQuantityValidator
What it does
This class validates product quantities when merging a guest cart with a customer cart in GraphQL operations.
It checks if the combined quantities of items from both carts exceed available stock, and automatically removes guest cart items that would cause stock shortages.
Developers use this to ensure inventory constraints are respected during cart merge operations.
Public Methods
- validateFinalCartQuantities()