Log in
Model

ProductRender

Magento\Catalog\Model\ProductRender

What it does

This class serves as a Data Transfer Object (DTO) that holds all the information needed to render a product on the frontend, including buttons (Add to Cart, Compare), pricing details, images, and basic product attributes.

Developers use this when they need to retrieve complete product rendering data through APIs or when building frontend product displays, as it consolidates all display-related product information in a single, structured object.

Public Methods

  • getAddToCartButton()
  • setAddToCartButton()
  • getAddToCompareButton()
  • setAddToCompareButton()
  • getPriceInfo()
  • setPriceInfo()
  • getImages()
  • setImages()
  • getUrl()
  • setUrl()
  • getId()
  • setId()
  • getName()
  • setName()
  • setType()
  • getType()
  • getIsSalable()
  • setIsSalable()
  • setStoreId()
  • getStoreId()
  • getCurrencyCode()
  • setCurrencyCode()
  • getExtensionAttributes()
  • setExtensionAttributes()