As part of a wider project, I am trying to overwrite the core class Mage_Sales_Model_Order_Payment
. I am editing a config.xml file that is part of an already active module.
<config>
<global>
<models>
<sales>
<rewrite>
<order_payment>MyNamespace_MyModule_Model_Payment</order_payment>
</rewrite>
</sales>
</models>
</global>
<config>
The class I am trying to replace is in the directory:
app/code/local/MyNamespace/MyModule/Model/Pay开发者_C百科ment.php
It is called MyNamespace_Sales_Model_Order_Payment
.
Currently, no overwriting seems to take place and the core class functions seem to be used. Any help would be very useful.
Thank you.
The name of the class must match the file it's in. In this case it should be called MyNamespace_MyModule_Model_Payment
精彩评论