Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
覆盖模型时出现Magento问题_Magento - Fatal编程技术网

覆盖模型时出现Magento问题

覆盖模型时出现Magento问题,magento,Magento,社区代码池下有一个模块。模块内部有一个低于模型的类 class Abc_AbcShipping_Model_Carrier_Abs extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface {} 我需要在本地代码池下的自定义模块中重写此类。我试着用下面的方法来做这件事 config.xml <global> <

社区代码池下有一个模块。模块内部有一个低于模型的类

class Abc_AbcShipping_Model_Carrier_Abs
    extends Mage_Shipping_Model_Carrier_Abstract
    implements Mage_Shipping_Model_Carrier_Interface
{}
我需要在本地代码池下的自定义模块中重写此类。我试着用下面的方法来做这件事

config.xml

<global>
            <models>
                <test>
                    <class>Test_One_Model</class>
                </test>
                <test>
                    <rewrite>
                        <carrier_abs>Test_One_Model_Carrier_Abs</carrier_abs>
                    </rewrite>
                </test>
            </models>
</global>

测试一个模型
测试(1)(型号)(载体)(Abs)
重写类 等级测试(1)(型号)(载体)(Abs) 扩展Abc\U Abc装运\U模型\U载体\U Abs {}

但这并不奏效。谁能帮我解决这个问题。
非常感谢。

查看
Abc\u AbcShipping
模块中的config.xml,并检查
标记下方的名称。我想这应该是
而不是
像在XML中一样。我做了这个更改。但它不起作用:(