menu

SFRA / Server-side JS / Class: PriceAttributeValue

PriceAttributeValue

Color attribute refinement value model

Constructor

new PriceAttributeValue(productSearch, refinementDefinition, refinementValue)

Parameters:
Name Type Description
productSearch dw.catalog.ProductSearchModel

ProductSearchModel instance

refinementDefinition dw.catalog.ProductSearchRefinementDefinition

Refinement definition

refinementValue dw.catalog.ProductSearchRefinementValue

Raw DW refinement value

Source:

Methods

getUrl(productSearch, actionEndpoint, selected, valueFrom, valueTo) → {string}

Forms URL for this price refinement value

Parameters:
Name Type Description
productSearch dw.catalog.ProductSearchModel

ProductSearchModel instance

actionEndpoint string

Resource URL for Search

selected boolean

Indicates whether this value has been selected

valueFrom number

Start of price refinement range

valueTo number

End of price refinement range

Source:
Returns:
  • URL to select/deselect a price bucket refinement value
Type
string

isSelected(productSearch, valueFrom, valueTo) → {boolean}

Determines whether this price refinement value has been selected

Parameters:
Name Type Description
productSearch dw.catalog.ProductSearchModel

ProductSearchModel instance

valueFrom number

Start of price refinement range

valueTo number

End of price refinement range

Source:
Returns:
  • Indicates whether this price refinement value is selected
Type
boolean