Log in
Interface

CostInterface

Magento\Catalog\Api\Data\CostInterface

What it does

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

Developers use it when working with product cost information across different store views, allowing them to get/set the cost value, associated SKU, and store ID.

It's commonly used in inventory management, pricing operations, and when integrating with third-party systems that need to sync product cost data.

Public Methods

  • setCost()
  • getCost()
  • setStoreId()
  • getStoreId()
  • setSku()
  • getSku()
  • getExtensionAttributes()
  • setExtensionAttributes()