So now that we've built the basic framework for a custom shipping module in Magento Custom Shipping Part 1, its now time to move on to the special business logic that my client needs.
My client isn't shipping the usual pre-packaged electronics and other consumer goods you usually find online. Instead, they ship a product priced in standard units of volume. And since shipping is by semi truck, there's a maximum and minimum quantity that can be shipped.
Setting the Maximum and Minimum are fairly easy using the built-in Cart and Product tools from Magento. But now we need to calculate shipping costs. My client's shipping is calculated using this simple formula:
Quantity of Material x Handling Fee (per unit) + Delivery Charge (per region)
The first part of this, the handling fee, is pretty easy. Read More to see how we add the handling charges to our module