Zen Cart Logo
Forums / Addon Shipping Modules / Region Tables - Postcodes more accurate?

Region Tables - Postcodes more accurate?

Locked

Views: 3,310

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
19 Apr 2007, 9:53 AM
#1
doc_lenny avatar

doc_lenny

New Zenner

Join Date:
Apr 2007
Location:
Northumberland, UK
Posts:
3
Plugin Contributions:
0

Region Tables - Postcodes more accurate?

First Post - Hello all

Hi I have installed the new Region Tables and configured them based on Geolocation (e.g. miles from the store). When the customer clicks estimate shipping the code works successfully :clap: - however the postcodes are generalised and only look at the outbound part of the code e.g. NE1. Can I modify the uk_postcodes.sql to include the first digit of the inbound code to make the distance from store calculation more accurate. I know that I will have to include the grid references etc. but am willing to do this as delivery is only local and the items being delivered are very heavy so need to be accurate with distance.

Any Ideas?

19 Apr 2007, 11:22 AM
#2
dasonix avatar

dasonix

New Zenner

Join Date:
Sep 2006
Posts:
79
Plugin Contributions:
0

Re: Region Tables - Postcodes more accurate?

Not being an expert on this but I think that that would complicate matters too much. 99.9% of carriers work on postcodes not distance, All you have to do is ask your carrier for there postcode to zone spreadsheet and add all the data into the system.

If you want the ANC data for this let me know as I have it to hand.

Prolly better adding a section where you can add your Grid ref and work it out from there if you have to work by distance.

For a free mod it is outstanding, but if you would like that sort of funcion to it I think it will cost you.

19 Apr 2007, 12:22 PM
#3
doc_lenny avatar

doc_lenny

New Zenner

Join Date:
Apr 2007
Location:
Northumberland, UK
Posts:
3
Plugin Contributions:
0

Re: Region Tables - Postcodes more accurate?

The delivery haulier is a local firm and deliver in zones according to mileage. There can be 8 miles difference in the same postcode in this area which can cause problems with getting the right quote for the customer. This is why I need to be more accurate.

Thanks for your reply.

19 Apr 2007, 5:16 PM
#4
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Region Tables - Postcodes more accurate?

Hi Doc Lenny,

Weird name. :)

What you are asking can be done but it's more complicated than simply adding in a few more specific postcodes.

You certainly can update the database to add in a few more specific postcodes that include part of the inbound code. (Where would be getting the grid references from though... a map and a ruler? ;) )

However, the difficulty comes when you think about how the geolocation function has to work out if the customer's postcode matches these more-specific codes.

UK postcodes aren't a set length but they do have a set length for their inbound code. This is taken advantage of to work out what part of a customer's postcode is the outbound code (by simply stripping the inbound code, the last three digits, from their postcode):

$store_postcode = strtoupper(substr($store_postcode, 0, strlen($store_postcode) - 3));

To match the outbound code AND part of the inbound code you'd have to update the search queries to check the customer's postcode against the outbound codes (as it does currently) and then to check against the more specific codes as well (letting any match for them override the more general outbound-only query).

I could update the module for you but we'd have to bill for the time as it is additional work... if you're interested feel free to get in contact via the e-mail address on the module's website.

All the best...

Conor

23 Apr 2007, 8:20 AM
#5
doc_lenny avatar

doc_lenny

New Zenner

Join Date:
Apr 2007
Location:
Northumberland, UK
Posts:
3
Plugin Contributions:
0

Re: Region Tables - Postcodes more accurate?

conor:

You certainly can update the database to add in a few more specific postcodes that include part of the inbound code. (Where would be getting the grid references from though... a map and a ruler? ;) )

Here try typing the first the outbound and first part of the inbound e.g. NE613 - This will do some of the donkey work. Unfortunately PHP is not my bag so will stuggle to achieve what I would like to do.

Thanks for your efforts!!:wink: