0
我試圖以編程方式禁用Magento模塊。爲了嘗試,我將以下代碼添加到myadmin header.phtml。完全禁用模塊 - Magento 1.9
// Disable the module itself
$moduleName="Thycart_Customcheckout"
$nodePath = "modules/$moduleName/active";
if (Mage::helper('core/data')->isModuleEnabled($moduleName)) {
Mage::getConfig()->setNode($nodePath, 'false', true);
echo Mage::getConfig()->getNode('modules/Thycart_Customcheckout')->active;
}
// Disable its output as well (which was already loaded)
$outputPath = "advanced/modules_disable_output/$moduleName";
if (!Mage::getStoreConfig($outputPath)) {
Mage::app()->getStore()->setConfig($outputPath, true);
}
在呼應
法師:: getConfig() - > getNode( '模塊/ Thycart_Customcheckout') - >活性;
將返回給我它的虛假但實際上該模塊沒有從xml禁用。
還試圖
法師:: getConfig() - > saveconfig的();
返回
前端控制器達到100路由器匹配迭代錯誤。
有人可以請幫助使配置文件中的節點活動爲false。謝謝。
試試這個https://magento.stackexchange.com/a/48840/46038 –
@BachchaSingh不是程式化的 – Melvin