Geoshipping: assign postage rates to geographical locations

Contrib type: 
Module
Status: 
Work in progress

Downloads

Compatibility: 
Ubercart 1.x

an unabashed rip-off of the taxes module, the geoshipping module lets you specify postage rates based on the geographical location of the customer. postage rates are applied at the "review order" stage.

an amount can also be set per rule so that orders totaling more than that amount will be shipped for free.

eventually, it's planned to rip off the per-product functionality from the taxes module and include it in the geoshipping module, too.

this is my first contrib and my first module, so all feedback is welcome, but be gentle. Smiling

**note:** this module hasn't been extensively tested. please let me know of any hiccups. i have no idea how this module will behave in combination with the regular shipping module, for example.

Related threads: 

PreviewAttachmentSize
uc_geoshipping.zip11.06 KB
megg's picture
Offline
Getting busy with the Ubercode.Internationalizationizer
Joined: 08/08/2007
Juice: 248
update

this module is technically still in development, but here are some updates:

- package weight is calculated by adding the individual weight of each item in the order.

- no postage is applied to packages weighing zero.

- rules are written per geographic location. at the moment, the issue with smaller zones overwriting larger ones has not been resolved. i'm actually considering scratching this and just making the module apply to countries only. it seems a lot of work for someone to input all the rules for all countries, let alone individual zones within them.

- rules can be written in two ways. either leave minimum and maximum weights blank or write separate rules for different weight ranges. e.g.:

either
australia $20 [no min weight] [no max weight] [optional maximum price*]

or
australia $6 [0] [250] [optional maximum price*]
australia $12 [250] [500] [optional maximum price*]
australia $24 [500] [no max weight] [optional maximum price*]
*orders over the maximum price are shiped for free

- there is no check built into the system to stop you from defining overlapping rules, so be careful.

please note: if you have already installed the previous version, uninstall it before you install this one _or_ update the database column properties manually before installing the new module. i couldn't figure out the sql to make a proper update... :/

AttachmentSize
uc_geoshipping.zip 11.41 KB
Jurgen8en's picture
Offline
Joined: 08/20/2007
Juice: 49
Re: update

Hi,

I installed geoshipping and added two shipping rate rules. But I can´t select geoshipping in 'Shipping quote settings' as a method.

Is also don´t know where I can change the field 'postal code' to 'country' on the page 'View Cart' where customers can calculate there shipping-cost.

Can somebody help me.

Thanks.

Have latest Drupal and Ubercart version.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6855
Re: update

http://api.drupal.org/api/function/hook_update_N/5 has a lot of examples for how to do different things in the update hook. Just remember to use update_sql() instead of db_query() to give feedback on the SQL queries.

Jurgen8en's picture
Offline
Joined: 08/20/2007
Juice: 49
Hello, I´m not a developer

Hello,

I´m not a developer of Drupal. I installed geoshipping, activated the module and I ´ve runned update.php.

Should I do more then this?

Greets,
Jurgen.

megg's picture
Offline
Getting busy with the Ubercode.Internationalizationizer
Joined: 08/08/2007
Juice: 248
hey jurgen, sorry i didn't

hey jurgen,

sorry i didn't see your post earlier.

the geoshipping module is lacking in a few areas. it was basically developed by myself and another guy here because we needed it, but neither of us are really hardcore programmers. :/

it doesn't work in the same way as the other shipping modules that give you a nice preview of the shipping cost. you only get to see the shipping cost when you go to review your order.

does that answer your question? kinda?

Smiling
meg

megg's picture
Offline
Getting busy with the Ubercode.Internationalizationizer
Joined: 08/08/2007
Juice: 248
updated version

new and improved!

arbel has improved the module so that a unit price can be defined per weight (e.g., 10c per gram) - yippee!

the module still requires you to fill out shipping rules per country - boo!

if anyone knows how to define a country group (or zone group) that could then have one rule applied to all countries in the group, it would be really handy.

