Log in
Interface

CustomOptionInterface

Magento\Catalog\Api\Data\CustomOptionInterface

What it does

This interface defines the contract for handling custom product options selected by customers when adding items to cart.

Developers use this to work with option IDs and values that represent customer choices for customizable products (like text fields, dropdowns, or file uploads).

It's primarily used when processing cart items with custom options or retrieving option data from orders.

Public Methods

  • getOptionId()
  • setOptionId()
  • getOptionValue()
  • setOptionValue()
  • getExtensionAttributes()
  • setExtensionAttributes()