Magento 2 – Transactional Emails Received with Variable Instead of Content

magento2transactional-mail

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.

Best Answer

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 !!