Log in
Repository

CartItemRepositoryInterface

Magento\Quote\Api\CartItemRepositoryInterface

What it does

This interface defines the contract for managing shopping cart items in Magento 2.

Developers use this repository to retrieve all items from a cart, add or update items in a cart, and remove items from a cart.

It's commonly used in checkout customizations, cart management modules, and when building custom APIs that need to manipulate cart contents.

Public Methods

  • getList()
  • save()
  • deleteById()