Zen Cart Logo
Forums / Addon Shipping Modules / Region Tables 1.0.0 Released!

Region Tables 1.0.0 Released!

Views: 54,423

Results 1 to 20 of 166
17 Apr 2007, 7:32 PM
#1
conor avatar

conor

Passed

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

Region Tables 1.0.0 Released!

Hi,

It gives me great pleasure to release a new, hugely configurable shipping module for Zen Cart!

The Region Tables shipping module is a very comprehensive module for Zen Cart which allows store owners to specify shipping rates based on a combination of the customer's shipping address and either the total weight or the total price of the order.

  • The rate applied to an order is determined by first identifying which region a customer's shipping address is in:

Each individual region is defined in the module's admin configuration in either of two ways:

  1. Geolocation - A region can be set as being within a certain distance from the store (in Km/Miles).
  2. Country/Postcode Matching - A region can be defined as being a country or a country and postcode range combination. (E.g. GB:BT matches all of Northern Ireland, US:070-089 matches the state of New Jersey in the US).

Countries currently supported for Postcode Matching include: Canada, Spain, France, the UK, Portugal and the US.

ALL other countries supported by Zen Cart are supported, just without the benefit of postcode matching (although it's easy to add this for each country!).

The regions defined are checked in numerical order to see if they match the customer's address, so any number of methods for determining the customer's region can be employed until a match is found.

For example: the first region could be a 10Km radius "Local Delivery" region and the subsequent region could attempt to match an address based on the customer's postcode (or even their country and postcode) if they are outside that region.

There's no need to mess about with Zone Definitions with this module... everything can be done based on the country and/or postcode of the customer's shipping address! :)

  • Once the region a customer's shipping address is in has been determined, the shipping rate is calculated based either on the weight or the total price of the order:

Unlike most other Zen Cart shipping modules, Region Tables allows the store owner to specify an unlimited number of “Tables” of Rates/Shipping Methods per Region, enabling the possibility of offering a “Standard Delivery” rate, an “Express Delivery (Next Day)” rate and a “Express Delivery (Next Day Before 9AM)” rate, or such like, at the same time.

As the tables of rates are specific to a region, each region can have completely different shipping options, allowing for a never-before-seen level of configurability in a shipping module!

Downloads, a Full Feature List and Documentation are available on the module's website:

http://dev.ceon.net/web/zen-cart/regiontables/


If you like this module, PLEASE DONATE! It has taken a huge amount of time to develop and we don't earn anything for developing it!

Enjoy! :clap:

All the best...

Conor
ceon

17 Apr 2007, 8:03 PM
#2
conor avatar

conor

Passed

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

Re: Region Tables 1.0.0 Released!

Hi,

I realise the docs are quite text-heavy so just to help newcomers get a better idea of what this module can do for them, here's an example from the docs for setting up three regions for the US... It should hopefully make it clear how flexible/powerful this module is...

The US

US postcodes are numeric, consisting of five digits. There is also an extended version, called "ZIP+4", which adds a hyphen and four additional digits following the main ZIP code, to identify a smaller geographical area or single large entity. Only the first 5 digits are made use of by this module.

Example: To set up a Shipping Method for the City of “Seattle”, a Shipping Method for the state of “Washington” and a Shipping Method for the “Rest of the US” you would add three regions with the following Countries/Postcodes configuration values:

Region 1: US:981 (Covers 98102, 98152, 98199 etc. but not 98012 or 98200 etc.)

Region 2: US:980-994 (Covers 98000, 98102, 99450 etc. but not 99500 or 99655 etc.)

Region 3: US (Covers all other states and cities in US)

There are quite a lists of US Zip codes. One can be found in this wikipedia article.

Example language definitions for the above regions could be as follows:

define('MODULE_REGION_TABLES_REGION_1', 'US Postal Service');

define('MODULE_REGION_TABLES_REGION_1_METHOD_1_TITLE', 'Postage to Seattle');

define('MODULE_REGION_TABLES_REGION_2_METHOD_1_TITLE', 'Postage to Washington State');

