fix problema sul caricamento della home da offline...
This commit is contained in:
@@ -1670,7 +1670,7 @@ const msg_it = {
|
||||
},
|
||||
ecomm: {
|
||||
already_in_cart: 'Questo prodotto è stato già aggiunto al Carrello',
|
||||
area_personale: 'Devi prima accedere alla tua Area Personale',
|
||||
area_personale: 'Per poter fare un Ordine occorre essere Registrate ed accedere con le proprie credenziali (username e password)',
|
||||
prodotto: 'prodotto',
|
||||
prodotti: 'prodotti',
|
||||
prod_sul_carrello: '{qty} {strprod} sul Carrello',
|
||||
|
||||
@@ -107,7 +107,7 @@ export const useProducts = defineStore('Products', {
|
||||
catprods: [],
|
||||
subcatprods: [],
|
||||
productInfos: [],
|
||||
userActive: {username: '', name: '', surname: '', _id: ''},
|
||||
userActive: { username: '', name: '', surname: '', _id: '' },
|
||||
}),
|
||||
|
||||
getters: {
|
||||
@@ -575,6 +575,9 @@ export const useProducts = defineStore('Products', {
|
||||
if (!globalStore.site.confpages.enableEcommerce)
|
||||
return null
|
||||
|
||||
if (!this.userActive._id)
|
||||
return null
|
||||
|
||||
// if (this.userActive._id === '') {
|
||||
// return new Types.AxiosError(0, null, 0, '')
|
||||
// }
|
||||
@@ -759,6 +762,9 @@ export const useProducts = defineStore('Products', {
|
||||
if (!globalStore.site.confpages.enableEcommerce)
|
||||
return null
|
||||
|
||||
if (!this.userActive._id)
|
||||
return null
|
||||
|
||||
let ris = null
|
||||
|
||||
ris = await Api.SendReq('/cart/' + this.userActive._id + '/createorderscart', 'POST', { cart_id, status, note, options: this.getOptions() })
|
||||
|
||||
Reference in New Issue
Block a user