import products dinamically

This commit is contained in:
Surya Paolo
2024-02-06 20:13:06 +01:00
parent dbcd2aee63
commit 3c0f040d92
53 changed files with 1847 additions and 325 deletions

View File

@@ -985,7 +985,7 @@ export const useProducts = defineStore('Products', {
enableAddQty(myorder: IOrder, myproduct: IProduct): boolean {
const globalStore = useGlobalStore()
if (globalStore.site.ecomm && globalStore.site.ecomm.enablePreOrders) {
return (this.getQtyBookableAvailable(myproduct) > 0
return ((this.getQtyBookableAvailable(myproduct) > 0)
&& (myproduct.maxBookableSinglePersQty === 0
|| (myorder.quantitypreordered + 1 < myproduct.maxBookableSinglePersQty))
)
@@ -1011,6 +1011,10 @@ export const useProducts = defineStore('Products', {
step = myproduct.minBuyQty
}
if (step === 0) {
step = 1
}
return step
},