SFRA Server-side Javascript - Class: VariationAttributesModel menu

SFRA / Server-side JS / Class: VariationAttributesModel

VariationAttributesModel

Get a list of available attributes that matches provided config

Constructor

new VariationAttributesModel(variationModel, attrConfig, selectedOptionsQueryParams, quantity)

Parameters:
Name Type Description
variationModel dw.catalog.ProductVariationModel

current product variation

attrConfig Object

attributes to select

Properties
Name Type Description
attributes Array

an array of strings,representing the id's of product attributes.

attributes string

If this is a string and equal to '*' it signifies that all attributes should be returned. If the string is 'selected', then this is comming from something like a product line item, in that all the attributes have been selected.

endPoint string

the endpoint to use when generating urls for product attributes

selectedOptionsQueryParams string

Selected options query params

quantity string

Quantity selected

Source: