Adding Shipping carrier

Ref: @Github

To add shipping carrier in magento is quit easy. All we have to declare following code.

One must

extend Mage_Shipping_Model_Carrier_Abstract and

implement Mage_Shipping_Model_Carrier_Interface

protected $_code = ‘ndslaramax’; This is unique code which will be used my magento to identify the shipping method.

Then create following function

  1. collectRates                       // base code with defalt value
  2. getAllowedMethods       //To display at shopping cart page
  3. isTrackingAvailable       // Make it true to list in admin shipping page (optional)
  4. getTrackingInfo              // This will return tracking info if request from front end (optional)

Include the code name in etc/config.xml & etc/system.xml

We are done.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s