Log in
Helper

Product

Magento\Catalog\Helper\Product

What it does

This helper class provides utility methods for working with products in Magento 2.

Developers use it to retrieve product URLs, images, prices, check product visibility, initialize products for controllers, and manage product indexing operations.

It's commonly used in custom modules, controllers, and templates when you need to perform common product-related operations without directly manipulating product models.

Public Methods

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