i want to know how model functions work in email templates.
In the template original functions are called like
I extended the order model, so i added a function getCustomerNameFormal()
When debug the function prepareTemplate in the class Model/Order/Email/Sender/OrderSender.php, the order object is extended and i can call my new function.
The templateVars order has this function, too.
But when i try to call this in the email template, i dont get a result.
but nothing works.
Is it possible to get this working? I have a solution with observer, but there i have to add the variable to each email sender. I want to get the function global on the order object.
Can it be that in email templates i can only call the functions specified in the OrderInterface?
Hope someone can help me with this problem.