Magento 2 Order Attributes is not displayed on order email.

Modified on Fri, 21 Apr 2023 at 11:48 AM

When a customer places an order, an email including the information about the order will be sent to notify them. However, currently, the order attributes that you have created are not shown in that email.

This article will guide you on how to add the custom order attributes from the Order Attributes extension to the order email.

First of all, you need to download and install the following custom module because this is a feature that is not available inherently in the Order Attributes extension and needs to be customized. After installation, please redeploy your website so that it can receive the changes.

The next step is to edit the email template for the order email. 

The variables of the order attributes will be in the following format:

  • {{depend order_attribute.oa_test}}
         <p>{{var order_attribute.oa_test_label}} {{var order_attribute.oa_test |raw}}</p>
  • Please replace 'oa_test' with the attribute code that you want to show.

Kindly check out our example:

And here is the result (please note that this is only a test email template, so there are only 2 test variables of Order Attributes)

Hope the above detail resolves your queries. Please feel free to contact us via tickets if we can be of further assistance.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article