2

In Magento 1 we can check the code structure from the core files(app/code/core).

How to check the Magento 2 core files fore coding structure?

5

In Magento 1, core files of modules are loacated at app/code/core

For example, core files of catalog module are located at

app/code/core/Mage/Catalog

While in Magento 2, core files of catalog module are located at

vendor/magento/module-catalog

In Magento 1, core files of theme are located at app/design/frontend(adminhtml)

For example, core design files of catalog module are located at

app/design/frontend(adminhtml)/base/default/template/catalog

And css, js, images are located at

skin/frontend/base/default/(CSS, images, js)

While in Magento 2, all code, design, js, CSS files are located in one place

vendor/magento/module-catalog/view/frontend(adminhtml)/templates // Phtml files

vendor/magento/module-catalog/view/frontend(adminhtml)/layout // Layout xml files

vendor/magento/module-catalog/view/frontend(adminhtml)/web // Images, html, js, css files

| improve this answer | |
2

In Magento2 you can check core files from Vendor/Magento then specific module directory and its files.

Lets say you may would like to see catalog module code then you need to located at Vendor/Magento/module-catalog

Refer this link for more details - https://darshanbhavsar.wordpress.com/2015/02/03/magento-2-directory-structure/

| improve this answer | |
2
  1. To check the core files, you need to go vendor/magento folder.
  2. Here can find different modules for different sections
| improve this answer | |
2

Core files path in Magento 2: vendor/magento folder.

You can access different modules likes

  • vendor/magento/module-catalog : Catalog

  • vendor/magento/module-checkout : Checkout

  • vendor/magento/module-cms : CMS

  • vendor/magento/module-customer : Customer

And many more....

To make any changes in core file you need to copy module and follow the structure as follows:

Layout - app/design/frontend/ThemePackage/Theme/Magento_Catalog/layout/..... (with xmls)

Templetes - app/design/frontend/ThemePackage/Theme/Magento_Catalog/templates/..... (with phtmls)

Block/Model/Controller - You need to override in your Package app/code/Package/Module

| improve this answer | |
1

You can check your core files in vendor/magento folder in Magento 2. There are different modules for different sections like for catalog section we have module-catalog.

| improve this answer | |
1

Core Modules

/vendor/magento/

Code base of your custom module

/app/code/<Vendor>/<Module>

Custom theme files (storefront)

/app/design/frontend/<Vendor>/<theme>

Custom theme files (modules)

<Module>/<theme>

If you want to use a library

/lib/<Vendor_Library>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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