2

I've spent several hours reading magento 2's official documentation, and I haven't found how to create a module :

  • The documentation explain the structure of the filesystem, list the files that we can create in some directories (for example here),
  • The exprected content of the composer.json module.xml and registration.php are well explained (several times),
  • I've found some informations about the possibles entries in the configuration files (app/etc/*.xml),
  • But I've didn't found a comprehensive explanation of all the content of the files (controller, view, layout, model, setup, ...). Did I missed something or all this area isn't covered by the doc?

the best ressource found untill now is this one : Creating a Magento admin page (but it do not cover all the need, for example, I want to learn how to add an "array" of custom data about the customer)

edit : I add what I try to do in order to show that it is not covered by the doc : add an "array" of custom data to the customer thoses data will permit to buy or not the products

  • How to add thoses custom data : not covered (I think that I need to alter the data model to add new tables, in the setup file of the module)
  • How to request thoses data in the frontend : not covered
  • How to view/edit those data in the admin : not covered
  • How to let the customer edit thoses data : not covered
  • How to create REST API (wich will permit thoses data to be populated by a remote system) : not covered
1

1 Answer 1

2

"Create a module" is kind of broad as there is different types of modules. Fortunately, Magento 2 team provides a github repository with module samples: https://github.com/magento/magento2-samples

On top of that I suggest you check out the amazing Alan Storm article: http://alanstorm.com/magento_2_mvvm_mvc/

3
  • I mean, I didn't find any words of the expected/possible content of so many files (for example the controller and the block aren't covered at all), I dive in your links now on!
    – Bruno
    Commented Oct 31, 2016 at 10:29
  • thanks, this link permit to learn several apsects not covered by magento's doc. : alanstorm.com/magento_2_mvvm_mvc
    – Bruno
    Commented Nov 2, 2016 at 9:40
  • @bruno feel free to mark your question as answered if you managed to learn what you needed Commented Nov 2, 2016 at 9:42

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.