A new shipping module is initialized in the previous recipe. What we did in the previous recipe was a preparation to continue with the business part we will see in this recipe. We will add a model with the business logic for the shipping method. The model is called an adapter class because Magento requires an adapter class for each shipping method. This class will extend the Mage_Shipping_Model_Carrier_Abstract
class.
This class will be used for the following things:
Perform the following steps to create the adapter class for the shipping method:
Create the folder
app/code/local/Packt/Shipme/Model/Carrier
if it doesn't already exist.In this folder, create a file named
Shipme.php
and add the following content to it:<?php class Packt_Shipme_Model_Carrier_Shipme extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface...