How to add/Insert Extension in magento 2.0?

2019-02-19 11:33发布

I tried to add the external magento-2 extension but I can't add it because I can't find magento-connect in admin side. I think the admin panel doesn't have magento-connect. Do you have any idea about this to share, or a good tutorial that could help?

2条回答
我只想做你的唯一
2楼-- · 2019-02-19 11:57

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.

查看更多
爷的心禁止访问
3楼-- · 2019-02-19 12:01

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.
查看更多
登录 后发表回答