url(action
:
String, varOptionAndValues
:
Object...)
:
URL
Returns a URL that can be used to select one or more option values.
getOption
Returns the product option for the specified ID.
Parameters:
optionID
-
the product option identifier.
Returns:
the product option for the specified ID.
getOptions
Returns the collection of product options.
Returns:
Collection of Product Options.
getOptionValue
Returns the product option value object for the passed value id and in
the context of the passed option.
Parameters:
option
-
The option to get the specified value for.
valueID
-
The id of the value to retrieve
Returns:
a value for the specified product option and value id
getOptionValues
Returns a collection of product option values for the
specified product option.
Parameters:
option
-
the option for which we want to extract the collection of product option values.
Returns:
a collection of product option values for the specified product option.
getPrice
Returns the effective price of the specified option value.
Parameters:
optionValue
-
the product option value to use.
Returns:
the effective price of the specified option value.
getSelectedOptionValue
Returns the selected value for the specified product option. If no
option values was set as selected option explicitly, the method
returns the default option value for this option.
Parameters:
option
-
The option to get the selected value for.
Returns:
a selected value for the specified product option.
isSelectedOptionValue
Returns true if the specified option value is the one currently selected,
false otherwise.
Parameters:
option
-
the product option.
value
-
the product option value.
Returns:
true if the specified option value is the one currently selected, false otherwise.
setSelectedOptionValue
Updates the selection of the specified option based on the specified value.
Parameters:
option
-
the option to update.
value
-
the value to use when updating the product option.
url
Returns a URL that can be used to select one or more option values. The
optional varOptionAndValues
argument can be empty, or can
contain one or more option / value pairs. This variable list must be even
in length, with options and values alternating. If the list is odd in
length, the last argument will be ignored. Options can be specified as
instances of ProductOption, or String option ID. Values can be specified
as instances of ProductOptionValue or as strings representing the value
ID. If a parameter is invalid, then the parameter pair is not included in
the generated URL. The returned URL will contain options and values
already selected in the product option model, as well as options and
values specified as method parameters. This includes option values
explicitly selected and implicitly selected by default.
Parameters:
action
-
The pipeline action, must not be null.
varOptionAndValues
-
Variable length list of options and values.
Returns:
The constructed URL.
urlSelectOptionValue
Returns an URL that can be used to select a specific value of a specific
option.
Parameters:
action
-
the action to use.
option
-
the option to use when constructing the URL.
value
-
the value to use when constructing the URL.
Returns:
The constructed URL as string.