如何在magento 2.0中添加/插入扩展? [英] How to add/Insert Extension in magento 2.0?

查看:70
本文介绍了如何在magento 2.0中添加/插入扩展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试添加外部magento-2扩展名,但由于无法在管理端找到magento-connect而无法添加.我认为管理面板没有magento-connect.您对此有什么想法要分享,或者有什么好的教程可以帮助您?

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?

推荐答案

安装Magento 2扩展名是一件容易的事..您只需要提取扩展名zip文件并将该文件夹放在Magento 2应用程序/代码目录中,以便结构应类似于app/code/namespace/module-name

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

然后,您必须运行一些命令来注册您的Magento 2扩展程序

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

Magento 2目录内的打开终端,与应用程序目录平行

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

运行这些命令-

  1. 授予对您的magento 2目录的读写权限

  1. giving read write permission to your magento 2 directory

sudo chmod -R 777/Magento 2文件夹的路径,例如/opt/lampp/htdocs/Training/Magento_2.0

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

如果使用的是Linux操作系统,则必须运行此命令.对于Windows,则没有必要.

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

  1. 用于注册您的扩展程序

  1. for registering your extension

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

用于编译扩展代码

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

现在刷新您的缓存,从Magento 2 var目录中删除缓存文件夹.

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

这篇关于如何在magento 2.0中添加/插入扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