Log in
Model

InsufficientStockError

Magento\Quote\Model\Cart\Data\InsufficientStockError

What it does

This class represents an error that occurs when a customer tries to add more items to their cart than are available in stock.

Developers use this class to communicate insufficient stock errors to the frontend, including the actual available quantity.

It extends the base Error class and adds quantity information specific to inventory shortages.

Public Methods

  • getQuantity()