Hello,
I’ve extended the call class in the custom calls module in order to add fields to the notification email.
to do that I have used the xtpl in the notification_body function and added my fields.
I have also modified the notification_template.html in custom/include/language/ and succeed to add my fields. I have replicated the first email in the reminder email and it arrives with the right modified html.
The problem is that the reminder email doesn’t have the custom fields I have added…so do I need to add those fields to some other xtpl for the reminder? I have tried to look into the activities module and modify some functions in the emailReminder.php but nothing seems to change!
Hi there thanks for the answer.
Well it works for the normal invite but it didn’t work for the reminder.
Good thins is that I coped to add my fields assigning them directly in the Activities module file EmailReminder.
I have modified the sendReminders function and assigned to the xtpl before the $xtpl->parse($template_name);
Now it works properly just that I would have prefer to extend the class in the custom module…but there is no activities custom module…So perhaps this is not update safe!
Do you think I can extend the emailReminder class in the custom call module and add this stuff?
You can try… I’m not sure what the results will be.
I think that the way this is being called for the reminders (via Schedulers…) is different than for invites:
you can trace what that does afterwards, you’ll see that set_notification_body
isn’t called, so you can’t override it in the same way as for invites and notifications. I suppose it is possible to just override the EmailReminder class methods instead.
I plan to move all this invites/notifications/reminders to a different templating system (like the one I use here) so I’m don’t think it’s worth investing much in improving the current scheme…
thanks @pgr for now I can just modify the emailReminder.php because I can’t quite cope to extend the class neither in the custom call module or replicating the Activities module in the custom folder…maybe as you are saying I could work on the scheduler and maybe let it call my custom emailReminder.php !!
anyway I might try to work on it at some point.
I see your link and there is quite a step forward there but, is that in a github repo? I can’t really see how to get that addon!
It’s not free (yet). See the bottom of that page. You need to Sponsor me on GitHub to get access. The hope is that my SponsorWare scheme takes off and later I will be able to donate all this code into core SuiteCRM, which is where it belongs and where I want it to be (as soon as I can pay my bills)
fair enough I’d say bills first!!!
thanks I think I can advice the company I work for to get this addon for a donation!
will let you know, thanks again!