Log in
Model

Item

Magento\Quote\Model\Quote\Item

What it does

The Quote Item class represents a single product or item in a shopping cart (quote) before it becomes an order.

Developers use this class to manage cart items, including setting quantities, prices, product options, handling item errors, and comparing items to determine if they represent the same product configuration.

It's the core model for working with individual cart line items throughout the checkout process.

Public Methods

  • beforeSave()
  • getAddress()
  • setQuote()
  • getQuote()
  • addQty()
  • setQty()
  • getQtyOptions()
  • setQtyOptions()
  • setProduct()
  • representProduct()
  • compareOptions()
  • compare()
  • getProductType()
  • getRealProductType()
  • toArray()
  • setOptions()
  • getOptions()
  • getOptionsByCode()
  • addOption()
  • updateQtyOption()
  • removeOption()
  • getOptionByCode()
  • saveItemOptions()
  • setIsOptionsSaved()
  • isOptionsSaved()
  • afterSave()
  • getBuyRequest()
  • setHasError()
  • addErrorInfo()
  • getErrorInfos()
  • removeErrorInfosByParams()
  • getItemId()
  • setItemId()
  • getSku()
  • setSku()
  • getQty()
  • getName()
  • setName()
  • getPrice()
  • setPrice()
  • setProductType()
  • getQuoteId()
  • setQuoteId()
  • getProductOption()
  • setProductOption()
  • getExtensionAttributes()
  • setExtensionAttributes()