如何在 Magento 2 上安装扩展
How to install extensions on Magento 2
我正在尝试为我的 Magento 商店安装扩展程序。我的版本是
Magento 版2.1.15。现在,当我安装扩展时,它在 Stores->Configuration->Advanced->Advanced
中不可见
这是我安装扩展程序所遵循的步骤
1.Extracted my extension folder into my root
2.php bin/magento setup:upgrade
3.php bin/magento setup:di:compile
4.php bin/magento cache:clean
但我仍然无法在我的商店中找到该扩展程序。是什么原因导致的,因为我在任何地方都没有看到任何错误?
PS:我刚开始使用 Magento。
Acl.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Backend::admin">
<resource id="GlobalSms_Notify::sms" title="GlobalSms" sortOrder="100">
<resource id="GlobalSms_Notify::config" title="Config" sortOrder="10" />
</resource>
<resource id="Magento_Backend::stores">
<resource id="Magento_Backend::stores_settings">
<resource id="Magento_Config::config">
<resource id="GlobalSms_Notify::sms_config" title="Configuration" />
</resource>
</resource>
</resource>
</resource>
</resources>
</acl>
</config>
system.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Magento/Config/etc/system_file.xsd">
<system>
<tab id="globalsms_notify" sortOrder="2000">
<label>GlobalSms</label>
</tab>
<section id="globalsms_notify_configuration" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Basic Configuration</label>
<tab>globalsms_notify</tab>
<resource>GlobalSms_Notify::sms</resource>
<group id="basic_configuration" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label><![CDATA[Basic Configuration <i>Setting API Account</i>]]></label>
<field id="notify_username" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enter GlobalSms Username</label>
<comment>Enter your GlobalSms SMS API Username</comment>
<tooltip>Your username must be the same as your GloablSms api username</tooltip>
<validate>required-entry</validate>
</field>
<field id="notify_password" type="password" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enter GlobalSms Password</label>
<comment>Enter your GlobalSms SMS API Password</comment>
<tooltip>Your password must be the same as your GlobalSms api password</tooltip>
<validate>required-entry</validate>
</field>
</group>
</section>
</system>
</config>
我问只是因为你明确地说:
PS: I just started working on Magento.
您是将模块提取到 magentoroot/app/code/Vendor/Module
(它所属的位置)还是提取到 magento 根目录?
如果在magentoroot/app/code/Vendor/Module
下检查你的模块是否注册正确
bin/magento module:status
如果您的模块没有显示(启用或禁用),则您缺少一些样板文件,即 /Vendor/Module/
中的 registration.php
或 /Vendor/Module/etc
文件夹中的 module.xml
。
如果它出现在禁用模块下,请使用 bin/magento module:enable Vendor_Module
和 运行
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:clean
之后。
我正在尝试为我的 Magento 商店安装扩展程序。我的版本是 Magento 版2.1.15。现在,当我安装扩展时,它在 Stores->Configuration->Advanced->Advanced
中不可见这是我安装扩展程序所遵循的步骤
1.Extracted my extension folder into my root
2.php bin/magento setup:upgrade
3.php bin/magento setup:di:compile
4.php bin/magento cache:clean
但我仍然无法在我的商店中找到该扩展程序。是什么原因导致的,因为我在任何地方都没有看到任何错误?
PS:我刚开始使用 Magento。
Acl.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Backend::admin">
<resource id="GlobalSms_Notify::sms" title="GlobalSms" sortOrder="100">
<resource id="GlobalSms_Notify::config" title="Config" sortOrder="10" />
</resource>
<resource id="Magento_Backend::stores">
<resource id="Magento_Backend::stores_settings">
<resource id="Magento_Config::config">
<resource id="GlobalSms_Notify::sms_config" title="Configuration" />
</resource>
</resource>
</resource>
</resource>
</resources>
</acl>
</config>
system.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Magento/Config/etc/system_file.xsd">
<system>
<tab id="globalsms_notify" sortOrder="2000">
<label>GlobalSms</label>
</tab>
<section id="globalsms_notify_configuration" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Basic Configuration</label>
<tab>globalsms_notify</tab>
<resource>GlobalSms_Notify::sms</resource>
<group id="basic_configuration" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label><![CDATA[Basic Configuration <i>Setting API Account</i>]]></label>
<field id="notify_username" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enter GlobalSms Username</label>
<comment>Enter your GlobalSms SMS API Username</comment>
<tooltip>Your username must be the same as your GloablSms api username</tooltip>
<validate>required-entry</validate>
</field>
<field id="notify_password" type="password" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enter GlobalSms Password</label>
<comment>Enter your GlobalSms SMS API Password</comment>
<tooltip>Your password must be the same as your GlobalSms api password</tooltip>
<validate>required-entry</validate>
</field>
</group>
</section>
</system>
</config>
我问只是因为你明确地说:
PS: I just started working on Magento.
您是将模块提取到 magentoroot/app/code/Vendor/Module
(它所属的位置)还是提取到 magento 根目录?
如果在magentoroot/app/code/Vendor/Module
下检查你的模块是否注册正确
bin/magento module:status
如果您的模块没有显示(启用或禁用),则您缺少一些样板文件,即 /Vendor/Module/
中的 registration.php
或 /Vendor/Module/etc
文件夹中的 module.xml
。
如果它出现在禁用模块下,请使用 bin/magento module:enable Vendor_Module
和 运行
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:clean
之后。