diff --git a/lnbits/extensions/shop/templates/shop/order.html b/lnbits/extensions/shop/templates/shop/order.html index 0df0acb3d..14d14f34f 100644 --- a/lnbits/extensions/shop/templates/shop/order.html +++ b/lnbits/extensions/shop/templates/shop/order.html @@ -94,7 +94,10 @@ - {{p.price}} sats + {{ getAmountFormated(p.price) }} + {{p.price}} sats {% endraw %} @@ -273,6 +276,12 @@ } return obj } + + const mapProductsItems = obj => { + obj.price = (obj.price / 100).toFixed(2) + + return obj + } Vue.component(VueQrcode.name, VueQrcode) const nostr = window.NostrTools new Vue({ @@ -314,6 +323,9 @@ } }, methods: { + getAmountFormated(amount) { + return LNbits.utils.formatCurrency(amount, this.stall.currency) + }, clearMessage() { this.newMessage = '' this.$refs.newMessage.focus() @@ -471,6 +483,10 @@ price: product.price } }) + console.log(this.stall) + if (this.stall.currency != 'sat') { + this.products = this.products.map(mapProductsItems) + } let data = this.$q.localStorage.getItem(`lnbits.shop.data`) || false diff --git a/lnbits/extensions/shop/templates/shop/stall.html b/lnbits/extensions/shop/templates/shop/stall.html index 18b89f37e..78424e26e 100644 --- a/lnbits/extensions/shop/templates/shop/stall.html +++ b/lnbits/extensions/shop/templates/shop/stall.html @@ -284,6 +284,11 @@ {% endblock %} {% block scripts %}