Skip to main content

MixVariantHandler

Handling all product variant data. Expects product object to work with. Is using MixStockHandler Data: chosenSku: { id: null, value: '' }

Methods

MethodDescriptionParameters
setDefaultSkuFunction to set default sku when no variants exists-
setSkuSet chosenSku object valuesid (Number), value (String)
resetSkuResets chosenSku-
checkForProductVariantLooks for the product variant level until found and then returns the current Product variantvariants (Array)
getCurrentVariantGet the current chosen variant for the passed in variants levelvariants (Array)

Computed

ComputedTypeDescriptionFrom Store
baseVariantsArrayA list of variants on the base level of variants dataNo
hasVariantsBooleanDoes more than one base variant exist?No
currentBaseVariantObjectCurrent variant on the base levelNo
baseVariantTypeStringType of the current base level variantNo
hasMultipleDimensionsBooleanDoes more than one dimension of variants exist on this product?No
secondDimensionVariantsArrayList of the second dimension variants for the current variantNo
currentSecondDimensionVariantObjectThe currently chosen variant on the second dimension levelNo
secondDimensionVariantTypeStringThe type of the current second dimension variantNo
currentProductVariantObjectThe variant object for the current productNo
skuVariantsArrayThe list of sku variants for the current productNo
hasSkuVariantsBooleanDoes more than one sku variants exist for current product?No
skuIsChosenBooleanIs a sku chosen?No
chosenSkuVariantObjectThe variant object for the chosen skuNo
chosenSkuStockNumberThe stock total for the chosen skuNo
chosenSkuIdNumberId for the chosen sku, used for watchingNo
currentStockNumberReturn total stock quantity based on chosen sku variant or else product total stock. Overriding currentStock from MixStockHandlerNo
variantPickerDataObjectThe object of data needed by the variant pickers to work properlyNo

MixIns

MixIn
MixStockHandler