- corretto scheda prodotto, record salvato
This commit is contained in:
@@ -1529,7 +1529,7 @@ export const useProducts = defineStore('Products', {
|
||||
replacements['{collana}'] = tools.formatCollane(myproduct.productInfo.idCollana) || '';
|
||||
}
|
||||
|
||||
const maxDescriptionLength = testo.maxlength || 600;
|
||||
const maxDescriptionLength = testo.maxlength || 680;
|
||||
|
||||
if (testo.contenuto.includes('{descrizione_da_fdv}')) {
|
||||
const description = myproduct.productInfo.short_descr || '';
|
||||
@@ -1564,16 +1564,17 @@ export const useProducts = defineStore('Products', {
|
||||
|
||||
if (testo.contenuto.includes('{descrizione_breve_macro}')) {
|
||||
const short_descr = myproduct.productInfo.descrizione_breve_macro || '';
|
||||
replacements['{descrizione_breve_macro}'] = short_descr.length > maxDescriptionLength && maxDescriptionLength > 0
|
||||
replacements['{descrizione_breve_macro}'] = short_descr.length > maxDescriptionLength && maxDescriptionLength > 0
|
||||
? short_descr.substring(0, short_descr.lastIndexOf(' ', maxDescriptionLength)) + '...'
|
||||
: short_descr;
|
||||
}
|
||||
|
||||
if (testo.contenuto.includes('{descr_trafiletto_catalogo}')) {
|
||||
if (testo.contenuto.includes('{descr_trafiletto_catalogo}') || testo.contenuto.includes('{descrizione_completa_macro}')) {
|
||||
const short_descr = myproduct.productInfo.descr_trafiletto_catalogo || '';
|
||||
replacements['{descr_trafiletto_catalogo}'] = short_descr.length > maxDescriptionLength && maxDescriptionLength > 0
|
||||
replacements['{descr_trafiletto_catalogo}'] = short_descr.length > maxDescriptionLength && maxDescriptionLength > 0
|
||||
? short_descr.substring(0, short_descr.lastIndexOf(' ', maxDescriptionLength)) + '...'
|
||||
: short_descr;
|
||||
replacements['{descrizione_completa_macro}'] = replacements['{descr_trafiletto_catalogo}']
|
||||
}
|
||||
|
||||
if (testo.contenuto.includes('{prezzo}') || testo.contenuto.includes('{prezzo_scontato}')) {
|
||||
@@ -1666,7 +1667,7 @@ export const useProducts = defineStore('Products', {
|
||||
case '{debug}':
|
||||
const date_pub = replacements['{date_pub}'] || '';
|
||||
const fatLast6M = myproduct.productInfo.fatLast6M! || 0;
|
||||
const linkvenduti = `<a href="http://vps-88271abb.vps.ovh.net/apimacro/public/view-ordini-by-idarticolo/${myproduct.productInfo.sku}" target="_blank">${replacements['{venduti}']}</a>`;
|
||||
const linkvenduti = `<a href="http://vps-88271abb.vps.ovh.net/apimacro/public/view-ordini-by-idarticolo/${myproduct.productInfo.sku}" target="_blank">${myproduct.productInfo.totVen!}</a>`;
|
||||
const vLast3M = myproduct.productInfo.vLast3M! || 0;
|
||||
const vLast6M = myproduct.productInfo.vLast6M! || 0;
|
||||
const linkfatturati = `<a href="http://vps-88271abb.vps.ovh.net/apimacro/public/view-fatturati-by-idarticolo/${myproduct.productInfo.sku}" target="_blank">${myproduct.productInfo.totFat! || 0}</a>`;
|
||||
|
||||
Reference in New Issue
Block a user