fix NaN in cart total

This commit is contained in:
Tiago Vasconcelos 2022-12-30 10:00:11 +00:00
parent 91afd69a95
commit 0fdc13666f

View file

@ -338,7 +338,6 @@
let zoneCost = this.stall.zones.find( let zoneCost = this.stall.zones.find(
z => z.value == this.checkoutDialog.data.shippingzone z => z.value == this.checkoutDialog.data.shippingzone
) )
console.log(+this.cart.total, zoneCost.cost)
return +this.cart.total + zoneCost.cost return +this.cart.total + zoneCost.cost
} }
}, },
@ -367,7 +366,6 @@
}) })
).data ).data
this.exchangeRate = rate[this.unit] this.exchangeRate = rate[this.unit]
console.log(this.exchangeRate)
} catch (error) { } catch (error) {
LNbits.utils.notifyApiError(error) LNbits.utils.notifyApiError(error)
} }
@ -397,7 +395,7 @@
icon: 'thumb_up' icon: 'thumb_up'
}) })
this.cart.products = prod this.cart.products = prod
this.updateCart(item.price) this.updateCart(+item.price)
}, },
removeFromCart() {}, removeFromCart() {},
updateCart(price) { updateCart(price) {