MixVariantPicker
Props
Name | Description | Type | Required | Default |
---|---|---|---|---|
variants | A list of variants (VariantType from the API) | Array | true | - |
variantsData | Variants picker data. A object consisting of variantDimensions, chosenSku and hasMultipleDimensions passed from MixVariantHandler | Object | true | - |
title | The title for the picker | String | true | - |
Events
Event Name | Description | Parameters |
---|---|---|
close-content-panel | - | - |
changeSku | Sku variant is changed | chosen sku data (Object) |
replaceProduct | Non sku variant is changed | prod alias (String) |
Methods
Method | Description | Parameters |
---|---|---|
getChosenValue | Get chosen value for specified level | level (Number) |
getStock | Get stock status text for variant provided | variant (Object) |
chooseVariant | Choose variant. Emits relpaceProduct for non sku variants and changeSku for sku variants | variant (Object) |
getModifiers | Get modifier classes for variant choice button | variant (Object) |
Computed
Computed | Type | Description | From Store |
---|---|---|---|
variantTypeColor | Boolean | Is variants of type color? | No |
chosenLabel | String | Label of the chosen variant | No |
variantsLevel | Number | Level of current variants | No |
chosenVariant | Object | Currently chosen variant | No |
chosenHex | String | Currently chosen hex attribute if available | No |
chosenSku | Object | Chosen sku object | No |
MixIns
MixIn |
---|
MixStockHandler |