Script: Class dw.catalog.ProductOption

Class ProductOption

Represents a product option.

Properties

defaultValue : ProductOptionValue Read Only

The default value for the product option.

description : String Read Only

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

displayName : String Read Only

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

htmlName : String Read Only

An HTML representation of the option id.

ID : String Read Only

The product option ID.

image : MediaFile Read Only

The product option's image.

optionValues : Collection Read Only

A collection containing the product option values.

Constructor Summary

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

Method Summary

getDefaultValue() : ProductOptionValue

Returns the default value for the product option.

getDescription() : String

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

getDisplayName() : String

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

getHtmlName() : String

Returns an HTML representation of the option id.

getHtmlName(prefix : String) : String

Returns an HTML representation of the option id with the custom prefix.

getID() : String

Returns the product option ID.

getImage() : MediaFile

Returns the product option's image.

getOptionValues() : Collection

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

Method Detail

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

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.