Magento2 Extensions – How to Override a Magento 2 Extension Installed Using Composer

extensionsmagento2overrides

I have installed a magento 2 extension via composer. Using composer to install an extension places the file inside of the core vendor file.

File I want to edit:

vendor/extension-vendor/magento2-extention/view/frontend/templates/email/template.phtml

I have tried to place the above path inside of app/code wit hthe following path, but this did not seem to work.

app/code/extension-vendor/magento2-extension/view/frontend/templates/email/template.phtml

If I want to extend the extension that I just installed. How would I do this?

Best Answer

You just need to copy template.phtml in your custom theme at

app/design/frontend/Vendor/yourtheme/Vendor_Module/templates/email/template.phtml

flush cache and try..!