Carrello con scontistica aggiornata

This commit is contained in:
Surya Paolo
2023-12-18 12:11:22 +01:00
parent 265c8f4d9e
commit c1d60a7260
8 changed files with 41 additions and 13 deletions

View File

@@ -415,11 +415,13 @@ export const useProducts = defineStore('Products', {
if (order.quantity === 0)
order.quantity = 1
neworder = this.createOrderByProduct(product, order)
if (order.idStorehouse) {
neworder = this.createOrderByProduct(product, order)
}
}
if (neworder && !neworder.idStorehouse)
return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, toolsext.ERR_GENERICO, 'Nessuno Store')
// if (neworder && !neworder.idStorehouse)
// return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, toolsext.ERR_GENERICO, 'Nessuno Store')
console.log('addToCart', 'userid=', userStore.my._id, neworder)