CartQuantityValidator
Magento\QuoteGraphQl\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 matching items exceed available stock, and removes items from the guest cart if they would cause inventory issues.
Developers use this during customer login flows to ensure cart merges don't create orders that exceed product availability.
Public Methods
- validateFinalCartQuantities()