Log in
Model

Quote

Magento\Quote\Model\Quote

What it does

The Quote model represents a shopping cart in Magento 2, managing all cart data including items, addresses, payments, totals, and customer information.

Developers use this class to manipulate cart contents, apply discounts, calculate totals, manage shipping/billing addresses, and convert quotes into orders during checkout.

It serves as the central model for all shopping cart operations before order placement.

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