Log in
Helper

Product

Magento\Catalog\Helper\Product

What it does

The Product Helper provides utility methods for common product-related operations in Magento 2.

Developers use it to retrieve product URLs, prices, image URLs, check product visibility, initialize products for controllers, and manage product options.

It's commonly used in templates, controllers, and custom modules when working with product data.

Public Methods

  • isDataForPriceIndexerWasChanged()
  • isDataForProductCategoryIndexerWasChanged()
  • getProductUrl()
  • getPrice()
  • getFinalPrice()
  • getImageUrl()
  • getSmallImageUrl()
  • getThumbnailUrl()
  • getEmailToFriendUrl()
  • getStatuses()
  • canShow()
  • canUseCanonicalTag()
  • getAttributeInputTypes()
  • getAttributeBackendModelByInputType()
  • getAttributeSourceModelByInputType()
  • initProduct()
  • prepareProductOptions()
  • addParamsToBuyRequest()
  • setSkipSaleableCheck()
  • getSkipSaleableCheck()
  • getFieldsAutogenerationMasks()
  • getAttributesAllowedForAutogeneration()