Log in
Interface

ProductCustomOptionInterface

Magento\Catalog\Api\Data\ProductCustomOptionInterface

What it does

This interface defines the contract for product custom options in Magento 2, which are additional choices or fields that merchants can add to products (like text input, file uploads, dropdowns, dates, etc.).

Developers use this to create, retrieve, or manipulate custom options programmatically through APIs, enabling features like personalized text, file uploads, or selectable add-ons that customers can choose when purchasing a product.

Public Methods

  • getProductSku()
  • setProductSku()
  • getOptionId()
  • setOptionId()
  • getTitle()
  • setTitle()
  • getType()
  • setType()
  • getSortOrder()
  • setSortOrder()
  • getIsRequire()
  • setIsRequire()
  • getPrice()
  • setPrice()
  • getPriceType()
  • setPriceType()
  • getSku()
  • setSku()
  • getFileExtension()
  • setFileExtension()
  • getMaxCharacters()
  • setMaxCharacters()
  • getImageSizeX()
  • setImageSizeX()
  • getImageSizeY()
  • setImageSizeY()
  • getValues()
  • setValues()
  • getExtensionAttributes()
  • setExtensionAttributes()