Pipelet UpdateProductOptionSelections
Pipelet UpdateProductOptionSelections
The purpose of this pipelet is to process option value selections, and calculate and return the ProductOptionModels for one or multiple products. Option value selections must be specified as HTTP parameters in the following form: {prefix_}{pid}_optionID={optionValueID}. A custom prefix can be set using the 'CustomPrefix" parameter. Otherwise, the default prefix 'dwopt_' is used. {pid} is the product id. Example: dwopt_PN00049_memory=2GB. For each product specified as {pid}, a ProductOptionModel instance is created and returned as an element of the 'ProductOptionModels' hashmap output parameter. The pipelet validates both option id and option value id and selects the option in the related ProductOptionModel instance. If an option is not specified as HTTP parameter, or the specified optionValueID is invalid, the default option value of this option is selected. Invalid optionIDs are silently ignored. The pipelet returns a map of ProductOptionModels with the product instance as the key and the ProductOptionModel as the value. For compatibility reasons, the pipelet does still accept an individual product instance as input parameter. If specified, the pipelet returns the ProductOptionModel for this product as 'ProductOptionModel' and also as element of the 'ProductOptionModels' hashmap parameter.
Group:
Catalog
Input Parameters
Product  :  Product (Optional)
An optional product instance for which the ProductOptionModel should be updated.
CustomFormPrefix  :  String (Optional)
By default, the pipelet processes form values with the prefix 'dwopt_'. This parameter allows you to specify a custom prefix. This can be useful to process multiple product configuration on one page. In this case, the pipelet could be executed in a loop, whereby the custom prefix could dynamically be build based on the product sku.
Output Parameters
ProductOptionModel  :  ProductOptionModel  :  (Optional)
The updated ProductOptionModel for an individual product instance if it specified.
ProductOptionModels  :  Map  :  (Optional)
A map of updated ProductOptionModels with product as key.