我已将“app/code/core/Mage/Customer/controllers/AccountController.php
”复制到“app/code/local/Mage/Customer/controllers/AccountController.php
”,但它没有覆盖目标文件。出了什么问题?
答案 0 :(得分:3)
创建以下文件:
1)app / etc / modules / Muk_Account.xml
<?xml version="1.0"?>
<config>
<modules>
<Muk_Account>
<active>true</active>
<codePool>local</codePool>
</Muk_Account>
</modules>
</config>
2)app \ code \ local \ Muk \ Account \ etc \ config.xml
<?xml version="1.0"?>
<config>
<modules>
<Muk_Account>
<version>0.1.0</version>
</Muk_Account>
</modules>
<frontend>
<routers>
<customer>
<use>standard</use>
<args>
<modules>
<Muk_Account before="Mage_Customer">Muk_Account_Customer</Muk_Account>
</modules>
</args>
</customer>
</routers>
</frontend>
</config>
3)app \ code \ local \ Muk \ Account \ controllers \ Customer \ AccountController.php
<?php
require_once 'Mage/Customer/controllers/AccountController.php';
class Muk_Account_Customer_AccountController extends Mage_Customer_AccountController
{
public function createPostAction()
{
}
}
搜索Google和堆栈溢出以获取更多详细信息。