How to add/Insert Extension in magento 2.0?

时间秒杀一切 提交于 2019-12-01 10:52:27
CedCommerce

Installing Magento 2 extension is an easy task .. you just need to extract your extension zip file and place the folder inside your Magento 2 app/code directory so that the structure should be like app/code/namespace/module-name

then you have to run some commands for registering your Magento 2 extension

open terminal inside your Magento 2 directory, parallel to the app directory

run these commands-

  1. giving read write permission to your magento 2 directory

    sudo chmod -R 777 /path of Magento 2 folder such as /opt/lampp/htdocs/Training/Magento_2.0

if you are using linux operating system then you have to run this command . for windows it is not necessary.

  1. for registering your extension

    /opt/lampp/bin/php bin/magento module:enable Namespace_Modulename /opt/lampp/bin/php bin/magento setup:upgrade

  2. for compiling your extension code

    /opt/lampp/bin/php bin/magento setup:di:compile

now flush your cache , delete cache folder from your Magento 2 var directory.

This full feature is coming soon, but you can test it with sample data.

  1. You need to install magento without sample data, via composer create project as specified here.
  2. Login to admin and navigate to System and look for Web Setup Wizard under tools.
  3. Navigate to Magento Marketplace and enter your authentication keys for magento.com as specified here.
  4. If you navigate back to component manager and click sync(this step may take a while), "purchases" made in the marketplace will eventually show up here. This is still WIP.
  5. For now, you can test it with sample data modules. Under New Purchases it should show number of new modules(for now 20 for the number of sample-data modules). If you click install below that, you should be able to see a list of sample-data modules that can be installed.
  6. Select the modules you want to install and click the install button on the upper left side of the grid. Or install one component at a time.
  7. There will be a dependency check(which takes a while), based on composer that checks newly required components. This step requires cron to be setup. Instructions here
  8. Next, you can optionally create a backup, and then finally install component, which is done via the crons setup in previous step and composer.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!