Class ProductOption

Represents a product option.

Property Summary 

PropertyDescription
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.

Constructor Summary 

This class does not have a constructor, so you cannot create it directly.

Method Summary 

MethodDescription
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.

Methods inherited from class ExtensibleObject 

describe, getCustom

Methods inherited from class PersistentObject 

getCreationDate, getLastModified, getUUID

Methods inherited from class Object 

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

Property Details 

ID 

ID: String (read-only)

Returns the product option ID.


defaultValue 

defaultValue: ProductOptionValue (read-only)

Returns the default value for the product option.


description 

description: String (read-only)

Returns the product option's short description in the current locale.


displayName 

displayName: String (read-only)

Returns the product option's display name in the current locale.


htmlName 

htmlName: String (read-only)

Returns an HTML representation of the option id.


image 

image: MediaFile (read-only)

Returns the product option's image.


optionValues 

optionValues: Collection (read-only)

Returns a collection containing the product option values.


Method Details 

getDefaultValue() 

getDefaultValue(): ProductOptionValue

Returns the default value for the product option.

Returns:

  • the object for the relation 'defaultValue'

getDescription() 

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

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

getHtmlName(): String

Returns an HTML representation of the option id.

Returns:

  • an HTML representation of the option id.

getHtmlName(String) 

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

getID(): String

Returns the product option ID.

Returns:

  • the product option identifier.

getImage() 

getImage(): MediaFile

Returns the product option's image.

Returns:

  • the product option's image.

getOptionValues() 

getOptionValues(): Collection

Returns a collection containing the product option values.

Returns:

  • a collection containing the product option values.