NZ Post Shipping / Rate Calculator
Does anybody know how to integrate live NZ Post Shipping rates into an e-Commerce site - the closest thing I found was a google widget... which seems rather moot :P
Other related posts:
WordPress e-Commerce Plugin
WordPress e-Commerce Plugin: settings and configuration video
Wellington games company enters Japan
Comment by sleemanj, on 12-Mar-2009 20:42 , user id: 27497)
I subscribe to the Geekzone Blog RSS feed which is how I saw your post.
That google gadget thing is interesting, looking at the source:
http://hosting.gmodules.com/ig/gadgets/file/101755698721714438268/nzpost_ratefinder_01.xml
it is using an XML feed of rates, hit this reverse engineered URL for kicks and giggles.
http://www.nzpost.co.nz/NZPost/Services/Ratefinder.aspx?t=30&h=300&l=300&w=0.5&src=Christchurch&dest=Auckland
t = thickness
h = height
l = length
I think those three are mm
w = weight
I THINK that is kg
src and dest are obvious and can be obtained from
http://www.nzpost.co.nz/NZPost/Services/Ratefinder.aspx?GetLocations=source
http://www.nzpost.co.nz/NZPost/Services/Ratefinder.aspx?GetLocations=destination
Add a comment
Please note: comments that are inappropriate or promotional in nature will be deleted.
E-mail addresses are not displayed, but you must enter a valid e-mail address to confirm your comments.
Are you a registered Geekzone user? Login to have the fields below automatically filled in for you and to enable links in comments.
If you have (or qualify to have) a Geekzone Blog then your comment will be automatically confirmed and placed in the moderation queue for the blog owner's approval.
Comment by James Sleeman, on 10-Mar-2009 20:33 , user id: )
To my knowledge, there is no API, public or otherwise which can calculate the rates.
Many moons ago I ripped out and ported the Javascript calculator to PHP, but it's not going to be anything like correct any more since the rate changes a year or so ago (and it's really arcane lookup table based code).
You could maybe post the required fields to the website ratefinder and rip the results from the results page, but I'm thinking that the CMS/Framework they use may make it tricky, and of course the usual practical and legal screen scraping problems.
In practice, it is better for NZ based online stores to come up with simpler postage pricing and manage it themselves.