Forums / Addon Shipping Modules / Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Locked
Results 1 to 20 of 37
This thread is locked. New replies are disabled.
29 Mar 2007, 15:05
#1
conor avatar

conor

Passed

Join Date:
Aug 2004
Posts:
2,480
Plugin Contributions:
3

Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Hi,

It gives me great pleasure to release the first version of a new, hugely configurable shipping module for Zen Cart for beta testing!

There are no known bugs, but before we mark this off as being release status we'd like as many people as possible to try it out for themselves.


Module Overview

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).


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.

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 (actually, any other) Zen Cart shipping modules, Region Tables allows the store owner to specify an unlimited number of sets 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!



We'd greatly appreciate feedback on this module!

We've spent a considerable amount of time developing the module and writing the documentation (that alone took days!) so all feedback on how we can make it better, or make the documentation clearer is really appreciated by us.

Because this module is so flexible (certainly compared to any other ZC shipping module), it is essential for us that we make its configuration instructions as simple as possible. We've developed other modules for ZC and the amount of time that can be taken up with helping out users can be considerable, yet those other modules aren't nearly as configurable as this module! We really don't want to be caught up answering questions about this module all the time so hopefully the documentation is easy enough to follow. If not, please make suggestions as to how to improve it (reasonable suggestions only of course ;) ).


Let me have it!

Thanks to anyone who beta tests this module! Please post your comments in this thread.

Once the beta testing phase is over well start up a proper support thread on these forums.


The downloads and documentation can be found at:

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



All the best...

Conor
ceon
29 Mar 2007, 16:39
#2
conor avatar

conor

Passed

Join Date:
Aug 2004
Posts:
2,480
Plugin Contributions:
3

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Hi,

Caught a small bug... the UK geolocation SQL queries in geolocation_gb.php weren't using Zen Cart's DB_PREFIX.. the .zip archives have been updated with fixed versions of these files.. apologies to anyone who was caught out by this!

All the best...

Conor
29 Mar 2007, 17:30
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Posts:
10,324
Plugin Contributions:
0

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Wow! That was fast, Conor...

I've downloaded the files (with the little big fix) and will put it to the test.

True to my word, there's a small token of gratitude on its way.
29 Mar 2007, 21:00
#4
conor avatar

conor

Passed

Join Date:
Aug 2004
Posts:
2,480
Plugin Contributions:
3

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Hi,

Yes, unfortunately the module is up to beta 2 already! :lamo:

Hopefully that's all the bugs ironed out though...

It turns out that the header_php.php file for the checkout_shipping page works fine... just not in the way it might be expected!

The Region Tables module has been upgraded to version beta 2 as a result.

All that has changed is that the header_php.php file DOES NOT need to be modified any longer and the main regiontables class file has been updated to conform to the way ZC works.


To upgrade from beta1 to beta2, simply undo any changes you made in the header_php.php file and copy the following file from the new beta2 archive OVER the files from beta1.

The only file that has changed is:

/includes/modules/shipping/regiontables.php


So, thankfully, this is an easy update to make... there's no need to remove the module or to have to recreate any configurations... just update that file and you'll be fine.



You could get away with not changing the header_php.php file back as well but you might as well so taht you are back to having a nice and clean ZC core! :)

Apologies for the mistake to those who had downloaded beta1 already.

All the best...

Conor
30 Mar 2007, 01:00
#5
cjsmiff avatar

cjsmiff

Zen Follower

Join Date:
Jul 2006
Posts:
167
Plugin Contributions:
0

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Fab module! Will definitely donate on payday!

Have amended the uk_postcodes.sql file as the last 2 statements weren't being processed,

For both statements I have changed:

INSERT INTO `postcodes` (`Postcode_ID`, `Pcode`, `Grid_N`, `Grid_E`,
`Latitude`, `Longitude`)

to

INSERT INTO
`uk_postcodes` (`id`, `postcode`, `grid_n`, `grid_e`, `latitude`, `longitude`)

The sql query now works fine.

Cheers
Claire
:thumbsup:
30 Mar 2007, 08:35
#6
conor avatar

conor

Passed

Join Date:
Aug 2004
Posts:
2,480
Plugin Contributions:
3

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Hi Claire,

cjsmiff:

