2

In Magento 2 you can install themes and extensions through composer and they end up in the vendor folder.

What if I want to make customisation to that template/extension?

Do I copy the code over to app/code or app/design or do I create a complete composer package for the custom extension/template based on the original one and push this to a private repo?

But what if we do it on the composer way, how would we go about when the original extension/module receives updates that we install through composer? Any way of maintaining your own extension/template then?

Fabian Schmengler
66.2k25 gold badges191 silver badges422 bronze badges
asked Jun 19, 2017 at 9:11

1 Answer 1

0

create a complete composer package for the custom extension/template based on the original one and push this to a private repo?

Forking the repository like this is possible, but then you become the maintainer and need to merge changes from upstream to receive updates.

The preferred approach is to make customizations without changing the original code, using the same mechanism that extensions and themes use to customize the core:

  1. Theme inheritance for themes: http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/themes/theme-inherit.html
  2. Dependency injection (http://devdocs.magento.com/guides/v2.1/extension-dev-guide/depend-inj.html) and plugins (http://devdocs.magento.com/guides/v2.1/extension-dev-guide/plugins.html) for extensions
answered Jun 22, 2017 at 13:15

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.