In this tutorial, we will use Magento’s powerful shipping-method code abstraction to create a shipping carrier. We will create three shipping methods that provide a fixed shipping price, allow for free shipping promotions, define logic based on an item’s weight and, finally, make it all configurable in the admin panel.
To configure your Magento Shipping methods, you need to login to your admin area and go to System -> Configuration -> Sales ->Shipping Methods.
Before enabling the shipping method you should configure the shipping settings from System -> Configuration -> Sales -> Shipping Settings.
Expand the Origin section. Enter the address from which the shipping will be initiated. Usually this is the address of the warehouse where the products are stored.
Then expand the Options section. If enabled, the option Allow Shipping to Multiple Addresses allows goods from a single order to be shipped to different addresses. It is useful when a customer orders many products of a single kind, like post cards or pens for example and wants them to be delivered to multiple addresses. You can define the maximum number of allowed shipping addresses in the Maximum Qty Allowed for Shipping to Multiple Addresses field.
For example, to enable the USPS shipping module, you can go to System -> Configuration -> Sales -> Shipping Methods and navigate to the USPS section:
Enable the shipping method, enter the Gateway URL and the UserID. The next options allow you to describe the packages which you need to be delivered (size, weight and more).
Then you can define the handling fee. It can be fixed or calculated on the percent basis. After this you can pick the allowed delivery methods. Also, you can configure a free shipping method and define whether there is a minimum purchase sum for it.
At the end you can define the countries for which the shipping is supported and the default error message in case the service is refused. In the Sort order field you should enter the position of this shipping method compared to the other shipping methods offered to the customers.