aggiornamenti su PCB
This commit is contained in:
@@ -131,11 +131,11 @@ async function completaSettaggioProduct_AndProductInfo(arrcampi_productInfo, arr
|
||||
}
|
||||
|
||||
if (!rec.hasOwnProperty('img') && product.code) {
|
||||
productInfo.imagefile = 'upload/products/' + product.code + '.jpg';
|
||||
productInfo.imagefile = product.code + '.jpg';
|
||||
} else {
|
||||
if (rec.hasOwnProperty('img')) {
|
||||
if (rec['img']) {
|
||||
productInfo.imagefile = 'upload/products/' + rec['img'];
|
||||
productInfo.imagefile = rec['img'];
|
||||
} else {
|
||||
productInfo.imagefile = '';
|
||||
}
|
||||
@@ -823,7 +823,8 @@ router.post('/import', authenticate, async (req, res) => {
|
||||
link: product.link,
|
||||
idCatProds: [],
|
||||
idSubCatProds: [],
|
||||
img: 'upload/products/' + product.code + '.jpg',
|
||||
// img: 'upload/products/' + product.code + '.jpg',
|
||||
imagefile: product.code + '.jpg',
|
||||
weight: product.weight,
|
||||
unit: tools.getIdUnitsByText(product.unit),
|
||||
productTypes: shared_consts.PRODUCTTYPE.PRODUCT,
|
||||
|
||||
@@ -1673,7 +1673,10 @@ async function eseguiDbOp(idapp, mydata, locale, req, res) {
|
||||
await ProductInfo.correggiProductTypes();
|
||||
} else if (mydata.dbop === 'replaceProductImgToImageFile') {
|
||||
|
||||
await ProductInfo.replaceProductImgToImageFile();
|
||||
await ProductInfo.replaceProductImgToImageFile(true);
|
||||
} else if (mydata.dbop === 'removeUploadProducts_Path') {
|
||||
|
||||
await ProductInfo.replaceProductImgToImageFile(false);
|
||||
|
||||
} else if (mydata.dbop === 'correggiCircuitiANull') {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user