- aggiungo campo "sfuso"

- aggiunto totale al carrello
This commit is contained in:
Surya Paolo
2024-02-11 16:33:07 +01:00
parent b2d6b25539
commit 07a37f20f9
5 changed files with 9 additions and 3 deletions

View File

@@ -2043,6 +2043,7 @@ export const colTableProductInfos = [
AddCol({ name: 'weight', label_trans: 'products.weight', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'weight_lordo', label_trans: 'products.weight_lordo', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'vegan', label_trans: 'products.vegan', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'sfuso', label_trans: 'products.sfuso', fieldtype: costanti.FieldType.boolean }),
AddCol({
name: 'unit', label_trans: 'products.unit',
fieldtype: costanti.FieldType.select, jointable: 'units',

View File

@@ -880,8 +880,11 @@ export const useProducts = defineStore('Products', {
if (qta > 1 || qta === 0)
strprod = t('ecomm.prodotti')
if (qta >= 0) {
msg = t('ecomm.prod_sul_carrello', { strprod, qty: qta })
let totalPrice = this.cart.totalPrice ? this.cart.totalPrice.toFixed(2): 0
let tot = totalPrice + ' €'
msg = t('ecomm.prod_sul_carrello', { strprod, qty: qta, tot })
}
}