[ic] Interchange6 Shipping Draft

Lyn St George lyn at zolotek.net
Fri Mar 7 22:46:18 UTC 2014


On 07/03/2014 21:56, Sam Batschelet wrote:
> Here is my draft for schema changes and additions for shipping support.  Comments welcome.
> 
> https://gist.github.com/sbatschelet/9197124
> 
> Thanks
> -Sam

Sam, I'm not sure if any of my shipping stuff will fit in with what you
probably have in mind here, but you're welcome to use any bits that
might be useful.

To summarise what I have:

a shipping() sub which is called either directly by the customer to
estimate shipping costs, or as part of the order() sub to get the basket
totals. This reads shipmodes from the country table (I'm using an IC5 db
here) and for each shipmode it looks up a 'shipping' table to find the
shipper. It then instantiates a new Business::OfflineShipping::$shipper
class, finds the rate and pushes it onto an @shippinglist array which is
displayed to the customer. Either the selected rate or the first rate
(as default) is used by order() for calculating totals.

Currently I'm only using USPS, UPS and the RoyalMail so haven't bothered
with any other shippers, and have just noticed that I haven't yet done
UPS tables for shipping outside the US (because I'm only using UPS
within the US). There also needs to be some mechanism added for choosing
online lookups when offline proves impractical.

If you like I'll make a quick package of the modules and the shipping()
sub and put it on kiwi.zolotek.net

Lyn




More information about the interchange-users mailing list