CartItemInterface
Magento\Quote\Api\Data\CartItemInterface
What it does
This interface defines the contract for shopping cart items in Magento 2, representing individual products added to a customer's quote/cart.
Developers use this interface when working with cart operations through APIs, such as retrieving item details (SKU, quantity, price), modifying cart items, or adding custom product options.
It's essential for cart management, checkout flows, and any custom functionality that needs to interact with shopping cart data.
Public Methods
- getItemId()
- setItemId()
- getSku()
- setSku()
- getQty()
- setQty()
- getName()
- setName()
- getPrice()
- setPrice()
- getProductType()
- setProductType()
- getQuoteId()
- setQuoteId()
- getProductOption()
- setProductOption()
- getExtensionAttributes()
- setExtensionAttributes()