0

We have one project which has a custom theme in vendor folder. Like vendor/{Vendor}/{custom-theme}/

vendor/{vendorname}/custom-theme/registration.php

<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/Vendor/customtheme',
    __DIR__
);

Now I need to override some files from the custom theme. So I created theme folder in app/code/design as per registation.php

Override `vendor/{vendorname}/{custom-theme}/Magento_Catalog/templates/product/list.phtml

to

app/code/design/Vendor/customtheme/Magento_Catalog/templates/product/list.phtml

But unfortunately, not working.

I know the one way to override vendor custom theme files, create and register new theme with a parent vendor custom theme to make this work.

But I would like to know if there is any other way to work this without creating another theme?

Note: the Custom theme is developed by previous company and they do not provide composer credentials to update custom theme from the composer. So we must override custom vendor theme to app/design/frontend

2
  • After override, you have follow step like php bin/magento setup:upgrade, php bin/magento setup:static-content:deploy -f and all the step Commented Jun 5, 2018 at 5:59
  • @KamleshSolanki We need not run setup:upgrade command for override files. check this: magento.stackexchange.com/a/184927/35758 For confirmation I already run all commands Commented Jun 5, 2018 at 6:02

1 Answer 1

0

There is no way except creating another theme extended from those you need to change in your case. However you may move theme files from vendor folder to app/code/design and treat it as your custom theme as well.

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.