Fab module! Will definitely donate on payday!


Glad to hear that you like it! :thumbsup:

cjsmiff:

Have amended the uk_postcodes.sql file as the last 2 statements weren't being processed


Deary me! That was a very simple mistake! I'm a bit embarassed about that one.

I've removed the two extra SQL statements from the file and now the INSERT query inserts all UK postcode data correctly. It's bizarre the way it splits up the insert for just a few thousand records... will have to be more careful when using third party code in future! ;)

Thanks for letting me know about that error!

I've updated the version of the module to beta 3... all that has changed is the SQL file for UK postcodes has been fixed. For those who have already installed the module it might be worthwhile to use PhpMyAdmin or the likes to remove the uk postcodes database table and then re-run the new version... better safe than sorry (otherwise you could be missing two thirds of the data!).

Get Beta 3

Hopefully that's all the bugs fixed now... where's the "fingers crossed" smiley? :blink:

All the best...

Conor
30 Mar 2007, 09:06
#7
pcmt avatar

pcmt

New Zenner

Join Date:
Jun 2006
Posts:
59
Plugin Contributions:
0

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

When I try to add the table to the database (Tools -> Install SQL Patches) I get this error message:

1064 You have an error in your SQL syntax near 'ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2822' at line 1
in:
[CREATE TABLE zen_zen_uk_postcodes ( id int(11) NOT NULL auto_increment, postcode tinytext NOT NULL, grid_n varchar(15) NOT NULL default '', grid_e varchar(15) NOT NULL default '', latitude varchar(15) NOT NULL default '', longitude varchar(15) NOT NULL default '', PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2822;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.


The only change I've made to the .sql file is to add zen_ to the beginning of the name of the table.

Any ideas?

Patrick
30 Mar 2007, 09:51
#8
conor avatar

conor

Passed

Join Date:
Aug 2004
Posts:
2,480
Plugin Contributions:
3

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Hi,

Your version of MySQL is very old! :ohmy:

However, there was no real reason to use a MySQL 4.1 file so I've updated the SQL file in the contribution for compatibility with MySQL 3.x and up.

This has brought the version of the contribution to beta 4 (oh dear! :) ).

Anyone who has installed the module and taken note of the upgrade notes for versions up to beta 3 have no need to make any changes... this update is solely for MySQL 3.x and 4.0 compatibility.

Get Beta 4!

pcmt:

The only change I've made to the .sql file is to add zen_ to the beginning of the name of the table.


When you use Tools -> Install SQL Patches you should not set a database prefix... the SQL patch tool automatically adds the prefix. You only add a prefix manually if you are running the SQL file manually through PHPMyAdmin or the likes. If you look at the error message you posted you should notice that your prefix has been changed to zen_zen_!)

Please download beta 4 and run the SQL file through the SQL patch tool without adding any prefix and that should be you sorted! :)

All the best...

Conor
30 Mar 2007, 10:09
#9
pcmt avatar

pcmt

New Zenner

Join Date:
Jun 2006
Posts:
59
Plugin Contributions:
0

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Conor, many thanks for that. I did in fact need to add the zen_ prefix to the table name in the .sql file, otherwise the error message came up that the table did not exist.

Anyway, it seems to have installed itself okay. I will now look at how it works.

A big thanks for what you've done with this.

Best regards.

Patrick

ps: I'm looking at this on a test server at present.
01 Apr 2007, 10:50
#10
conor avatar

conor

Passed

Join Date:
Aug 2004
Posts:
2,480
Plugin Contributions:
3

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Hi Patrick,

pcmt:

I did in fact need to add the zen_ prefix to the table name in the .sql file, otherwise the error message came up that the table did not exist


Yes, you're right. Zen Cart will add the prefix only if the SQL command and the table/database/column name is on the same line. It wasn't for the INSERT statement so I've updated the SQL file to avoid that problem occurring for people in future.

Glad you like the module... hopefully the fact that there haven't been any other issues brought up here means that it's doing what people need?!

All the best..

Conor
02 Apr 2007, 18:45
#11
fred9v avatar

fred9v

New Zenner

Join Date:
Nov 2006
Posts:
32
Plugin Contributions:
0

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

:clap: conor, you are the best!

First of all, please excuse my not so good English as I'm French...

