Log in
Interface

ProductCustomOptionInterface

Magento\Catalog\Api\Data\ProductCustomOptionInterface

What it does

This interface defines the structure for product custom options in Magento 2, allowing developers to create customizable product configurations like text fields, file uploads, dropdowns, checkboxes, and date selections.

It provides methods to manage option properties including title, type, price, SKU, validation rules, and associated values.

Developers use this when working with product customization features through the API or when extending custom option functionality.

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()