Model
Quote
Magento\Quote\Model\Quote
What it does
The Quote model represents a shopping cart in Magento 2.
Developers use this class to manage cart operations like adding/removing products, applying coupons, calculating totals, managing shipping and billing addresses, and handling customer data.
It's the core model that stores all information about a customer's cart before it becomes an order.
Public Methods
- getCurrency()
- setCurrency()
- getItems()
- setItems()
- getCreatedAt()
- setCreatedAt()
- getUpdatedAt()
- setUpdatedAt()
- getConvertedAt()
- setConvertedAt()
- getIsActive()
- setIsActive()
- setIsVirtual()
- getItemsCount()
- setItemsCount()
- getItemsQty()
- setItemsQty()
- getOrigOrderId()
- setOrigOrderId()
- getReservedOrderId()
- setReservedOrderId()
- getCustomerIsGuest()
- setCustomerIsGuest()
- getCustomerNote()
- setCustomerNote()
- getCustomerNoteNotify()
- setCustomerNoteNotify()
- getStoreId()
- setStoreId()
- getStore()
- setStore()
- getSharedStoreIds()
- beforeSave()
- loadByCustomer()
- loadActive()
- loadByIdWithoutStore()
- assignCustomer()
- assignCustomerWithAddressChange()
- setCustomer()
- getCustomer()
- setCustomerAddressData()
- addCustomerAddress()
- updateCustomerData()
- getCustomerGroupId()
- getCustomerTaxClassId()
- setCustomerTaxClassId()
- getAddressesCollection()
- getBillingAddress()
- getShippingAddress()
- getAllShippingAddresses()
- getAllAddresses()
- getAddressById()
- getAddressByCustomerAddressId()
- getShippingAddressByCustomerAddressId()
- removeAddress()
- removeAllAddresses()
- addAddress()
- setBillingAddress()
- setShippingAddress()
- addShippingAddress()
- getItemsCollection()
- getAllItems()
- getAllVisibleItems()
- hasItems()
- hasItemsWithDecimalQty()
- hasProductId()
- getItemById()
- deleteItem()
- removeItem()
- removeAllItems()
- addItem()
- addProduct()
- updateItem()
- getItemByProduct()
- getItemsSummaryQty()
- getItemVirtualQty()
- getPaymentsCollection()
- getPayment()
- setPayment()
- removePayment()
- collectTotals()
- getTotals()
- addMessage()
- getMessages()
- getErrors()
- setHasError()
- addErrorInfo()
- removeErrorInfosByParams()
- removeMessageByText()
- reserveOrderId()
- validateMinimumAmount()
- isVirtual()
- getIsVirtual()
- hasVirtualItems()
- merge()
- addressCollectionWasSet()
- itemsCollectionWasSet()
- paymentsCollectionWasSet()
- currentPaymentWasSet()
- getCheckoutMethod()
- getShippingAddressesItems()
- setCheckoutMethod()
- preventSaving()
- isPreventSaving()
- isMultipleShippingAddresses()
- getExtensionAttributes()
- setExtensionAttributes()