I have a custom module that needs to overwrite the new order email template, the location for the default email template is


and this file get the data from


I need to override these two files from my custom module but I don't know how to do it

  • 1
    You can overrider email template using your custom theme Magento_Sales/email/order_new.html and block file using di.xml file – Rakesh Jesadiya Feb 8 '17 at 7:20
  • @Rakesh how to do it in custom module? – simple guy Feb 8 '17 at 7:24
  • 1
    for email template i dont know how to override using custom module. – Rakesh Jesadiya Feb 8 '17 at 7:27
  • I found that the best way to do this is through an event observer. More details in the accepted answer here: magento.stackexchange.com/questions/159142/… – David Fiaty Nov 8 '17 at 16:58
  • @David, were you able to change the sales order email template by overriding in custom module? If so then please share the code snippet, I need to do the same but unable to achieve it – Shireen N Jul 18 '18 at 9:47

Your override file path is incorrect.

You have to just override order_new.html file at below location.


Clear & Flush the Cache by using below command:-

sudo php bin/magento cache:clean
sudo php bin/magento cache:flush

Create the order_new.html file in your module, path:app/code/{VendorName}/{PackageName}/view/frontend/email/

And do your customization.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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