Hello everyone,
I am trying to add custom variables in Customer Notifications → Order Summary. So, I did this for now:
- inside my_changes addon I have register a hook named
notification_event_send_beforein init.php file. - Inside my
func.phpfile I have my code, doing queries and everything… and return it to the$dataarray.
function fn_my_changes_notification_event_send_before(
$event_id,
$transport,
&$data,
&$notification,
&$template_code
) {
...
$data['order']['carrier_name'] = 'Carrier Name';
...
}
After all these, I have added to my Order Summary Notification, the field:
{o.carrier_name}
but does not display anything… I tried to display an:
error_log("------------- data ---------------");
in order to be sure that the PHP Hook is fired… but I could not find this log anywhere…
Could anyone give me a hint or tip, in order to add custom order variables in notifications ? I have attached a screenshot to understand better
Thank you for your time!
