简体   繁体   English

从数据库禁用Magento扩展

[英]Disable Magento Extension from database

Is there a way to disable a magento extension from the database? 有没有办法从数据库中禁用magento扩展? We can't access our admin area due to a corrupt extension so we can't disable the extension from the admin section.. 由于扩展程序损坏,我们无法访问我们的管理区域,因此我们无法从管理部分禁用该扩展程序。

If it is a properly created Magento extension, it will have a control file in app/etc/modules . 如果它是一个正确创建的Magento扩展,它将在app / etc / modules中有一个控制文件。 You want to use this file to disable the extension as it prevents the module from loading. 您希望使用此文件来禁用扩展,因为它会阻止加载模块。 Disabling in the database allows the code to load but disables its output, an important distinction for something that is causing Magento to fail in its operation. 在数据库中禁用允许加载代码但禁用其输出,这是导致Magento在其操作中失败的重要区别。

In this file will be a line, true . 在这个文件中将是一行,为true Change true to false and the module will be prevented from loading and executing. 将true更改为false ,将阻止模块加载和执行。

Sample code for module Desitex_Checkoutnewsletter 模块Desitex_Checkoutnewsletter的示例代码

<?xml version="1.0"?>
<config>
    <modules>
        <Desitex_Checkoutnewsletter>
            <active>true</active>
            <codePool>community</codePool>
            <depends>
                <Mage_Checkout />
            </depends>
        </Desitex_Checkoutnewsletter>
    </modules>
</config> 

If you want to disable a particular extension all you have to do is to change the active block to false. 如果要禁用特定扩展,则只需将活动块更改为false即可。 You can use any ftp program which supports file editing to change the extension status to false. 您可以使用任何支持文件编辑的ftp程序将扩展状态更改为false。 Just open app/etc/module/Namespace_Module.xml in your favorite editor and change it as shown below: 只需在您喜欢的编辑器中打开app / etc / module / Namespace_Module.xml,然后按如下所示进行更改:

<?xml version="1.0"?>
<!-- 
/**
 * @category   Magik
 * @package    MagentoMagik_Salepro
 * @author     Ashish Nayyar @ MagentoMagik
 * @license    http://www.magentomagik.com  Open Software License (OSL 3.0)
 */
 -->
<config>
    <modules>
        <Magik_Salepro>
            <active>false</active>
            <codePool>local</codePool>
        </Magik_Salepro>
    </modules>
</config>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM