Page 1 of 1
Rough Estimate Shipping Charge Calc -- for the UK
Posted: Mon Jun 29, 2009 2:53 pm
by volomike
I'm needing to come up with a rough estimate shipping charge calc in PHP for all of the UK and Ireland. It's done by weight and distance. I already have the cost per weight and distance figured out, but now need to find distances. They want it by rough estimate and will pad it enough to accommodate underages by using the profit from overages.
I'm thinking what I need is a mileage chart between UK and Ireland counties, but darn I can't find a complete one.
Note I'm looking for a mileage chart by major highways in the UK between counties (with the occasional ferry trip), not an "as the crow flies" algorithm.
Re: Rough Estimate Shipping Charge Calc -- for the UK
Posted: Mon Jun 29, 2009 5:58 pm
by jayshields
I recently did something like this by scraping Google Maps directions results. Obviously you're not supposed to do this as the information is not meant to be to given to the public as a service (it's not in the API), because Google have to pay Royal Mail a subscription fee for the data, and aren't meant to pass it on for free.
If you want me to give you my screen scraping code I think a PM is more appropriate than just posting it here, although it's not difficult to figure out and make your own.
Re: Rough Estimate Shipping Charge Calc -- for the UK
Posted: Mon Jun 29, 2009 7:07 pm
by volomike
Yeah, we would be scraping it pretty hard. I also see now that Google Maps has Google Maps API Premier for commercial use, and they don't even list the price yet for it. They might charge like $1 per 500 queries? I don't know.
Re: Rough Estimate Shipping Charge Calc -- for the UK
Posted: Mon Jun 29, 2009 9:43 pm
by alex.barylski
They might charge like $1 per 500 queries? I don't know
We looked into it at worked (we needed it for SSL) and it was more like $10K from what I remember the other developer telling me.
Re: Rough Estimate Shipping Charge Calc -- for the UK
Posted: Tue Jun 30, 2009 12:35 am
by volomike
PCSpectra wrote:We looked into it at worked (we needed it for SSL) and it was more like $10K from what I remember the other developer telling me.
Yikes! This is probably how they're funding the free Google Maps, perhaps.
Re: Rough Estimate Shipping Charge Calc -- for the UK
Posted: Tue Jun 30, 2009 4:41 am
by onion2k
I don't know of a single courier in the UK that charges per mile. It's all done by weight and volume only, with a premium for some of the outlying islands. If you charge customers in the UK a shipping charge based on distance they won't buy from you.
Re: Rough Estimate Shipping Charge Calc -- for the UK
Posted: Tue Jun 30, 2009 5:05 am
by jayshields
It depends what it is that he's selling. For example, if he's selling cars and he is delivering them.
Re: Rough Estimate Shipping Charge Calc -- for the UK
Posted: Tue Jun 30, 2009 6:59 am
by onion2k
jayshields wrote:It depends what it is that he's selling. For example, if he's selling cars and he is delivering them.
In the opening post he said they're calculating cost by weight and distance. Car deliveries aren't done by weight.
Re: Rough Estimate Shipping Charge Calc -- for the UK
Posted: Tue Jun 30, 2009 8:00 am
by jayshields
I missed that, but hey, why not weight? Generally the heavier the vehicle the worse the MPG is.

Re: Rough Estimate Shipping Charge Calc -- for the UK
Posted: Tue Jun 30, 2009 8:01 am
by volomike
onion2k wrote:I don't know of a single courier in the UK that charges per mile. It's all done by weight and volume only, with a premium for some of the outlying islands. If you charge customers in the UK a shipping charge based on distance they won't buy from you.
Thanks for that. Let me contact my UK biz partner to see if he shares this sentiment.
As for what this is -- there's a niche here and I cannot violate that for my client's integrity. So, I'm going to only say that it is "equipment" in a non-triple-X way (i.e. non-"Adult").
Re: Rough Estimate Shipping Charge Calc -- for the UK
Posted: Tue Jun 30, 2009 10:18 am
by volomike
My UK biz partner says:
"Depends on who is shipping it. However, usually it does matter say for a courier to drive to Scotland from London, and is going to cost far more than going from London to Birmingham.
With the project we will simply need to know if they are either England & Wales, Scotland, Isle of Man, or Northern Ireland. Soon as we know that main location, we have a price for delivery based on weight to that region."