Trying to extend a model for a custom extension. Simple enough…but rewrite doesnt seem to be working.
i want to rewrite the following model, located in a module in the community code folder:
Belvg_Stores_Model_State
With my own, located in a module in the local code folder:
Myco_Storelocator_Model_State
Here is the config xml from Myco_Storelocator. The block rewrite is working…the state rewrite is not.
<?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>
Thanks for the help…
Needed to add the following to the relevant model rewrite…same as the block rewrite section:
…doh.