1

I have made a custom template to use in my order confirmation email template.

I want to get the order data in this template so I can create a custom order grid layout.

I'm not sure on how to do this? Can anyone point me in the right direction?

1
  • Please share your custom template
    – Korbin
    Sep 25, 2018 at 11:50

2 Answers 2

1

Did you check how Magento default templates works?

e.g. Magento_Sales/view/frontend/email

This is an example how to get customer name in email template:

<h1 class="greeting">{{trans "Hello %name," name=$order.getBillingAddress().getName()}}</h1>
2
  • Yeah I have, doesn't really help as that code is generated by Magento. I need to pull the order data manually so I can create a custom layout.
    – Howliee
    Sep 25, 2018 at 11:16
  • Please share more details in your answer like steps.
    – kunj
    Sep 25, 2018 at 11:27
0

To get order details

<h1 class="greeting">{{trans "Hello %name,"
name=$order.getCustomerFirstname()}}</h1>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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