Log in
Model

AddSimpleProductToCart

Magento\QuoteGraphQl\Model\Cart\AddSimpleProductToCart

What it does

This class handles adding simple products to a shopping cart in Magento 2's GraphQL API.

Developers use this model when implementing the addSimpleProductsToCart mutation, which retrieves the product by SKU, validates availability, and adds it to the customer's quote with the specified quantity and options.

Public Methods

  • execute()