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

How to get custom shipping module resource model working? 
 
Yarhajile
Sr. Member
 
Avatar
Total Posts:  90
Joined:  2008-08-28
Spokane, WA
 

I’m working on building a new shipping module and would like for it to access information in the database in a way similar to how the tablerate shipping module works.

My module is located in the following location:

Namespace:
app/code/local/Pw/MultipleTablerates

Files:
etc/config.xml
etc/system.xml
Model/Carrier/ShippingMethod.php

The module works in both the admin and the frontend. What I want to do is add database functionality to it.

I created the following files in the app/code/local/Pw/MultipleTablerates namespace:

Mysql4/Carrier/ShippingMethod.php
Mysql4/Carrier/ShippingMethod/Collection.php

I see that in the tablerate module, it uses Mage::getResourceModel(’shipping/carrier_tablerate’)->getRate($request) to get the rates.

My question is how do I create the resource model in my etc/config.xml file order to access the methods I have in Mysql4/Carrier/ShippingMethod.php?

Thanks in advance!!

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