Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Hybrid View

  1. #1
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default UK Shipping by postcode

    To all UK zencart stores !!!

    I am looking at initiating a project to develop a sophisticated shipping module that calculates shipping by postcode.

    I know this has been discussed before... and that Ryk has been active in getting something like this off the ground, but what I'm thinking of is far more extensive.

    Heres the outline:-

    UK Postcodes comprise TWO elements:

    1. The OUTBOUND CODE
    2. The INBOUND CODE

    eg: CB1 10RE

    CB1 is the OUTBOUND part of the code
    10RE is the INBOUND part of the code

    These postcodes can be GEO-MAPPED, meaning that if we know the postcode of the WAREHOUSE (or shop distribution point), we can calculate the distance to the customer's postcode.

    Now, to base a module on the WHOLE postcode (while possible) will require a significant level of input, to base it on just the OUTBOUND part is a little less complex.

    My vision is this:-

    The shop's location is identified by its postcode.

    This set's the "bullseye" for the shipping calculations.

    Through the geo-mapping, the module configures five or six shipping zones:-

    eg:

    1. 10km from shop
    2. 20km from shop
    3. 50km from shop
    4. 100km from shop
    5. 200km from shop
    6. more than 200km from shop


    The geo-mapping can work out exactly what postcodes fall into each of these 6 zones - RELATIVE to the shop's postcode.

    When a UK customer signs up, he/she gives us their postcode.

    The shipping module looks at whether the customer is UK.

    If TRUE, module is ACTIVE.

    Shipping module looks at OUTWARD portion of customer's postcode.

    Algorithm calculates and determines ZONE, based on Postcode of shop.

    Shopkeeper can determine RATES for each zone, depending on personal preferences and bespoke shipping policy.

    -----------------------------------------

    THIS CAN WORK !!!


    Take a look at the following example of how geo-mapping works (based on the relationship between POSTCODE ONE and POSTCODE TWO:-

    http://www.homeworkerzone.co.uk/home...rch.member.php

    We just need to port this concept across to zencart and we will have the ability for UK zenshops to calculate shipping using the customer's postcode.

    ----------------------------------------

    If anyone else is interested in this concept, add to this thread, and let's see if we can find someone to build this for us.
    20 years a Zencart User

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: UK Shipping by postcode

    If you are going to make such a module - why not make it flexible enough for the rest of the world to use too?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    May 2005
    Location
    Cheshire, UK
    Posts
    542
    Plugin Contributions
    3

    Default Re: UK Shipping by postcode

    @schoolboy

    Whilst I agree this would certainly be a useful feature, be mindful the UK postal system is based on weight and size of package, not based on distance within the UK. So there is not really any added advantage creating this module to be solely UK aside from the obvious "neat and flashy" sleight of hand.

    As far as I am aware, couriers also base their deliveries on weight not on distance travelled.

    All this said however, developing one for the UK as a base starting point will have its practical uses. Firstly, once it works within the UK, it should be relatively straightforward to hook it into a pan-european system. This is where it would prove most valuable. From the GEO base in the UK you would be able to instantly quote accurate postage based both on weight and distance - all from the postcode of the store (or one entered by the customer).

    The biggest issue would be where to get the accurate postcode data both for the UK and each country in Europe. You would then need to hook into individual carriers and work up a matrix of prices for each carrier based both on weight, distance and destination country.

    In my opinion this is a lot of work but if you put it together as a European Geo solution I think it would be invaluable to every single zencart user. You would be extending the shipping capabilities of zencart 1000%.

    If you do decide to do this I suggest starting with one country (UK) then extend from there. I also suggest you build in a tracking system per parcel where the user can enter the package number and track the parcel. This should be available to admin and also to the account owner in My Account. Provided you worked with individual carriers in the UK the same model will work for each country with minor alterations only needed to take into account the differences between each carrier's systems.

    I hope this gives you something to work from and please do keep me updated on progress. I think it is a great idea.

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: UK Shipping by postcode

    There is no reason why:-

    A. it can't be "adaptable" to other regions in the world where postcodes interface with geo-mapping.

    B. it incorprates a component that factors weight into the equation.

    UK Postal charges are notoriously complex (Royal Mail), but we have recently conducted negotiations with several (8 actually) private couriers, who calculate their rate principally on DISTANCE.

    As we all know... shipping calculation remains one of the most hair-pulling aspects of modern catalogue-based commerce.

    Short of praying for a solution from above, I think a concerted effort to look at how we can amalgamate the core variables in shipping:-

    Volume
    Weight
    Distance
    Value

    into a functional, customizable module. we'll be addressing some of the most pressing concerns of e-shop owners world wide.

    Zen Cart - leaders in e-commerce would significantly enhance their (already gilt-edged) reputation if they could get their heads around effective shipping configuration...

    There must be hundreds of zen cart users with appropriate technical ability to get this in motion. By working in collaboration with the core team (and all users helping to fund it) we could nail shipping issues down once and for all...
    20 years a Zencart User

  5. #5
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,244
    Plugin Contributions
    20

    Default Re: UK Shipping by postcode

    There are over 2500 OUTBOUND postcodes for the UK - full list available here.

    And you want to calculate the distance of each one from your dispatch location?

    I take it you've discovered the secret of eternal life?
    Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: UK Shipping by postcode

    Quote Originally Posted by Ryk View Post
    There are over 2500 OUTBOUND postcodes for the UK - full list available here.

    And you want to calculate the distance of each one from your dispatch location?

    I take it you've discovered the secret of eternal life?
    Hello Rick!

    Eternal life is an easier secret than this, I'm sure! I'm currently looking at a php code that successfully does the mapping calculation off the outbound postcode.

    The dbase contains the outbound code and the latitude and longditude co-ordinates. Using cartesian principals, the algorithm looks at the two postcodes' latitude and longditude co-ordinates, then calculates distance. (it's "as the crow flies", but that's good enough for me).

    What I now need to do (or get a much more clever lady or gent to do) is work out how we parse the result of that calculation into a shipping option...
    20 years a Zencart User

  7. #7
    Join Date
    Aug 2004
    Location
    Belfast, Northern Ireland
    Posts
    2,480
    Plugin Contributions
    14

    Default Re: UK Shipping by postcode

    Hi,

    Quote Originally Posted by schoolboy View Post
    I am looking at initiating a project to develop a sophisticated shipping module that calculates shipping by postcode.
    We have developed a basic table rate shipping module which allows setting of differing prices for anywhere in the UK based on the outbound part of the destination postcode.

    It works just like the normal table rates module, i.e. the rates are based on price or weight falling within specific ranges.

    It isn't geomapped but it may be a useful stop gap solution for you as it allows setting specific outbound ranges to be accepted or denied for a particular table of rates.

    The more tables of rates (zones) you set up the more specific you can be about what the prices for a particular country/postcode combination are...

    E.g.

    Having

    "GB:BT1-10,GB:BT24-27" for the first zone and

    "GB" for the second zone

    will mean that a customer at BT100JX will have the first zone's table rates applied whereas a customer at BT134JF will have the table rates of the second zone applied (GB is basically a catchall/fallover for the UK in this case).

    The module also works with Portugese, Spanish and French postcodes (E.g. FR:21-23 covers part of Corsica 21000 - 23000).

    It will take some time to bring this module to release status so yesterday I made this post about this module.

    All the best...

    Conor
    ceon

  8. #8
    Join Date
    Aug 2004
    Location
    Belfast, Northern Ireland
    Posts
    2,480
    Plugin Contributions
    14

    Default Re: UK Shipping by postcode

    Hi,

    Forgot to mention that the module automatically enables/disables itself based on the customer's postcode so you don't get any "We don't ship to your Country/Postcode" error messages... nasty things! :)

    It also allows the defining of specific messages for each zone in the language files. For example, from our client's config:

    PHP Code:
    define('MODULE_COUNTRY_POSTCODE_TABLE_TEXT_TITLE_3''Flat Rate or FREE!');
    define('MODULE_COUNTRY_POSTCODE_TABLE_TEXT_WAY_3''Free if Order Total Over £50, £2.95 if Under');

    define('MODULE_COUNTRY_POSTCODE_TABLE_TEXT_TITLE_5''Flat Rate');
    define('MODULE_COUNTRY_POSTCODE_TABLE_TEXT_WAY_5''Standard Shipping to Madeira/Azores'); 
    These language definitions also use fallbacks (if you don't define definitions for zone 4, as above, the definition for zone 3 is used).

    Think this would be a nice module to bring to release status but we'd need a few people to be interested... can't spend a day off work writing something only 1 or 2 people want (unless someone wants to donate)!

    All the best...

    Conor

  9. #9
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: UK Shipping by postcode

    Quote Originally Posted by conor View Post
    Hi,

    Forgot to mention that the module automatically enables/disables itself based on the customer's postcode so you don't get any "We don't ship to your Country/Postcode" error messages... nasty things! :)

    It also allows the defining of specific messages for each zone in the language files. For example, from our client's config:

    PHP Code:
    define('MODULE_COUNTRY_POSTCODE_TABLE_TEXT_TITLE_3''Flat Rate or FREE!');
    define('MODULE_COUNTRY_POSTCODE_TABLE_TEXT_WAY_3''Free if Order Total Over £50, £2.95 if Under');

    define('MODULE_COUNTRY_POSTCODE_TABLE_TEXT_TITLE_5''Flat Rate');
    define('MODULE_COUNTRY_POSTCODE_TABLE_TEXT_WAY_5''Standard Shipping to Madeira/Azores'); 
    These language definitions also use fallbacks (if you don't define definitions for zone 4, as above, the definition for zone 3 is used).

    Think this would be a nice module to bring to release status but we'd need a few people to be interested... can't spend a day off work writing something only 1 or 2 people want (unless someone wants to donate)!

    All the best...

    Conor
    Hello Conor


    I use your C.Card module on some sites, so if anyone can tackle this shipping thing, I'll bet it's YOU !!!


    Thanks so much for the input, and yes... I think we need to see who / how many UK zen users would like something like this.

    The geomapping, I believe, is fundamental to it...

    Then... if we could build in some feature that also allows shop owners to factor in a volumetric weight component (over and above the geomapping function), I think we're on our way:

    The store owner should also have options to do the following:-

    1. Configure as many "distance zones" as they need (up to a maximum of ten, possibly) The input screen would say something like:

    - How many zones do you want to set up, and what is each zone's radius from the shop?


    2. Shop owner then applies a cost to each zone:

    - Zone 1 = £5.00 ; Zone 2 = £10.00 ; Zone 3 = £15.00 (etc)

    3. Then, an OPTION to include a weight/volume surcharge to each zone. (Zencart can already record item weight, and totals these up in the shopping cart.)

    - Zone 1 weight/volume surcharge = £1.50 / kilogram ; Zone 2 weight/volume surcharge = £1.25 ; (etc)

    ----------------------------------------

    I'll undertake to commit £100 to the project to start with - anyone else out there prepared to do the same???

    -----------------------------------------
    20 years a Zencart User

  10. #10
    Join Date
    Aug 2004
    Location
    Belfast, Northern Ireland
    Posts
    2,480
    Plugin Contributions
    14

    Default Re: UK Shipping by postcode

    Hi,

    Apologies for the delay in getting back to you, I was having a good think about what should be done about this. (Actually, I'd written most of this two weeks ago but we got busy... where does the time go? ;) )...

    Since it's quite an advanced module I was thinking about including the package tracking features suggested by JollyJim. Then I started thinking about completely rewriting the Zen Cart shipping class to allow the reuse of shipping modules each with its own configuration (for Next Day Express Delivery as an extra option etc.). I've finally come round to deciding that that's too much to take on right now (purely in terms of time, none of it would be hard to code) and that getting the following going would be a good enough module to be useful for the moment...


    The module can define an unlimited number of Zones to be shipped to. (The number is adjusted through the admin and extra Zones added dynamically, no hacking of variables within files is required; I've got this code working already [in the only way Zen Cart will allow]).

    Each Zone works like the "Table Rate" module... i.e. you can define various Ranges for each Zone, with each Range having an individual Shipping Price.


    The module would have a two step process in determining what Shipping Price should be applied to the current order:


    1. First off, the module determines which Zone the user is in by looking at their ISO Country Code, then the Outbound portion of their postcode (for UK), or initial digits of their postcode (for France, Portugal, Italy etc.).

      Each Zone you have defined in the Admin is checked in numerical order to see if it matches the customer's Country Code/Postcode.

      Two methods can be used to determine if the customer's Country Code/Postcode match...


      • If the current Zone being examined is set up to use Geolocation Matching then a method for determining the distance from the shop by comparing the shop's postcode to the customer's Country Code/Postcode is called if it exists. E.g. if your shop is in the UK and the customer's Country Code is FR and their postcode is 20030 then the following method will be called if it exists: $this->getDistanceGBFR('20030'). The distance is then checked against the table of distances defined for this zone. If it matches one, this zone is used for the shipping calculation.

      • If the current Zone being examined is set up to use Postcode Range Matching then the customer's Postcode is simply compared against the ranges defined for this zone, again if a method for checking the range for the customer's Country Code exists. E.g. For the UK you might set up some ranges as follows:

        GB:BT1-10,GB:BT24-27

        Then, if the customer's Postcode is BT124FG the method $this->matchesARangeGB('BT124FG', 'GB:BT1-10,GB:BT24-27') is called. If the customer's Postcode matches one of the ranges passed this zone is used for the shipping calculation.

        (Negation modifiers can also be used for Postcode Range Matching.. !GB:BT13 would exclude UK postcodes in the BT13 region from the current zone).


    2. Once a (the first) matching Zone has been identified, the Ranges for that Zone are used according the mode of operation for the module.

      The module would be able to select a particular Shipping Price to use based on Weight or Price in exactly the same way the Table Rate module works (You had mentioned volumes... how were you thinking volume would be tracked? An extra field in the product form?).




    I think that's a reasonably flexible system which should provide many advantages to shop owners. It could be so much better but, as I said, it will do for the minute, I don't have time to rewrite Zen Cart's shipping right now.

    Don't forget that this module uses a "match or move on" policy... you could end off your module configuration with the last few zones just being overall country code matches: FR, IE etc. with either a table of rates for each or just an individual price (just like every other zone). This would allow you to be very specific price-wise locally then much less specific globally.

    Last thing... the module would of course disable/enable itself based on whether or not the customer's Country Code/Postcode combination matches any of the defined zones.

    Looking forward to your thoughts on this... hopefully I'm clear enough in what I'm trying to convey above. Also, hopefully a few more people are interested... if so please let me know... it would really raise my priority on getting this going if I knew more people really wanted it (or wanted to contribute towards developing it ;) ).

    All the best...

    Conor
    ceon
    Last edited by conor; 22 Mar 2007 at 09:23 PM.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. UK Shipping by Postcode
    By Z3NN3D in forum Addon Shipping Modules
    Replies: 58
    Last Post: 15 Sep 2022, 04:38 PM
  2. v151 Shipping to postcode in Canada
    By Skyland in forum Addon Shipping Modules
    Replies: 1
    Last Post: 21 Mar 2014, 07:09 PM
  3. Shipping by Postcode
    By billett in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 6 Oct 2009, 09:31 AM
  4. Stuck - Shipping based on UK postcode
    By backinthesaddle in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 28 Feb 2009, 11:12 PM
  5. Shipping Nightmare - UK Postcode Solution?
    By Kegless.co.uk in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 3 May 2007, 02:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg