From c4e2b76d65a11114dd2380e6c3afbc4336b1d48f Mon Sep 17 00:00:00 2001 From: Surya Paolo Date: Wed, 17 Jan 2024 11:13:19 +0100 Subject: [PATCH] risolto qtaminima "|" era sbagliato, corretto: product.minBuyQty || 1 --- src/components/CSingleCart/CSingleCart.ts | 4 ++-- src/store/Products.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/CSingleCart/CSingleCart.ts b/src/components/CSingleCart/CSingleCart.ts index e5fa2e65..db0c49ad 100755 --- a/src/components/CSingleCart/CSingleCart.ts +++ b/src/components/CSingleCart/CSingleCart.ts @@ -95,7 +95,7 @@ export default defineComponent({ } } - function addsubqty(addqty: boolean, subqty: boolean) { + async function addsubqty(addqty: boolean, subqty: boolean) { if (products.isQtyAvailableByOrder(props.order)) { if (addqty) { if (props.order.quantity >= 100) @@ -121,7 +121,7 @@ export default defineComponent({ } } - products.addSubQtyToItem({ + return await products.addSubQtyToItem({ addqty, subqty, order: props.order, diff --git a/src/store/Products.ts b/src/store/Products.ts index c92de05f..27f13423 100755 --- a/src/store/Products.ts +++ b/src/store/Products.ts @@ -660,11 +660,11 @@ export const useProducts = defineStore('Products', { } } else { if (this.isQtyAvailableByProduct(product)) { - order.quantity = product.minBuyQty | 1 + order.quantity = product.minBuyQty || 1 order.quantitypreordered = 0 } else { if (this.isInPreorderByProduct(product)) { - order.quantitypreordered = product.minBuyQty | 1 + order.quantitypreordered = product.minBuyQty || 1 order.quantity = 0 } }