我正在尝试使用此设置扩展 OnepageController:
应用程序/etc/modules/Custom_Checkout.xml
<config>
<modules>
<Custom_Checkout>
<active>true</active>
<codePool>local</codePool>
</Custom_Checkout>
</modules>
</config>
应用程序/本地/自定义/结帐/etc/config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Custom_Checkout>
<version>0.0.1</version>
</Custom_Checkout>
</modules>
<frontend>
<routers>
<checkout>
<args>
<modules>
<custom_checkout before="Mage_Checkout">Custom_Checkout</custom_checkout>
</modules>
</args>
</checkout>
</routers>
</frontend>
</config>
app/local/Custom/Checkout/controllers/OnepageController.php
require_once("Mage/Checkout/controllers/OnepageController.php");
class Custom_Checkout_OnepageController extends Mage_Checkout_OnepageController
{
public function indexAction()
{
echo "Index overidden";
}
}
我见过这些: 扩展 magento 核心控制器 (Checkout/OnepageController)
加上一些我无法发布的内容,但上述方法似乎都不起作用。它只是不会覆盖控制器。
关于为什么这不被覆盖的任何想法?