Log in
Interface

CartInterface

Magento\Quote\Api\Data\CartInterface

What it does

This interface defines the contract for a shopping cart (quote) in Magento 2.

Developers use it to interact with cart data programmatically, including managing cart items, customer information, addresses, currency, and cart metadata like creation dates and status.

It's essential for customizing checkout flows, creating cart management APIs, or integrating with third-party systems that need to read or modify shopping cart data.

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()