Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Setting up Extension with 3 Models/Tables in Database
 
adultcart
Jr. Member
 
Total Posts:  7
Joined:  2009-02-01
 

I am having problems setting up an extension which uses 3 custom tables.

I have this first table working, but I cannot match it to my folder structure. Below is my config.xml

Someone please help me figure this out. I’m coming over from symfony which AUTOMATICALLY does all this for you. I’m desperately trying to figure out how this works in magento with no luck

<models>
<!-- dealersearch_locations table -->
<dealersearch>
<class>GMAP_Dealersearch_Model</class>
<resourceModel>dealersearch_mysql4</resourceModel>
</dealersearch>

<dealersearch_mysql4>
<class>GMAP_Dealersearch_Model_Mysql4</class>
<entities>
<dealersearch>
<table>dealersearch_locations</table>
</dealersearch>
</entities>
</dealersearch_mysql4>

<!-- dealersearch_state table -->
<dealersearch_state>
<class>GMAP_Dealersearch_Model_State</class>
<resourceModel>dealersearch_state</resourceModel>
</dealersearch_state>

<dealersearch_state>
<class>GMAP_Dealersearch_Model_State</class>
<entities>
<dealersearch_state>
<table>dealersearch_state</table>
</dealersearch_state>
</entities>
</dealersearch_state>

<!-- dealersearch_zip table -->
<dealersearch_zip>
<class>GMAP_Dealersearch_Model_Zip</class>
<resourceModel>dealersearch_zip</resourceModel>
</dealersearch_zip>

<dealersearch_zip>
<class>GMAP_Dealersearch_Model_Zip</class>
<entities>
<dealersearch_zip>
<table>dealersearch_zip</table>
</dealersearch_zip>
</entities>
</dealersearch_zip>

</models>

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top