That contrib is exactly what I've been looking for. I've installed it last night and tested it a little bit and I'm pretty sure that's the only shipping module I'll want to use except for the store pickup that I need too!

Now, I'm located in Canada and as the documentation say that this contrib works for US, I guess it should work for me too but I just don't know how to get it to work. We have 12 provinces (wich is basically the same thing as states in the US) with different postal codes (zip codes) containing alphanumeric values.

An example for a postal code in Montreal would be H2L 4K4

I won't be using geolocations so I guess my problem will be easier to solve.

I already have Countries and Zones defined in Zen Cart so I can already use CA for Canada but I can't use CA:QC for Quebec for example.

I have no Zone Definitions yet.

Now, my question is how would I configure Zen Cart and this shipping module to set shipping costs for a particular Province and sets of postal codes?

I'm sure this is something possible as our postal code system is working on the same pattern as US or UK.

Any help would be greatly appreciated and be sure that I'll contribute my work to anyone who need it once I can solve this problem!

Thanks!
02 Apr 2007, 19:51
#12
conor avatar

conor

Passed

Join Date:
Aug 2004
Posts:
2,480
Plugin Contributions:
3

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Bonsoir! :)

Fred9V:

First of all, please excuse my not so good English as I'm French...


Au contraire, votre anglais est bon!

An example for a postal code in Montreal would be H2L 4K4


I've had a look at the details about the Canadian postal codes and they aren't too complicated. In the following:

K1A 0B1

"K1A" is a "Forward Sortation Area" (FSA)

whereas

"0B1" is a "Local Delivery Unit"

I've updated the module to cope with very basic ranges of "Forward Sortation Areas" and will upload a new version of the module tomorrow.

I must warn you though that the Canadian system is more complex than that of the UK and the US... it appears that even within a Canadian Province, areas with similar FSAs can be quite far apart, so you may have quite a bit more work to do to set up your region definitions.

I've found a good PDF document which covers the entire country..

Canadian Provinces and Postal Codes

Once I've uploaded beta version 5 of this module, you'll be able to use ranges like CA:A2-A3 etc. You'll then have to go through this (rather large) PDF and find out what codes you need to use for what regions.

Talk to you tomorrow then! :)

All the best...

Conor
03 Apr 2007, 20:55
#13
conor avatar

conor

Passed

Join Date:
Aug 2004
Posts:
2,480
Plugin Contributions:
3

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Hi Everyone!

Just to let you know that Beta 5 is out!

Everyone should upgrade... instructions follow shortly:

The main changes are that Canadian postcode ranges are now supported and the documentation now has examples for each country which has postcode range matching.

The list of countries which currently have postcode range matching are:

Canada, Spain, France, the UK, Portugal and the US


Upgrade Instructions:

  1. Download the module
  2. Copy the files over the existing files in your shop
  3. That's it! :)


There is no need to "Remove" the module and "Install" it again, no database changes are present and therefore you don't need to touch your precious configurations! :)

I think this is the final beta version. Please give any feedback you have as soon as possible!

We'd like to release this as version 1.0.0 in a few days so please let me know how you are getting on with this module... we haven't got much feedback yet. :unsure:

Download Beta 5!

All the best...

Conor
ceon
05 Apr 2007, 00:17
#14
cjsmiff avatar

cjsmiff

Zen Follower

Join Date:
Jul 2006
Posts:
167
Plugin Contributions:
0

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Hi,

Here's a thought for you:

I need to set shipping rates as follows for the UK,

Shoes £4.99 then £1 per additional item
T-Shirts £3.99 then £1 per additional item
Jewellery £2.99 then £1 per additional item

Can I manipulate this module to do that, cos my brain is fried - hehehe!

Cheers
Claire
05 Apr 2007, 07:36
#15
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Posts:
10,324
Plugin Contributions:
0

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Is this following idea necessary... ??

Customers can (and often do) input an incorrect postcode when they register, or add another address.

Conor... what about a "popup" that says:

"It is not possible to calculate shipping using this method, because we are unable to verify your postcode. Please log into your user account and ensure that the postcode for this shipping address is correct."
05 Apr 2007, 10:36
#16
conor avatar

conor

Passed

