homepage Welcome to WebmasterWorld Guest from 23.23.22.200
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
Shipping Calculations
What logic do you use?
rocknbil




msg:433375
 10:39 pm on Mar 25, 2006 (gmt 0)

Currently I use UPS and USPS online tools via silent post to calculate shipping. Send them a width, height, depth, shipping method, they return a price.

The problem comes in when someone orders multiple items. Initially just to get the thing rolling what I did was find the longest sides of the items and add the heights. This overshot a little, but worked.

I'm sure you all see what *I* saw the potential for, but never expected the outstanding success of the site in question. We're getting some LARGE orders, multiple items, and it's blowing my "calculator" out of the water. When someone orders 70 12" X 2" X 1" items, you now have a box 12" X 2" X 70" high which throws ANY calculator into oversize.

So what logic do you follow? Calc the total volume, grab the largest length and width and make the height whatever's required to equal the volume?

I will cross-post this in Ecommerce because it may be more relevant there, but am interested in a programmer's point of view. 'Cause that's what I have to figure out, how to program it. :-)

 

DrDoc




msg:433376
 12:39 am on Mar 26, 2006 (gmt 0)

Well, I typically figure out the volume for each ... then add those together (so now I have an accurate volume at least). Then I imagine a box with that volume where the w/h/d ratio is as close as possible to the average w/h/d ratio for the items involved. I then multiply each dimension by 1.1 or 1.2

So far, very accurate.

DrDoc




msg:433377
 12:41 am on Mar 26, 2006 (gmt 0)

Another option ... If you know the shipper, and which box sizes are available, you can actually calculate the optimal box usage as well, and get dead on the spot shipping rates ;)

"Hmm, to ship these five items the best box to use is the XYZ. I will need two of them."

rocknbil




msg:433378
 1:18 am on Mar 26, 2006 (gmt 0)

DrDoc, thank you very much for your help on a Saturday. So I'm on the right track with the volume. I've been searching all over this afternoon and can't believe this question hasn't come up anywhere. Thanks again!

DrDoc




msg:433379
 3:45 am on Mar 26, 2006 (gmt 0)

That's what I have found gives the best results, at least.

The latter option is definitely the better one, though ... Although the calculations are no less fun ;)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved