Log in
Model

Item

Magento\Wishlist\Model\Item

What it does

This model represents a single item in a customer's wishlist, handling the product reference, quantity, custom options, and operations like adding the item to cart.

Developers use this class when managing wishlist items, such as retrieving wishlist products with their configured options, moving items between wishlist and cart, or validating item data before saving.

Public Methods

  • setQty()
  • saveItemOptions()
  • setIsOptionsSaved()
  • isOptionsSaved()
  • afterSave()
  • validate()
  • beforeSave()
  • loadByProductWishlist()
  • getProduct()
  • addToCart()
  • getProductUrl()
  • getBuyRequest()
  • mergeBuyRequest()
  • setBuyRequest()
  • isRepresent()
  • representProduct()
  • compareOptions()
  • setOptions()
  • getOptions()
  • getOptionsByCode()
  • addOption()
  • removeOption()
  • getOptionByCode()
  • canHaveQty()
  • getCustomDownloadUrl()
  • setCustomDownloadUrl()
  • getFileDownloadParams()
  • loadWithOptions()