I modified the file Lead.php , precisely I made these changes to the method set_notification_body()
public function set_notification_body($xtpl, $lead)
$xtpl->assign("LEAD_NAME", $locale->getLocaleFormattedName($lead->first_name, $lead->last_name, $lead->salutation));
$xtpl->assign("LEAD_SOURCE", (isset($lead->lead_source) ? $app_list_strings['lead_source_dom'][$lead->lead_source] : ""));
$xtpl->assign("LEAD_STATUS", (isset($lead->status)? $app_list_strings['lead_status_dom'][$lead->status]:""));
I added for testing:
I saved the file Lead.php in /custom/modules/Leads but the changes are not taken.
Should I use the extension framework?
I’m not sure, but it might work with something similar to this
You would make a custom leads module that inherits everything from the other, and redefines that function.
If you get it working, please share here. Thanks
I tried to follow the example… but it didn’t work for me… I tried to look for other articles in the forum like these that were practically very similar to my problem
But they weren’t solved.
It seems that there is no clean upgrade-safe solution. (I don’t want to change the core code of the Lead module, I did it to test it and it works but it should be lost with updates)
I think the best solution to customize the assignment notifications is through WorkFlow, after disabling the default notifications from the system. B-)