CartItem
Magento\Quote\Model\Cart\Data\CartItem
What it does
This class serves as a Data Transfer Object (DTO) that represents a shopping cart item with its essential information.
Developers use this class when adding products to a quote/cart programmatically, especially when working with the cart API or custom cart operations.
It encapsulates product SKU, quantity, parent product relationships (for configurable/bundle products), and customization options (both selected and entered by customers).
Public Methods
- getSku()
- getQuantity()
- getParentSku()
- getSelectedOptions()
- getEnteredOptions()