CartInterface
Magento\Quote\Api\Data\CartInterface
What it does
CartInterface defines the contract for shopping cart (quote) objects in Magento 2.
Developers use this interface to work with cart data including items, customer information, addresses, currency, and cart lifecycle properties (creation date, conversion status, etc.).
It's commonly used in checkout flows, cart management operations, and when extending cart functionality through plugins or custom modules.
Public Methods
- getId()
- setId()
- getCreatedAt()
- setCreatedAt()
- getUpdatedAt()
- setUpdatedAt()
- getConvertedAt()
- setConvertedAt()
- getIsActive()
- setIsActive()
- getIsVirtual()
- getItems()
- setItems()
- getItemsCount()
- setItemsCount()
- getItemsQty()
- setItemsQty()
- getCustomer()
- setCustomer()
- getBillingAddress()
- setBillingAddress()
- getReservedOrderId()
- setReservedOrderId()
- getOrigOrderId()
- setOrigOrderId()
- getCurrency()
- setCurrency()
- getCustomerIsGuest()
- setCustomerIsGuest()
- getCustomerNote()
- setCustomerNote()
- getCustomerNoteNotify()
- setCustomerNoteNotify()
- getCustomerTaxClassId()
- setCustomerTaxClassId()
- getStoreId()
- setStoreId()
- getExtensionAttributes()
- setExtensionAttributes()