What I know

Overriding a template from vendor/magento/<magento_module> is straight-forward enough. So, to override a magento_catalog file I'd do:


Where I'm stuck

However, 3rd party modules have a different file structure. If I were to override the below file, what would be my directory structure in app/design?


What I've tried

I've tried a few variations like the ones below, but the override file doesn't seem to get read.

  • Did you removed var/view_preprocessed and pub/static after your change and cleared cache?
    – Sohel Rana
    Commented Nov 26, 2018 at 14:49
  • Yup. Caching not the issue.
    – Craig
    Commented Nov 26, 2018 at 15:16
  • What is the module name? Can you show from module.xml?
    – Sohel Rana
    Commented Nov 26, 2018 at 15:24
  • Ebizmarts_SagePaySuite - I've just amended the sensitivity, but no change.
    – Craig
    Commented Nov 26, 2018 at 15:37

1 Answer 1


The folder name inside the theme is taken from the extensions composer.json file under the autoload -> psr4 value.

I have overwritten files for the same extension before and used the file path below:


After making the changes be sure to run php bin/magento setup:upgrade in your web root to clear all static files and then regenerate them.

  • Thanks for confirming DIR. Despite manually clearing caches, bin/magento setup:upgrade did the trick.
    – Craig
    Commented Nov 26, 2018 at 16:40
  • I have a similar need to override a html template in path app/code/MageWorx/SearchSuiteAutocomplete/view/frontend/web/template/autocomplete.html and the theme is app/design/frontend/Codazon/unlimited/drug_pharmacy. I have copied modified file to app/design/frontend/Codazon/unlimited/drug_pharmacy/MageWorx/SearchSuiteAutocomplete/view/frontend/web/template/autocomplete.html . After clearing var/view_preprocessed and pub/static folders, caches and setup:upgrade, still no change is reflected in frontend. Are there any other steps I have to follow. Thanks Commented Nov 27, 2022 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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