Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Postcode UK delivery


Recommended Posts

So, we're getting somewhere. It's almost done so a special thanks to @@Mort-lemur for the help. The pics made a big difference! Just one more thing (I hope!). I've got it working so far for outside Merseyside, but the zone for outside Merseyside contained just one zone 'all zones'. I assumed it would pick this one unless they were inside Merseyside, in which case it would choose the cheaper one for within Merseyside as it's now an option but even in Merseyside it's giving me the price for outside because it's listed as 'all zones'. Is there a way to set a tax zone up as all zones EXCEPT one or do I now need to add every other county in England manually?

Link to comment
Share on other sites

@@chipshi11 This will add all the UK counties to your database: http://addons.oscommerce.com/info/8948 (remember to make a backup first just in case)


Then add the counties to the shipping zones such as:


Shp: Liverpool (would just contain Liverpool)

Shp: Highlands (Scottish highland counties + Scottish islands)

Shp: England (all other counties not in the above two)


I think the counties list is almost complete - I think I had to add a couple of odd-balls since I set up my county list

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

  • 5 months later...

Hi just seen this thread whilst browsing through things, it's probaly not much help to @@chipshi11 now but hopefully this may help anyone else with this issuse who reads this.


There is an addon for UK postcode shipping, it's made for v2.2 - UK Postcode based carrier shipping


Hopefully this can be modified to 2.3.4 as I hope to use it, I have it installed on a 2.2 site and with a bit of tweaking can support different carriers (by modifying the name of the module etc.)


The hardest part is getting a current list of the outbound postcodes as it's a heavily guarded Royal Mail asset - paid for by the general public !


A fairly up-to-date copy of the postcode list can be found at the Office for National Statistics - click here - and search for 'postcode'

The problem with this link is that it contains every postcode along with the location data (great if your writing a navigation app B) ), so it needs a bit of parsing as it's only 1.21Gb small (uncompressed)


Alternatively ask your carrier if the have a postcode to charge zone list that you can import.


If anyone wants anymore info please feel free to pm me.


Link to comment
Share on other sites

  • 1 year later...


There is an addon for UK postcode shipping, it's made for v2.2 - UK Postcode based carrier shipping


Sorry to drag up a bit of an old thread, but there never has been a shipping module for the UK that really worked for me either, so had to modify the one listed above to suit my needs.


You don't need a full postcode file, you use a table in the database with all the first halves of all the UK postcodes (AB1,AB2,AB3,etc...), of which I am currently using 2986, and assign each of those to a zone number to match whatever courier you are using.


The main problem with the contribution listed above is that it only worked if the postcodes were correctly formatted, but not everyone types them in upper case with a gap in the middle, so didn't always work.


I used a postcode regex I found elsewhere so that it splits the postcode regardless of how its entered, gap/no gap, uppercase/lowercase (ab123cd, ab12 3cd, AB123CD, AB12 3CD, Ab12bCd) and just gives you the first half of the postcode back formatted correctly to check against a zone in your db.


No need for huge drop down lists of all UK counties, it simply uses the customers postcode, or a postcode typed into the box on the ship in cart estimator.


It also give people the option of doing free shipping in their own postcode area (or list of selected postcode areas), if you do your own deliveries locally.

Link to comment
Share on other sites


I use the addon you mention, and it also has a script to format the post code correctly, when the submit button is clicked.  This checks the postcode, even for London codes, and stores under letters too.


What is the regex you use, and how do you implement it?

osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!)

Link to comment
Share on other sites


I use the addon you mention, and it also has a script to format the post code correctly

The one that came with it didn't work properly for me, it only worked if people typed the postcode in with the gap in it, as think that's just where it does some sort of preg split.


So if someone just put in AB12 it worked, and if you put in AB12 3CD it worked as splits it using the gap.


If someone enters AB123CD with no gap it throws an error.


Check yours, as that's what happened in mine, and was why I had to find another way.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...