cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove COMMENT text from Emai from Order Confirmation?

How to remove COMMENT text from Emai from Order Confirmation?

How can we remove COMMENTS text from EMail Order Confirmation? Magento 2.3.M2_new_order_confirmation_comments.pngM2_new_order_confirmation_comments.png

8 REPLIES 8

Re: How to remove COMMENT text from Emai from Order Confirmation?

Hello @R K Solanki 

 

Please remove from your email templates, if do you have this code 

 

{{depend order.getOscOrderComment()}}
     <p>{{var order.getOscOrderComment() |raw}}</p>
{{/depend}}  

 or 

check this 

$order->getStatusHistoryCollection()

 where you are calling. You can change these 2 places.

 

 

Manish Mittal
https://www.manishmittal.com/

Re: How to remove COMMENT text from Emai from Order Confirmation?

@Manish Mittal 
not remove all things, just remove Comments title, in email,
Like, in my email Order Confirmation comments have,

Comments
Test Comment 26_may_2020

i remove Only Comments Text,
but remain "Test Comment 26_may_2020" as it is.



Re: How to remove COMMENT text from Emai from Order Confirmation?

Hello @R K Solanki 

 

Do you know which variable getting comment data? If this is core only then it should be Magento-sales module and there you can check email files.

 

{{depend comment}}

or you can try by enabling template path hints too if it will appear in your email template so you will know which file causing for this string.

Manish Mittal
https://www.manishmittal.com/

Re: How to remove COMMENT text from Emai from Order Confirmation?

@Manish Mittal 
in my case for comment in email order,
{{depend order_data.email_customer_note}}
<table class="message-info" style="background:#fffdd9;border:1px solid #fff866;">
<tr>
<td>
{{var order_data.email_customer_note|escape|nl2br}}
</td>
</tr>
</table>
{{/depend}}

this code is work for print comment on Email,
im Uses New Order(Default) Template

Re: How to remove COMMENT text from Emai from Order Confirmation?

Hello @R K Solanki 

 

Email templates are stored in the <module_dir>/view/<area>/email directory of their respective modules. For example, the template for the new order transactional email for the Sales module is located in <Magento_Sales_module_dir>/view/frontend/email/order_new.html

 

Do not change the default Magento files. If you want to customize the default templates, you should create your custom templates and configure Magento to use them instead of the default templates.

Override email templates by creating templates in a new directory in your custom theme, using this pattern: <theme_dir>/<ModuleVendorName>_<ModuleName>/email. For example, to override the New Order email template, create a template named order_new.html in the <theme_dir>/Magento_Sales/email directory.

 

This is standard to customize email templates. 

Please check below files for comments string:

module-sales/view/frontend/templates/order/comments.phtml

module-sales/view/frontend/templates/order/order_comments.phtml

 

 

Manish Mittal
https://www.manishmittal.com/

Re: How to remove COMMENT text from Emai from Order Confirmation?

Did you ever find out how to edit this?

Re: How to remove COMMENT text from Emai from Order Confirmation?

hlo

Re: How to remove COMMENT text from Emai from Order Confirmation?

I haven't found a solution to this problem suika game anywhere?