Satchmo Store and UPS Shipping

Satchmo store and UPS shipping

28 August 2010 – Castine, Maine

Do you know how much it costs to ship 12 bottles of spice, each weighing about half a pound?$134. Or at least, so says Satchmo. By default, the UPS module loads all the shippable items into separate packages before whisking your information off to UPS XML look-up land. When it returns, you get the horrible result above.

My solution? A quick hack to the Satchmo code (which I’m sure, if I was better at signals would have been possible without a source hack). Anyway, the resulting code looks something like this:

In satchmo/apps/shipping/modules/ups/, just wrap the old shippingdata dict in an else loop that never gets hit and make sure we always use the one-package lookup. You can view the code in a fork of satchmo on bitbucket.

Then all you have to do is hack the templates/shipping/ups/request.xml file and toss this in where the package gets put together. I created the fork because all the google search on this subject came up with discussions from 2008, when a few people apparently solved the problem but no one wrote it down. So now it’s in a fork, hopefully to be merged into the maineline satchmo.

Really, I’m just still bitter because it’s 2 a.m., and all the search results for this problem showed it was first addressed in 2008. That’s two years for a simple “should all items ship in separate packages or one big one,” boolean switch in the UPS module configuration. In fact, that code already exists in the Fedex module.

-When I have more time perhaps I’ll un-hack this change and actually propose a patch. That is how open-source is supposed to work right?-

Correction, patch submitted!

Creative Commons License