How to add comments into the email order confirmations
How to add comments into the email order confirmations
- Step 1: Get the order attribute code
- Step 2: Create the email templates
- Step 3: Apply the email templates
- Step 4: Check emails
In order to add the comments that customers insert at the One Step Checkout page into the Email order confirmations, stores’ admin need to do the following steps:
Step 1: Get the order attribute code
- For the
Comment
field, we set the attribute code isosc_order_comment
Step 2: Create the email templates
- Go to
Marketing > Communications > Email Template
, chooseAdd New Template
(orEdit Template
)
- Load Email New Order Templates
- Insert the Order Attribute into Template at any place following this codes:
{{depend order.getOscOrderComment()}}
<p>{{var order.getOscOrderComment() |raw}}</p>
{{/depend}}
Depend
tag is used to check whether that attribute is empty or not. If it is empty, thehtml
part will be eliminated.OscOrderComment
is the capital words of each Attribute code.
Step 3: Apply the email template that has been created.
-
Navigate to
Stores > Settings > Configuration
, choose tabSales > Sales Emails
-
In
New Order Confirmation Template
, choose Email Template that you have created.
Step 4: Check the emails again
- Enable customers to Place Order at Frontend
- Allow checking the emails that customers received from your stores.
Back Ask Mageplaza