【问题标题】:How To disable Community extension in Magento ver. 1.9.1.1如何在 Magento 版本中禁用社区扩展。 1.9.1.1
【发布时间】:2016-02-07 14:10:26
【问题描述】:

我在magento社区文件夹中开发了一个扩展,但是即使在禁用表单管理面板后它仍然显示,我也禁用了缓存但仍然没有禁用请帮助我

<config>
    <modules>
        <my_module>
            <active>true</active>
            <codePool>community</codePool>
            <depends>
                <Mage_Shipping />
            </depends>
        </my_module>
    </modules>
</config>`

这里是我的 config.xml 文件

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <my_module>
            <module>0.0.1</module>
        </my_module>
    </modules>
    <global>
        <models>
            <my_module>
                <class>My_Module_Model</class>
            </my_module>
        </models>
    </global>
    <default>
        <carriers>
            <my_module>
                <active>1</active>
                <model>my_module/carrier</model>
                <title>My Module</title>
                <sort_order>10</sort_order>
                <sallowspecific>0</sallowspecific>
            </my_module>
        </carriers>
    </default>
</config>

【问题讨论】:

    标签: magento


    【解决方案1】:

    要完全禁用扩展,您需要将其设置为 false 到模块文件

    <config>
    <modules>
        <my_module>
            <active>false</active>
            <codePool>community</codePool>
            <depends>
                <Mage_Shipping />
            </depends>
        </my_module>
    </modules>
    

    从系统配置中禁用模块 > 当前配置范围 > 高级 > 高级 > 禁用模块输出 如它所说,仅禁用模块的输出。

    【讨论】:

      【解决方案2】:

      要真正禁用模块,您需要在 etc/modules 中编辑 xml 文件的扩展名。从My_module.xml to My_module.html 更改它。如果设置为 false,则模块被禁用,但如果有从模块类扩展的类,即使设置为 false,它们仍然会这样做,所以这还不够。

      【讨论】:

        【解决方案3】:

        要禁用您的社区模块,只需转到 app/etc/modules/找到您的 module_name.xml 文件并设置为 false

        <config>
        <modules>
            <my_module>
                <active>false</active>
                <codePool>community</codePool>
                <depends>
                    <Mage_Shipping />
                </depends>
            </my_module>
        </modules>
        

        好的,现在转到您的社区文件夹 etc/config.xml 并将 1 设置为 0

        <default>
                <carriers>
                    <my_module>
                        <active>0</active>
                        <model>my_module/carrier</model>
                        <title>My Module</title>
                        <sort_order>10</sort_order>
                        <sallowspecific>0</sallowspecific>
                    </my_module>
                </carriers>
            </default>
        

        完成了。告诉我什么可以让你摆脱这个问题,谢谢。

        【讨论】:

          猜你喜欢
          • 2014-07-03
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2023-03-23
          相关资源
          最近更新 更多