2

enter image description here

As you can see by the screenshot, I am getting variables instead of the actual content in transactional emails. This particular template is the New Order Guest template but this happens with New Order as well. I've modified the template but that didn't work. I looked it up but can't find much related to this issue.

The email sends but I get the variables instead of what should be there. Is there something I am missing?

Thanks.

3
  • You want to display customer firstname? – Rohan Hapani Jul 16 '18 at 19:04
  • Yes, I would like the customer's first name but the billing/shipping information, payment method and date after placed on are also wrong/missing. – Marisa Jul 16 '18 at 19:06
  • please check my answer – Rohan Hapani Jul 16 '18 at 20:11
2

Try to use this :

For customer name :

{{var order.getCustomerName()}}

For Billing Information :

{{var order.getBillingAddress().format('html')}}

For Shipping Information :

{{var order.getShippingAddress().format('html')}} 

For payment method :

{{var order.getPayment().getMethodInstance().getTitle()}}

Hope, It will usefull for you !!

2
  • Thanks. This got me on the right track. The templates were loading the wrong variables so I found the right ones using load default. – Marisa Aug 7 '18 at 16:13
  • Do you have any idea that how to get Guest customer name in credit/shipment email templates? – Faisal Sheikh Jul 27 '20 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.