0
尝试扩展自定义扩展的模型。够简单......但重写似乎没有工作。Magento模型覆盖
我想重写下面的模型,设在社区的代码文件夹中的模块中:
Belvg_Stores_Model_State
用我自己的,位于当地的代码文件夹中的模块中:
Myco_Storelocator_Model_State
这是来自Myco_Storelocator的config xml。块重写正在工作......状态重写不是。
<?xml version="1.0"?>
<config>
<global>
<modules>
<myco_storelocator>
<version>0.1.0</version>
</myco_storelocator>
</modules>
<blocks>
<storelocator><class>Myco_Storelocator_Block</class></storelocator>
<stores>
<rewrite>
<front>Myco_Storelocator_Block_Front</front>
</rewrite>
</stores>
</blocks>
<models>
<stores>
<rewrite>
<state>Myco_Storelocator_Model_State</state>
</rewrite>
</stores>
</models>
</global>
<frontend>
<layout>
<updates>
<storelocator>
<file>storelocator.xml</file>
</storelocator>
</updates>
</layout>
</frontend>
</config>
感谢您的帮助......
你是否在'Myco_Storelocator_Model_State'类中扩展了'Belvg_Stores_Model_State'?你也可以尝试一个不同的独特节点而不是'state'。 – B00MER