Fix add to cart & prepare for user activation

This commit is contained in:
cond0r
2021-03-03 17:48:11 +02:00
parent f92cfc9605
commit e2368efa95
23 changed files with 329 additions and 177 deletions

View File

@@ -14,6 +14,10 @@ export function getVariant(product: Product, opts: SelectedOptions) {
option.displayName.toLowerCase() === key.toLowerCase()
) {
return option.values.find((v) => v.label.toLowerCase() === value)
} else if (!value) {
return !variant.options.filter(
({ displayName }) => displayName.toLowerCase() === key
).length
}
})
)