Log in
Interface

ProductInterface

Magento\Catalog\Api\Data\ProductInterface

What it does

This interface defines the data contract for product entities in Magento 2.

Developers use it when working with product data through APIs or repositories to ensure type safety and consistency.

It provides getter/setter methods for core product attributes like SKU, name, price, status, and related data such as product links, custom options, media gallery, and tier prices.

Public Methods

  • getId()
  • setId()
  • getSku()
  • setSku()
  • getName()
  • setName()
  • getAttributeSetId()
  • setAttributeSetId()
  • getPrice()
  • setPrice()
  • getStatus()
  • setStatus()
  • getVisibility()
  • setVisibility()
  • getTypeId()
  • setTypeId()
  • getCreatedAt()
  • setCreatedAt()
  • getUpdatedAt()
  • setUpdatedAt()
  • getWeight()
  • setWeight()
  • getExtensionAttributes()
  • setExtensionAttributes()
  • getProductLinks()
  • setProductLinks()
  • getOptions()
  • setOptions()
  • getMediaGalleryEntries()
  • setMediaGalleryEntries()
  • getTierPrices()
  • setTierPrices()