CartItem
Magento\Quote\Model\Cart\Data\CartItem
What it does
This is a Data Transfer Object (DTO) that represents a shopping cart item in Magento 2.
Developers use this class to pass cart item data between different layers of the application, including product SKU, quantity, parent product information (for configurable/bundled products), and customer-selected or entered product options.
It's commonly used in checkout processes, cart operations, and API interactions to ensure consistent cart item data structure.
Public Methods
- getSku()
- getQuantity()
- getParentSku()
- getSelectedOptions()
- getEnteredOptions()