ProductOption
Definition of product options
interface ProductOption {
config: ProductOptionConfig | ProductOptionConfig[];
display_name: string;
id: number;
name: string;
option_values: ProductOptionValue[];
product_id: number;
sort_order: number;
type: ProductOptionType;
}Properties
| Name | Required | Type | Description |
|---|---|---|---|
config | Required | ProductOptionConfig | ProductOptionConfig[] | The values for option config can vary based on the Modifier created. |
display_name | Required | string | The name of the option shown on the storefront. |
id | Required | number | The unique numerical ID of the option, increments sequentially. |
name | Required | string | Product option name. |
option_values | Required | ProductOptionValue[] | Array of the possible values for the option |
product_id | Required | number | The unique numerical ID of the product to which the option belongs. |
sort_order | Required | number | Order in which the option is displayed on the storefront. |
type | Required | ProductOptionType | The type of option, which determines how it will display on the storefront. Acceptable values: * radio_buttons, * rectangles, * dropdown, * product_list, * product_list_with_images, * swatch. For reference, the former v2 API values are: * RB = radio_buttons, * RT = rectangles, * S = dropdown, * P = product_list, * PI = product_list_with_images, * CS = swatch. |