- Iscrizione Conacreis
This commit is contained in:
@@ -34,6 +34,18 @@ function checkifSendEmail() {
|
||||
|
||||
|
||||
module.exports = {
|
||||
sendEmail_base_e_manager: function (idapp, template, to, mylocalsconf, replyTo, transport, previewonly) {
|
||||
this.sendEmail_base(template, to, mylocalsconf, replyTo, transport, previewonly);
|
||||
|
||||
this.sendEmail_base(template, tools.getAdminEmailByIdApp(idapp), mylocalsconf, '', transport, previewonly);
|
||||
|
||||
if (tools.isManagAndAdminDifferent(idapp)) {
|
||||
const email = tools.getManagerEmailByIdApp(idapp);
|
||||
this.sendEmail_base(template, email, mylocalsconf, '', transport, previewonly);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
sendEmail_base: function (template, to, mylocalsconf, replyTo, transport, previewonly) {
|
||||
|
||||
// console.log('mylocalsconf', mylocalsconf);
|
||||
@@ -210,7 +222,8 @@ module.exports = {
|
||||
surname: iscritto.surname,
|
||||
emailto: emailto,
|
||||
iscritto,
|
||||
metodo_pagamento: tools.getPaymentTypesById(iscritto.metodo_pagamento)
|
||||
metodo_pagamento: tools.getPaymentTypesById(iscritto.metodo_pagamento),
|
||||
data_nascita: tools.getstrDate_DD_MM_YYYY(iscritto.dateofbirth)
|
||||
};
|
||||
|
||||
this.sendEmail_base('iscrizione_conacreis/' + lang, emailto, mylocalsconf, tools.getreplyToEmailByIdApp(idapp));
|
||||
@@ -619,7 +632,7 @@ module.exports = {
|
||||
|
||||
sendEmail_OrderProduct: async function (lang, idapp, orders, user) {
|
||||
|
||||
const msginizio = 'Ordine n: ' + orders.numorder + ' ' + user.name + ' ' + user.surname + ' [' + tools.getNomeAppByIdApp(idapp) + ']';
|
||||
const msginizio = 'Ordine n: ' + orders.numorder + ' ' + user.name + ' ' + user.surname;
|
||||
console.log(msginizio);
|
||||
|
||||
await telegrambot.sendMsgTelegramToTheManagers(idapp, msginizio);
|
||||
@@ -642,12 +655,10 @@ module.exports = {
|
||||
|
||||
mylocalsconf = this.replacefields(mylocalsconf);
|
||||
|
||||
const esito = this.sendEmail_base('ecommerce/makeorder/' + lang, mylocalsconf.emailto, mylocalsconf, mylocalsconf.dataemail.email_reply);
|
||||
|
||||
this.sendEmail_base('ecommerce/makeorder/' + lang, tools.getAdminEmailByIdApp(idapp), mylocalsconf, '');
|
||||
this.sendEmail_base_e_manager(idapp, 'ecommerce/makeorder/' + lang, mylocalsconf.emailto, mylocalsconf, mylocalsconf.dataemail.email_reply);
|
||||
|
||||
},
|
||||
sendEmail_Order: async function (lang, idapp, orders, user, ordertype) {
|
||||
sendEmail_Order: async function (lang, idapp, orders, user, ordertype, status) {
|
||||
|
||||
const msginizio = 'INIZIO - sendEmail_Order ' + ordertype + ': ' + tools.getNomeAppByIdApp(idapp);
|
||||
console.log(msginizio);
|
||||
@@ -672,9 +683,15 @@ module.exports = {
|
||||
|
||||
mylocalsconf = this.replacefields(mylocalsconf);
|
||||
|
||||
const esito = this.sendEmail_base('ecommerce/' + ordertype + '/' + lang, mylocalsconf.emailto, mylocalsconf, mylocalsconf.dataemail.email_reply);
|
||||
if ((status !== shared_consts.OrderStatus.CANCELED) && (status !== shared_consts.OrderStatus.RECEIVED)) {
|
||||
const esito = this.sendEmail_base('ecommerce/' + ordertype + '/' + lang, mylocalsconf.emailto, mylocalsconf, mylocalsconf.dataemail.email_reply);
|
||||
|
||||
this.sendEmail_base('ecommerce/' + ordertype + '/' + lang, tools.getAdminEmailByIdApp(idapp), mylocalsconf, '');
|
||||
this.sendEmail_base('ecommerce/' + ordertype + '/' + lang, tools.getAdminEmailByIdApp(idapp), mylocalsconf, '');
|
||||
|
||||
if (tools.isManagAndAdminDifferent(idapp)) {
|
||||
this.sendEmail_base('ecommerce/' + ordertype + '/' + lang, tools.getManagerEmailByIdApp(idapp), mylocalsconf, '');
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user