AttachmentSize
uc_geoshipping.zip 11.29 KB
CpILL's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 550
Re: updated version

I guess you'd need to have some sort of list of which country goes in which zone. Do you have a list of all possible countries? You'd have to add a column to it for 'zone'. You could also then have a separate list of zones which you could apply rules too etc.

Uberdevelopment www.tsd.net.au/blog

sanne's picture
Offline
Joined: 08/13/2007
Juice: 121
Re: Re: updated version

To make is more visual, use the same layout as the user access page.
vertical: countries and corresponding zones.
horizontal: rules.

In the matrix one can make the rules per zone/country active. Some java script is neccesary to make sure that only one rule can be activated per country/zone.

Cheers,
Sanne

Guest (not verified)
Guest's picture
Shipping rates

Can anybody think of a way to do these flat rates and let the customer choose the one they want

£2.50 to the UK (Recorded Delivery)

£3.00 to Europe (Airmail)

£4.00 to Everywhere else (Airmail)

£6.00 to the UK (Special Next Working Day Delivery)

£8.00 to Europe (International Signed For)

£10.00 to Everywhere else (International Signed For)

mintidea's picture
Offline
Joined: 09/01/2007
Juice: 30
Hi Megg Is this module

Hi Megg

Is this module working I installed it but didn't working gave me an error

Once setup and installed and I told it to charge 10.50 for USA customers and for Canadians 7.75

Went into the checkout pressed calculate shipping and said can not calculate shipping

Do you think you could take a look at this install and see if its install correctly?

Thanks
Adam

megg's picture
Offline
Getting busy with the Ubercode.Internationalizationizer
Joined: 08/08/2007
Juice: 248
hey adam, the 'calculate

hey adam,

the 'calculate shipping' function does not work with the geoshipping module. with geoshipping, the customer only sees the shipping costs once they've proceeded to the 'review order' step in the checkout process.

however, never fear! arbel has been doing a lot of work improving the geoshipping module, and his new module 'world quotes' does give the customer a preview of shipping costs earlier in the process:
http://www.ubercart.org/contrib/851

check it out and help with testing. world quotes has mo' better features than geoshipping, so will probably eventually supercede it.

Smiling

CpILL's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 550
All contrys + regions?

I posted up the SQL which will import all the countries here:

http://www.ubercart.org/forum/internationalization/880/all_countires_and...

There is also CSV file that has a column for global regions (as per the UN groupings) which might come in handy of you want to have a default or allow other modules (i.e. postage services from various countries) to over write this with their own...

Uberdevelopment www.tsd.net.au/blog

netslave's picture
Offline
Joined: 05/22/2008
Juice: 187
Geoshipping with Locations and Products

Hello Folks,

This is my modified version from this module. You can now add shipping rules bases on products and locations. Tested on ubercart 1.0 .

AttachmentSize
uc_geoshipping.zip 9.5 KB
openconcept's picture
Offline
Joined: 08/12/2008
Juice: 10
Do you have to select products for geoshipping to work?

I set up the module and would like to change a flat rate based on country.
Seems i have to choose 'No Product' or a single product.
This extra shipping cost is product independent - what do i need to do?
I'm already using a flat rate charge - is this a potential conflict?

Thanks for making this module!

Drupal sites geared for non-profit organizations, political groups, and socially progressive groups
http://www.openconcept.ca

khalemi@drupal.org's picture
Offline
Joined: 12/31/2008
Juice: 9
Re: Geoshipping: assign postage rates to geographical locations

this module does not work

rendog's picture
Offline
Joined: 10/21/2009
Juice: 7
Ubercart 2 released?

Great idea.. but do you think it will be ported to ubercart 2 anytime soon???

cyaneo's picture
Offline
Joined: 10/18/2009
Juice: 58
Re: Ubercart 2 released?

Subscribed - Yes - that module is highly needed for UC2!