我正在尝试覆盖扩展的控制器....即覆盖购物车控制器。
当前覆盖购物车控制器的扩展是:
Innoexts/Warehouse/controllers/Checkout/CartController.php
Innoexts 模块中的配置条目是:
<frontend>
<routers>
<checkout>
<args>
<modules>
<Innoexts_Warehouse before="Mage_Checkout">Innoexts_Warehouse_Checkout</Innoexts_Warehouse>
</modules>
</args>
</checkout>
</routers>
...blah...blah...
</frontend>
innoext cartcontroller 文件的顶部是:
require_once 'Mage/Checkout/controllers/CartController.php';
class Innoexts_Warehouse_Checkout_CartController extends Mage_Checkout_CartController {
我想用这个控制器覆盖它:
Myco/Warehousemod/controllers/Checkout/CartController.php
控制器文件的顶部是:
require_once 'Innoexts/Warehouse/controllers/Checkout/CartController.php';
class Myco_Warehousemod_Checkout_CartController extends Innoexts_Warehouse_Checkout_CartController {
我创建的配置条目是:
<global>
...blah...blah...
<rewrite>
<myco_warehousemod_checkout_cart>
<from><![CDATA[#^/checkout/cart/#]]></from>
<to>/warehousemod/checkout_cart/</to>
</myco_warehousemod_checkout_cart>
</rewrite>
</global>
<frontend>
<routers>
<checkout>
<args>
<modules>
<Myco_Warehousemod before="Innoexts_Warehouse_Checkout">Myco_Warehousemod_Checkout</Myco_Warehousemod>
</modules>
</args>
</checkout>
</routers>
...blah...blah...
</frontend>
我现在收到结帐/购物车 URL 的 404 not found 错误......谁能看到我哪里出错了?在线资源非常不同......而且令人困惑!问题可能出在我试图覆盖覆盖控制器...??
提前致谢...