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 |
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 |
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 |
Returns:
- Indicates whether this price refinement value is selected
- Type
- boolean