define('MODULE_REGION_TABLES_REGION_3_METHOD_1_TITLE', 'Postage to the US');
18 Apr 2007, 11:39 AM
#3
dasonix avatar

dasonix

New Zenner

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

Re: Region Tables 1.0.0 Released!

This mod is great.

I do have a few teething problems though.

I have set up the zones into 5 areas based on our carriers zone setup.

zone 1 = GB
zone 2 =GB:AB1-3,GB:AB10-16,GB:AB21-25,GB:AB30,GB:AB39,GB:DD1-5,GB:DD7-11,GB:KY13,GB:PH2,GB:PH11-14
Zone 3 = GB:AB31-38,GB:AB41-45,GB:AB51-56,GB:FK19-21,GB:HS1-9,GB:IV1-28,GB:IV30-32,GB:IV36,GB:IV40-49,GB:IV51-56,GB:KA27-28,GB:KW1-17,GB:PA20-49,GB:PA60-78,GB:PA80-88,GB:PH1,GB:PH5-10,GB:PH15-26,GB:PH30-44,GB:ZE1-3
Zone 4 = NI:BT,GB:IM
zone 5 = CI:GY,CI:JE,GB:TR21-25,BF
```If i change my account postcode to a zone 2 or zone 3 postcode e.g. AB1 or PA20, the module still shows me as being in zone 1 (I have changed the txt to say the relevent zones) and still charges me the Zone 1 price (all other zones have diff prices set)

If I change my Zone and Postcode to a CI or NI area and postcode all shows correctly.

any ideas.

p.s. If anybody uses ANC those are the correct zone splits for there services.
18 Apr 2007, 1:57 PM
#4
halldorr avatar

halldorr

New Zenner

Join Date:
Apr 2007
Posts:
4
Plugin Contributions:
0

Re: Region Tables 1.0.0 Released!

A fantastic module for sure so far. Took some digging into all of the documentation and that Wikipedia link but it is almost there. I'm having issues with the price per weight at the moment.

I have it set up to be based off of weight and it seems to be doing something odd with the final price unless my understanding of the module description is wrong (can totally be possible).

[B]Region 1 Countries/Postcodes[/B]
US30000-31999,US:39901
[B]Region 1 Shipping Method 1 Table of Rates[/B]
15:14.00,200:98.00,400:115.00,600:150.00,800:160.00

When I test a few items out, the total order comes to 229lbs.

Total Items: 6  Weight: 229lbs  Amount: $541.50

According to my Table of Rates, I'd want the shipping to be 115.00. However, on the estimated shipping page it's displaying a much higher price

Delivery (Delivery (6 x 41.98Kg(s)))          $606.00

Am I completely misunderstanding how this all works?

18 Apr 2007, 2:29 PM
#5
dasonix avatar

dasonix

New Zenner

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

Re: Region Tables 1.0.0 Released!

First off I fixed my problem as i had the catch all set as first option., moved all up 1 and catch all to bottom all now workign like a pure dream.

HALLDORR:

You seem to have a mixture od Lbs and KG in that info you gave. That might be the problem?

18 Apr 2007, 2:35 PM
#6
halldorr avatar

halldorr

New Zenner

Join Date:
Apr 2007
Posts:
4
Plugin Contributions:
0

Re: Region Tables 1.0.0 Released!

dasonix:

First off I fixed my problem as i had the catch all set as HALLDORR:

You seem to have a mixture od Lbs and KG in that info you gave. That might be the problem?

The Kg hanging around was just from the language file, have changed it to lbs, same issue.

I am either missing something or completely misunderstanding the way the by weight is supposed to work.

I want to charge a price based on the total weight of the order. So in my rates like so: 15:14.00,200:98.00

I was thinkin anything between 15-199lbs (total order weight) would be charged $14.00 for shipping. Anything 200-next level would be charged 98.00 for shipping.

18 Apr 2007, 4:04 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Region Tables 1.0.0 Released!

15:14.00,200:98.00

means up to 15 lbs costs $14.00, 15-200 lbs costs $98.00. I'm not sure whether more than 200 lbs is also $98.00, or just undefined i.e. $0.00. It would be easy to check if you have shipping set up - just make test orders.

19 Apr 2007, 4:30 PM
#8
conor avatar

conor

Passed

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

Re: Region Tables 1.0.0 Released!

Hi

halldorr:

A fantastic module for sure so far. Took some digging into all of the documentation and that Wikipedia link but it is almost there. I'm having issues with the price per weight at the moment.

Thanks for the compliment! :)

I admit that the documentation is a bit daunting at present. I hope to make it easier to swallow but it just takes so much time to write that you can get fed up looking at it and require a break from the whole process! :)

Delivery (Delivery (6 x 41.98Kg(s)))          $606.00

I'm baffled as to how you are getting a total of $606. The way you have configured the rates is exactly right: 229 falls within the 200-400 bracket and therefore should have a rate of $115 applied. What tax class are you using?

Could you possibly send me log in details for your site so I can debug this for you? Please send the details to the e-mail address on the module's support page.

Thanks.

All the best...

Conor

19 Apr 2007, 4:35 PM
#9
conor avatar

conor

Passed

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

Re: Region Tables 1.0.0 Released!

Hi,

Great to see more people using this module.. we're really pleased that people are liking it so far! :)

gjh42:

I'm not sure whether more than 200 lbs is also $98.00, or just undefined i.e. $0.00.

With the example you gave, an order weighing more than 200lbs would result in an "Undefined Rate" error message being displayed to the customer. I think that behaviour is more appropriate than allowing the module to pick a random rate (like 0!).

All the best...

Conor
ceon

19 Apr 2007, 4:40 PM
#10
conor avatar

conor

Passed

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

Re: Region Tables 1.0.0 Released!

Hi,

Just noticed a separate issue here...

halldorr:

[B]Region 1 Countries/Postcodes[/B]
US30000-31999,US:39901


You have forgotten the colon in your first country/postcode combination... US30000-31999 should be US:30000-31999.

Actually, you don't need to specify all five digits as you have done, you could simply replace the above with:

US:30-31,US:39901


The module will then match all zip codes that start with 30 or 31 (which is the range 30000-31999).

Less typing for you then. :)

All the best...

Conor
19 Apr 2007, 5:10 PM
#11
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Region Tables 1.0.0 Released!

"Undefined Rate"... that covers it well. Good thinking!

22 Apr 2007, 12:58 PM
#12
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: Region Tables 1.0.0 Released!

Hi Conor,

Thoughts for a future release. Would it be possible to pull the region definition and region rate language defines from regiontables.php and add them to the headings in Admin?

If you have a complex set up as in my case with 10 regions and up to 3 set of table rates per region it is easy to get lost. It would help a great deal if the headings included the info as entered in regiontables.php. For example

Region 3 Countries/Postcodes - (UK Mainland)
Region 3 Shipping Method 1 Table of Rates (Parcel Force 24)

Hope you get my drift. :smile:

Regards

Brent

22 Apr 2007, 2:18 PM
#13
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: Region Tables 1.0.0 Released!

Hi Conor,

Thinking about it this is probably an awful lot of coding so a simple free type text field in Admin would do. After all you'll only enter the details once but will probably tinker with the rates more often.

Regards

Brent

23 Apr 2007, 11:26 AM
#14
conor avatar

conor

Passed

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

Re: Region Tables 1.0.0 Released!

Hi Brent,

Brent:

Would it be possible to pull the region definition and region rate language defines from regiontables.php and add them to the headings in Admin?

Oh, that's a good idea! Should have thought of that one myself. Makes the configuration section much longer but as it is adding descriptions to the titles, it does so while at the same time making it easier to navigate!

A new version will be on its way shortly with this functionality... it won't require a database update so upgrading will be the simple matter of copying the new files over the existing files.

Brent:

Thinking about it this is probably an awful lot of coding so a simple free type text field in Admin would do. After all you'll only enter the details once but will probably tinker with the rates more often.

It was a deliberate design decision not to have a text field in the admin... you only enter details once IF you use only one language on your shop... the language defines are abstracted from the main configuration and therefore clunky/unintuitive but they do allow the use of multiple languages.

All the best...

Conor
ceon

23 Apr 2007, 11:35 AM
#15
conor avatar

conor

Passed

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

Re: Region Tables 1.0.0 Released!

Hi,

Just realised that updating the titles in the configuration can only be done at one point... when the admin modules.php file calls the "keys()" method to read the configuration values.

This would mean that to add the titles to each configuration value the language file will have to be parsed every time the keys() method is called and the key titles updated in the database.

Would people here object to having their databases tampered with in this way? I'd of course try to find some way to make sure this only happens on the admin side otherwise it would cause multiple database updates every single time the module was queried (which would be an unnecessary load on the server). If that couldn't be done then I could of course add a switch to allow this functionality to be turned on/off as desired.

Unfortunately this behaviour is just a legacy of the way osC/ZC ahs been built and can't be avoided. (At least we can get around it though... :) ).

All the best...

Conor
ceon

24 Apr 2007, 4:28 PM
#16
fred9v avatar

fred9v

New Zenner

Join Date:
Nov 2006
Location:
Quebec, Canada
Posts:
32
Plugin Contributions:
0

Re: Region Tables 1.0.0 Released!

Wow, thanks conor for your work and for notifying me of the update!

I have installed it and everything seems to work just fine! I've added a few post codes to the admin to test things out but I'll have to sit down a few more hours to configure the admin properly to let my customers choose between 3 shipping methods in canada and different rates for US and worldwide.

I fear I'll have a lot of work to do in order to configure that mod but nothing compared to the hours you must have spent writing the code!

Thanks again and I'll let everyone know how things are going and share my table rates with those interested!

16 May 2007, 3:15 PM
#17
john99 avatar

john99

New Zenner

Join Date:
May 2007
Posts:
1
Plugin Contributions:
0

Re: Region Tables 1.0.0 Released!

Is there a way to set a "catch all" to indicate all two character ISO country codes that are not specifically defined?

17 May 2007, 8:45 AM
#18
conor avatar

conor

Passed

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

Re: Region Tables 1.0.0 Released!

Hi,

john99:

Is there a way to set a "catch all" to indicate all two character ISO country codes that are not specifically defined?

Not currently I'm afraid.

All the best...

Conor

26 May 2007, 11:28 AM
#19
beto_pu avatar

beto_pu

New Zenner

Join Date:
Apr 2007
Posts:
14
Plugin Contributions:
0

Re: Region Tables 1.0.0 Released!

First of all GREAT MOD Conor!!!!

I'm from Spain which is a mess in terms of shipping... I need to shipping without taxes for the Canary Islands and with taxes to the rest of Spain... This is important as we sell mainly to other companies. Can you give me a clue. Thank you /Go raibh maith agat!!!

31 May 2007, 1:48 PM
#20
peekay avatar

peekay

Zen Follower

Join Date:
Jun 2006
Location:
U.K.
Posts:
103
Plugin Contributions:
0

Re: Region Tables 1.0.0 Released!

Congratulations on a very nice mod!. Using 'price' as the calculation method, my client can set break-points based on order value after which a different shipping method is used. The lang definitions make it clear to the customer how we plan to deliver their goods and because the module hides lower-priced methods after the break-point is reached, we know that shipments have adequate insurance cover.

Only problem I have is with the Zen Cart shipping estimator. If I select 'Ireland' as the country the IE rates appear. But with 'United Kingdom' selected (and no postal code entered) I get nothing. I thought the catchall GB region tables would display in that situation?. I tried moving GB to the bottom of the regions but still no joy.

Also, if I select 'Singapore' I was hoping for the 'We do not ship there' message, but alas not.

Any idea what I might have done wrong? Using 1.3.7 :dontgetit