Class ProductOption
Represents a product option.
| Property | Description |
|---|---|
ID: String (read-only) | Returns the product option ID. |
defaultValue: ProductOptionValue (read-only) | Returns the default value for the product option. |
description: String (read-only) | Returns the product option's short description in the current locale. |
displayName: String (read-only) | Returns the product option's display name in the current locale. |
htmlName: String (read-only) | Returns an HTML representation of the option id. |
image: MediaFile (read-only) | Returns the product option's image. |
optionValues: Collection (read-only) | Returns a collection containing the product option values. |
This class does not have a constructor, so you cannot create it directly.
| Method | Description |
|---|---|
| getDefaultValue() | Returns the default value for the product option. |
| getDescription() | Returns the product option's short description in the current locale. |
| getDisplayName() | Returns the product option's display name in the current locale. |
| getHtmlName() | Returns an HTML representation of the option id. |
| getHtmlName(String) | Returns an HTML representation of the option id with the custom prefix. |
| getID() | Returns the product option ID. |
| getImage() | Returns the product option's image. |
| getOptionValues() | Returns a collection containing the product option values. |
getCreationDate, getLastModified, getUUID
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
- ID: String
(read-only) Returns the product option ID.
- defaultValue: ProductOptionValue
(read-only) Returns the default value for the product option.
- description: String
(read-only) Returns the product option's short description in the current locale.
- displayName: String
(read-only) Returns the product option's display name in the current locale.
- htmlName: String
(read-only) Returns an HTML representation of the option id.
- image: MediaFile
(read-only) Returns the product option's image.
- optionValues: Collection
(read-only) Returns a collection containing the product option values.
- getDefaultValue(): ProductOptionValue
Returns the default value for the product option.
Returns:
- the object for the relation 'defaultValue'
- getDescription(): String
Returns the product option's short description in the current locale.
Returns:
- The value of the short description in the current locale, or null if it wasn't found.
- getDisplayName(): String
Returns the product option's display name in the current locale.
Returns:
- The value of the display name in the current locale, or null if it wasn't found.
- getHtmlName(): String
Returns an HTML representation of the option id.
Returns:
- an HTML representation of the option id.
- getHtmlName(prefix: String): String
Returns an HTML representation of the option id with the custom prefix.
Parameters:
- prefix - a custom prefix for the html name.
Returns:
- an HTML representation of the option id.
- getID(): String
Returns the product option ID.
Returns:
- the product option identifier.
- getImage(): MediaFile
Returns the product option's image.
Returns:
- the product option's image.
- getOptionValues(): Collection
Returns a collection containing the product option values.
Returns:
- a collection containing the product option values.