Join Date:
Aug 2004
Posts:
2,480
Plugin Contributions:
3

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Hello there! :-)

schoolboy:

"It is not possible to calculate shipping using this method, because we are unable to verify your postcode. Please log into your user account and ensure that the postcode for this shipping address is correct."


Currently, the postcode matching methods return an error message if the customer's postcode isn't of the expected format (actually, the methods only check for the correct length(s) after having removed whitespace etc. but they can easily be extended to check exact formats.).

When a customer's postcode can't be checked the method sets an error message and returns to the calling method, at which point the following is run:

[PHP]
// An error occurred when attempting to check the postcode
// Move on to checking the next country/postcode combination
// rather than alerting the user about their invalid
// postcode format
continue;
[/PHP]

So... what you are asking me is that, instead of continuing on to check other regions, you'd like the module to stop at this point and display an "Unable to verify your postcode" message?

Now that I've written all that, I think the answer's obvious... it should definitely do this.

Well I've written all of this so I'm going to post a reply anyway.

The requested behaviour will be implemented in version 1.0.0 of this module.. which I'd like to release soon.

Does anyone else have any other feedback?

If no responses are made within the next few days the beta testing phase will be closed and the module brought to 1.0.0!

All the best...

Conor
05 Apr 2007, 10:37
#17
conor avatar

conor

Passed

Join Date:
Aug 2004
Posts:
2,480
Plugin Contributions:
3

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Hi,

cjsmiff:

Can I manipulate this module to do that, cos my brain is fried - hehehe!


I'm afraid not, sorry!

All the best...

Conor
ceon
05 Apr 2007, 12:30
#18
dogtags avatar

dogtags

Totally Zenned

Join Date:
Nov 2003
Posts:
876
Plugin Contributions:
1

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Would be GREAT if shipping options could be triggered based on shipping weight ranges as well as geo factors.

For instance, you could have Shipping Method A displayed for shipping weights from 3-15 pounds AND for geo zones Q, R, and Z. If the weight is either below 3 pounds or above 15 pounds, then Shipping Method A is not displayed.

For instance, US Post Office Global Priority has a max weight of like 2 pounds or something

The idea is to have shipping weight min and max triggers as well as geo triggers.

This would be an outstanding additional feature :smile:
05 Apr 2007, 13:41
#19
conor avatar

conor

Passed

Join Date:
Aug 2004
Posts:
2,480
Plugin Contributions:
3

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

Hi,

DogTags:

The idea is to have shipping weight min and max triggers as well as geo triggers.


The module has half this functionality at the minute! :clap: ...


You can set up the shipping table for the first method for a region for the first few weight limits, without specifying any catchall ('*') limits.

You can then set up the next method for a region with its first limit being higher than the highest limit of the first shipping method.


E.g.:

Region 1 Shipping Method 1 Table of Rates:
8:4.95,15:6.95

Region 1 Shipping Method 2 Table of Rates:
20:10.95,25:16.95


With this setup shipping methods 1 and 2 will both be given as options up until a weight of 15.

After 15, shipping method 1 will no longer be shown as an option, only shipping method 2 will be shown.

After 25, no shipping method for the region will be displayed and the module will move on to checking if the next region matches...



Basically, the "max" part for the limits already exists in the module, what doesn't yet is a "min" part for the limits.

I don't see any reason why this shouldn't be added in, so I'll upgrade the module and release one last beta..


Table of Rates will then be able to use the format:

3-15:4.95

All limits entered in the table of rates will be taken as maximum limits unless a dash is found, in which case the numbers on either side of the dash will be taken as minimum and maximum values for the limit.

In the example above, the minimum limit that would cause the rate of $4.95 to be used would be 3, the maximum would be 15.

As always, the limits are interpreted as either weight or price limits depending on the module settings.


How does that sound? Like the idea? :D

All the best...

Conor
ceon
06 Apr 2007, 00:20
#20
dogtags avatar

dogtags

Totally Zenned

Join Date:
Nov 2003
Posts:
876
Plugin Contributions:
1

Re: Ceon Region Tables Shipping Module 1.0.0 Beta 1!

conor:

How does that sound? Like the idea? :D


Excellent!!!!

Easy way for admin to set the limits, too. Super!

Thanks :D :D