cancel
Showing results for 
Search instead for 
Did you mean: 

how to add a comment on the order confirmation email?

SOLVED

how to add a comment on the order confirmation email?

Hello,
i have a question that how to add order comments on the order confirmation email?
abc.png

1 ACCEPTED SOLUTION

Accepted Solutions

Re: how to add a comment on the order confirmation email?

Hi @R K Solanki 

 

ok understood!

 

So to get the order comments from the admin panel first you will require to fetch the order status history  as backend comments are part of the order status so you will require to use -  getStatusHistoryCollection function by utilizing the orderFactory class.

 

Refer this link to get the comments from the database - https://magento.stackexchange.com/questions/203033/order-to-get-comment-field-details-from-db-in-mag... 

 

Now to add the same in your email, you will require to pass the specific variable into the email template for this I would suggest you to refer this link - https://www.mageplaza.com/faqs/how-add-comment-email-order-confirmations.html 

 

For frontend side adding the comments box on checkout page, there is a free module available so you can utilize the same - https://github.com/boldcommerce/magento2-ordercomments 

 

Hope it helps !

 

 

if issue solved,Click Kudos & Accept as Solution

View solution in original post

5 REPLIES 5

Re: how to add a comment on the order confirmation email?

Hi @R K Solanki 

 

What kind of order comments would like to add in the email ? is the one which is added from the admin among each order while doing fulfillment?

 

or you have the comment box at checkout screen where users can enter their comments for those specific orders?

 

So which one you would like to showcase ?

 

 

if issue solved,Click Kudos & Accept as Solution

Re: how to add a comment on the order confirmation email?

Hello @Manthan Dave ,
can we do both the way in Magento 2.3?
if yes then i want do both way.
Thanks.

Re: how to add a comment on the order confirmation email?

Hi @R K Solanki 

 

ok understood!

 

So to get the order comments from the admin panel first you will require to fetch the order status history  as backend comments are part of the order status so you will require to use -  getStatusHistoryCollection function by utilizing the orderFactory class.

 

Refer this link to get the comments from the database - https://magento.stackexchange.com/questions/203033/order-to-get-comment-field-details-from-db-in-mag... 

 

Now to add the same in your email, you will require to pass the specific variable into the email template for this I would suggest you to refer this link - https://www.mageplaza.com/faqs/how-add-comment-email-order-confirmations.html 

 

For frontend side adding the comments box on checkout page, there is a free module available so you can utilize the same - https://github.com/boldcommerce/magento2-ordercomments 

 

Hope it helps !

 

 

if issue solved,Click Kudos & Accept as Solution

Home Repair Grants for Single Moms

usa-grant.com website aims to provide information to people in need by providing information related to various government programs. This website offers knowledge about Free government grants by the Federal government across the USA. support. Home Repair Grants for Single Moms

Re: Home Repair Grants for Single Moms

Thanks, for help.