Home > widget-integration > QuickViewController > variantHasOptionValue
QuickViewController.variantHasOptionValue() method
Whether variant carries optionValue in the swatch group at optionIndex.
Checking the position rather than the whole variant is what keeps a value name shared by two options (e.g. "GREY" under both "Rubber Color" and "Product Color") from matching in the wrong group. The comparison ignores case because the label text and the API value can differ in casing.
Signature:
protected variantHasOptionValue(variant: PreOrderVariant, optionIndex: number, optionValue: string): boolean;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
variant | ||
|
optionIndex |
number | |
|
optionValue |
string |
Returns:
boolean