Call reminder email notification template

Hello,

Is there an upgrade safe way of adding new custom fields to the email template for call reminders?

I can access the template in include/language/en_us.notify_template.html and customize it by creating custom/include/language/en_us.notify_template.html with the new text and fields. The new text works in the reminder emails, but field values don't (they show as empty). Is there a way to get the field values to work?

Kind regards,

Miska

Parents
  • This can be accomplished by extending the Class of target module (Calls) and override the method set_notification_body accordingly.

    Create an extended Include with content like that:

    $objectList['Calls'] = 'Call';
    $beanList['Calls'] = 'CustomCall';
    $beanFiles['CustomCall'] = 'custom/modules/Calls/Call.php';
    

    Create file custom/modules/Calls/Call.php with content like that, and implement overridden method accordingly:

    class CustomCall extends Call {
        function set_notification_body($xtpl, $call) {
            $xtpl = parent::set_notification_body($xtpl, $call);
    
            // add your code here
    
            return $xtpl;
        }
    }

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
Reply
  • This can be accomplished by extending the Class of target module (Calls) and override the method set_notification_body accordingly.

    Create an extended Include with content like that:

    $objectList['Calls'] = 'Call';
    $beanList['Calls'] = 'CustomCall';
    $beanFiles['CustomCall'] = 'custom/modules/Calls/Call.php';
    

    Create file custom/modules/Calls/Call.php with content like that, and implement overridden method accordingly:

    class CustomCall extends Call {
        function set_notification_body($xtpl, $call) {
            $xtpl = parent::set_notification_body($xtpl, $call);
    
            // add your code here
    
            return $xtpl;
        }
    }

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
Children
  • Hi André,

    Thanks for your reply. Just to clarify, I'm under the impression that set_notification_body() in Call class is used for the assignment notifications but not for the email reminders. Am I mistaken?

    Users can request an email reminder (or a pop-up reminder) before a call starts when editing a call:

    At least the reminder email uses a different template than the assignment notification email.

    Kind regards,

    Miska