Ubercart Global Quote

Contrib type: 
Module
Status: 
Complete and working
Moderation: 
Awaiting moderation
Latest version: 
7.x-1.0-rc1

Downloads


Compatibility: 
Ubercart 2.x
Compatibility: 
Ubercart 3.x

Ubercart Global Quote

Ubercart Shipping quote module that provides custom shipping quotes based on configurable weight ranges and custom shipping zones.

Features

  • Shipping zones can be defined as any combination of countries and regions/states.
  • Multiple rates can be defined based on weight ranges for each zone
  • Global quotes can enabled/disabled using Conditional Actions.

Dependencies
Ubercart 2.x or 3.x
Drupal 6 Ubercart 2.x: Requires the ahah helper module:

Configuration
Install and enable the module.

Add new shipping zones at:
admin/store/settings/quotes/methods/zones
Add weight range based quotes at:
admin/store/settings/quotes/methods/global_quote
Enable the Global quote shipping method at:
admin/store/settings/quotes/methods

Your site is ready to calculate quotes.


DrunkMunki's picture
Offline
Joined: 12/09/2010
Juice: 29
Only 1 region per country

i wanted to setup multiple regions within Australia but it will only let me create 1 region for Australia.
I need to setup seperate regions for each state/metro

i get the error:
The following countries are selected in other zones: Australia,36

Issue added to Git Repository.

andrews501's picture
Offline
Joined: 11/15/2010
Juice: 71
Re: Ubercart Global Quote

I have been trying to Add a new quote but the quotes dont appear inside the table and instead they are underneath. Also the text of the quote doesnt show and only appear the square boxes.

The module looks promising.

Many thanks

joanpc's picture
Offline
Joined: 06/04/2008
Juice: 61
Re: Re: Ubercart Global Quote

That sounds weird, I'm using the module in a production site, it should work, can you send-me an screen-shot?

Thanks.

joanpc's picture
Offline
Joined: 06/04/2008
Juice: 61
Regions/Zones support

I just released a new version with zones support.

It requires the aha helper module http://drupal.org/project/ahah_helper

To upgrade just install ahah_helper and run /update.php (the update will enable the aha helper module for you).

Enjoy

Cheers.

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3300
Re: Regions/Zones support

Thank you for the contribution. I encourage you to put this into the drupal.org Git repository and create an official Drupal project for this module. Drupal modules should not be hosted on github or here on ubercart.org.

<tr>.
andrews501's picture
Offline
Joined: 11/15/2010
Juice: 71
Hello, I installed the newer

Hello,

I installed the newer version and the ahah but still I have the same problem.

Attached you will find the screen shot. I tried to create two quotes. Apparently they are there but cannot be seen inserted into the table.

Many thanks

AttachmentSize
uc_global_quote-bug.JPG 34.65 KB
joanpc's picture
Offline
Joined: 06/04/2008
Juice: 61
Table prefix?

Hi andrews, thanks for the screen-shot .

I'm not sure of what's happening it seems something wrong with the SQL query that draws the table... I've corrected the query, maybe you're using a table prefix and my query was the problem, try the last version of the uc_global_quote_admin.inc. Download the new one from this url -> https://raw.github.com/joanpc/uc_global_quote/master/uc_global_quote_adm...

I will release a full package if this fix your problem.

If this doesn't work, try using the garland theme and tell me more about your setup, Drupal and Ubercart versions and if your MySQL or PSQL version.

Cheers.

Joan.

andrews501's picture
Offline
Joined: 11/15/2010
Juice: 71
Hello Joan, Yes, it seems to

Hello Joan,

Yes, it seems to be working fine after adding the new file. The content is now inside the tables.

I will continue checking if I can do other things I do with table quote and let you know.

Many thanks again!

Andrew

andrews501's picture
Offline
Joined: 11/15/2010
Juice: 71
Joan, Is there any way of

Joan,

Is there any way of adding zones by city, for example? In the UK, currier companies consider UK mainland, and Highland and Islands as two different regions, even that they are inside the same land. Normally this is because the Highlands is almost inaccessible and therefore the cost of transport is very high.

So adding by city could be an option to solve this issue.

Many thanks,

Andrew

andrews501's picture
Offline
Joined: 11/15/2010
Juice: 71
Re: Joan, Is there any way of

Just noticed I can select cities!! Superb!!!!

Problem solved!

However, I noticed that is not possible to select twice the same country. For example I need to select some cities for UK mainland and other cities for UK Highland and Islands. I selected UK and then deselected the cities of Highland and Islands, but when I select UK again and select only the cities of Highland and Islands, then the systems says that UK has been already selected. Could be possible to be able to choose the same country more than once, please?

Many thanks

Andrew

andrews501's picture
Offline
Joined: 11/15/2010
Juice: 71
Re: Re: Joan, Is there any way of

I am trying to test it now but the only I get is Standard delivery = 0.

I used to have installed 8 table quote, and now I uninstalled them and deleted their folders.

Then I installed global quote with all my delivery rates for different countries. Also I installed only one table quote as I want to add free delivery for orders above certain amount. I noticed if I disable the table quote with free delivery then the Standard delivery = 0 dissappears. However, now I receive the error message.

I checked in the conditions table and it seems that my previous 8 table quote are still there and they don't have the delete option. I tried to disable them but it is not possible. Also I looked into global quote and there where not conditions selected, so I choose all the countries I defined in my shipping zones. But still it doesnt work in my test.

Any suggestions on how to make this module work?

Attached you will find some screens.

Could be possible to see the exact amounts of weight with decimals in the shipping quotes table? it seems all are rounded. I am thinking in creating a page with this table as I noticed that my customers like looking at the delivery rates first (a summary of weights and delivery rates) and then start placing orders where they receive the corresponding shipping quote.

Many thanks

AttachmentSize
calculate shipping cost.JPG 32.26 KB
conditional actions.JPG 78.53 KB
shipping quote settings.JPG 63.96 KB
joanpc's picture
Offline
Joined: 06/04/2008
Juice: 61
Re: Re: Joan, Is there any way of

You should be able to select the country twice if you don't overlap cities. I've done some tests and it's working right now... A zone without cities selected will match all cities, so be sure to select only cities not specified in other zones.

joanpc's picture
Offline
Joined: 06/04/2008
Juice: 61
Andrew, Try uninstalling

Andrew,

Try uninstalling tablequote trough admin/build/modules/uninstall (you must "reinstall" the module files in order to see it ) this should clear some db tables and maybe any associated conditional actions.

For free shipping over a certain amount i use and recommend flatrate. Make a free shipping flat rate and enable-it using conditional actions. You can also disable global quote using conditional actions for orders over a certain amount.

I'll add 2 decimals to the weight tables. Here i use grams as weight unit so having decimals doesn't make sense i hope 2 is enough for you. MySQL returns float with 8 zero-filled decimals or so, it looks really ugly if i don't truncate it. By the way, all decimal are stored and used, rounding is only done on display.

Cheers

Joan.

andrews501's picture
Offline
Joined: 11/15/2010
Juice: 71
Hello Joan, I had to delete

Hello Joan,

I had to delete table quote from my database manually as the uninstall didn't work. Now I left Global quote only and inserted the delivery rates for 8 regions. However, when I do the testing all is fine for zone 1 but the others 7 zones cannot make it work. When I click on the button to calculate the shipping cost for any of the other 7 regions I get the error : There were problems getting a shipping quote. Please verify the delivery and product information and try again.

I reset the meta conditional, predicate and action for Global quote. But still I get only zone 1 to work.

Also deactivate and active the module in modules list and then Update, Flush cache and run cron but still the same.

Thanks for allowing to see two decimals in the table of quotes instead of rounding. In this manner it will be possible to create a summary table as image or within a block by pulling this view.

Attached you will find some screens.

Cheers

AttachmentSize
shipping quote via global quote.JPG 34.8 KB
conditional actions1.JPG 16.75 KB
add condition.JPG 26.31 KB
actions.JPG 21.3 KB
joanpc's picture
Offline
Joined: 06/04/2008
Juice: 61
Hi andrew, I can't reproduce

Hi andrew,

I can't reproduce the behavior with my current setup. Try enabling Log errors during checkout to watchdog
and Display debug information to administrators. at admin/store/settings/quotes/edit , and checking the logs for any error message. If you can, please send-me a dump of your uc_global_quote and uc_shipping_zones db tables it will also be really helpful. By the way I'll try to make a second look tomorrow Smiling

Did you manage to add more than one zone with the same country?

You can grab the latest version (with decimals) from that url: https://github.com/joanpc/uc_global_quote/tarball/master

Cheers,

Joan.

andrews501's picture
Offline
Joined: 11/15/2010
Juice: 71
Hello Joan, Fantastic,

Hello Joan,

Fantastic, decimals look good. Also I managed to add more than one zone with the same country if selecting carefully each city. I was wondering how could I implement two delivery rates (Royal Mail and Currier) to the same country and cities. I would like to let the customer decide the delivery rate depending on the time of delivery, for example, for London is 1 day by Currier and 3 days by Royal Mail. In this case, it is the same country and city. Initially I thought of adding two zones with the different details written in the zone name but will not work as the same country and city cannot be selected, which I understand the reason and like it. Could be possible to add an additional column to show the time of delivery to the customer? Or instead, allow to select many time the same country and city.

These are the error messages I can see from logs as I still cannot bring the quotes from my other 7 zones:

* recoverable fatal error: Object of class stdClass could not be converted to string in /hsphere/local/home/...../profiles/uberdrupal/themes/acquia_prosper/page.tpl.php on line 4.
* recoverable fatal error: Object of class stdClass could not be converted to string in /hsphere/local/home/...../profiles/uberdrupal/themes/acquia_prosper/page.tpl.php on line 4.
* warning: Invalid argument supplied for foreach() in /hsphere/local/home/...../profiles/uberdrupal/modules/ubercart/uc_order/uc_order.ca.inc on line 592.
* warning: Invalid argument supplied for foreach() in /hsphere/local/home/...../profiles/uberdrupal/modules/ubercart/uc_order/uc_order.ca.inc on line 592.
* warning: Invalid argument supplied for foreach() in /hsphere/local/home/...../profiles/uberdrupal/modules/ubercart/uc_order/uc_order.ca.inc on line 592.
* warning: Invalid argument supplied for foreach() in /hsphere/local/home/...../profiles/uberdrupal/modules/ubercart/uc_order/uc_order.ca.inc on line 592.
* warning: Invalid argument supplied for foreach() in /hsphere/local/home/...../profiles/uberdrupal/modules/ubercart/uc_order/uc_order.ca.inc on line 592.
* warning: Invalid argument supplied for foreach() in /hsphere/local/home/...../profiles/uberdrupal/modules/ubercart/uc_order/uc_order.ca.inc on line 592.
* warning: Invalid argument supplied for foreach() in /hsphere/local/home/...../profiles/uberdrupal/modules/ubercart/uc_order/uc_order.ca.inc on line 592.
* warning: Invalid argument supplied for foreach() in /hsphere/local/home/...../profiles/uberdrupal/modules/ubercart/uc_order/uc_order.ca.inc on line 592.

Attached you will find of dumps requested. If you need them in another format, please let me know.

Many thanks

Andrew

AttachmentSize
uberdrupal_uc_global_quote.zip 1.02 KB
uberdrupal_uc_shipping_zones.zip 2.02 KB
joanpc's picture
Offline
Joined: 06/04/2008
Juice: 61
Hi Andrew, Thanks for all the

Hi Andrew,

Thanks for all the information provided. I've just found a bug that causes that some countries without regions selected were ignored. I just fixed it.
Try the last version from the github url -> https://github.com/joanpc/uc_global_quote/tarball/master .

A version with multiple shipping options will follow, but i don't know when. I've made this module for a client and they don't need this feature at he moment Smiling. I'll think about where to specify the estimated time it should be some kind of method/zone combination, but maybe just providing average ranges is enough Sticking out tongue

Cheers

Joan

andrews501's picture
Offline
Joined: 11/15/2010
Juice: 71
Hello Joan, I uploaded the

Hello Joan,

I uploaded the new files and seems all is fine. Great job!!

I will see if any issue arises in the following days. Also I will be doing testing with product restrictions to some countries (using another script).

No problem regards the estimated time feature. I think I will add the info in the calculation box manually, so customers can have an idea of the two options of delivery, Royal Mail and Currier.

Many thanks

Andrew

joanpc's picture
Offline
Joined: 06/04/2008
Juice: 61
Great Thanks Andrew for your

Great

Thanks Andrew for your help finding these bugs.

I'll post here any future improvement and I will think about making an official Drupal project for it.

Cheers.

andrews501's picture
Offline
Joined: 11/15/2010
Juice: 71
Hello Joan, I think I found

Hello Joan,

I think I found another bug.

I have two regions, zone 1 is UK in the Northern Ireland part(county Antrim, Armagh, Down, Fermanagh, Londonderry, Tyrone) and Isle of Man (Country), and zone 2 is the rest of UK (without Norther Ireland).

When I select any county in Northern Ireland, the system works fine; however, when I select Isle of Man, then it doesnt work. I checked and when bringing zone 2 UK cities then works fine.

In configuration, I tried to select again zone 1, this means selecting Isle of Man and then ALL, and then UK and then county Antrim, Armagh, Down, Fermanagh, Londonderry, Tyrone. Also I tried selecting UK and then county Antrim, Armagh, Down, Fermanagh, Londonderry, Tyrone and then Isle of Man and then ALL. But it seems that neither of any of these approaches bring a successful quote when selecting Isle of Man.

Any suggestions, please?

Many thanks,

Andrew

joanpc's picture
Offline
Joined: 06/04/2008
Juice: 61
Hi Andrew, You have really

Hi Andrew,

You have really complex shipping rates in uk Sticking out tongue

Yes you found something! Smiling I just realized that mixing countries without regions and countries with regions should break the shipping quotes. The Isle of main doesn't have any regions, if you mix-it with any other country with specific regions selected it will be ignored.

2 options there:
1. make a unique zone for isle of main
2. wait for a fix Smiling

cheers

Joan

joanpc's picture
Offline
Joined: 06/04/2008
Juice: 61
Re: Ubercart Global Quote

If you opted to wait for a fix, here it is Smiling

Update your uc_shipping_zones.module using that one:

https://github.com/joanpc/uc_global_quote/raw/master/uc_shipping_zones/u...

Or reinstall the whole package -> https://github.com/joanpc/uc_global_quote/tarball/master

Thanks again for your bug reports

Joan.

Drupalnewbie's picture
Offline
Joined: 08/03/2011
Juice: 6
UC_GLOBAL_quote not working for me ..

I install latest version of uc_global_quote and Ahah helper. After enabling "Global shipping quote,shipping zone and ahah helper" . I am getting following errror.

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'r(r, r) unsigned NOT NULL auto_incement DEFAULT ', `1` TEXT DEFAULT NULL, PRI' at line 5 query: CREATE TABLE uc_shipping_zones ( `zid` INT NOT NULL auto_increment, `name` VARCHAR(255) DEFAULT NULL, `countries` TEXT DEFAULT NULL, `0` r(r, r) unsigned NOT NULL auto_increment DEFAULT ', `1` TEXT DEFAULT NULL, PRIMARY KEY (zid) ) /*!40100 DEFAULT CHARACTER SET utf8

I am using Drupal : 6.22 and Ubercart 6.X - 2.4

Can you please suggest me??

andrews501's picture
Offline
Joined: 11/15/2010
Juice: 71
Superb Joan!! I will test

Superb Joan!!

I will test it.

I have another question or bug?

Is there any way of selecting one type of shipping quote for a specific product? For example, I have Royal Mail and Currier rates. And I have X product that I want to send only by Currier rates. I saw that this can be done with conditionals (http://www.ubercart.org/forum/support/19069/how_exclude_certain_shipping...), but when I look into Store Administration/Conditional actions and then go to the "Shipping quote via global quote" conditional actions, I see that conditions are not set up when I click on Edit. So there is no way of negating the condition in Royal Mail rates (as it is global quote) and for X product. Any thoughts how can this be achieved in Global Quote or other alternative to do it?

Many thanks,

Andrew

joanpc's picture
Offline
Joined: 06/04/2008
Juice: 61
Hi andrews, I'm not sure that

Hi andrews,

I'm not sure that I'm understanding the question.. Smiling

At the moment global_quote only provides a unique method of shipping if you want additional shipping methods you must use flatrate and conditional actions.

You can disable/enable uc_global_quote using conditional actions, adding new conditions to the "Shipping quote via global quote", but conditional actions doesn't provide much useful filters for a product, just by product type (content type), attribute, or shipping type. Maybe a good option is to add more shipping types and base your Conditions on that, but i think you must write a module to add custom shipping types.

Let me know,

Joan.

andrews501's picture
Offline
Joined: 11/15/2010
Juice: 71
Hello Joan, I tested the

Hello Joan,

I tested the patch and it works fine. Many thanks!

Regards the use of filters, I found a quick solution. I will have to increase the number of units on sale, so it takes the always currier instead of Royal Mail.

Thanks again. Good work!

Andrew

Drupalnewbie's picture
Offline
Joined: 08/03/2011
Juice: 6
Not able to setup shipping cost

Hi,

I want to setup shipping cost per country per shopping cart weight.
For example , For USA , Cart weight 0.00 lb to 0.55 => shipping cost will be $10
0.56 to 1.10 => shipping cost will be $12

I have created zone "USA" and in "Global Quote section" created 2 slots 0.00(min weight) to 0.55(max weight) => shipping charge $10 and 0.56(min weight) to 1.10(max weight) =>shipping cost $12.

Now, If cart weight is in betwwen (0.00 to 0.55 OR 0.56 to 1.10) then shipping results are correct.

But, If cart weight is exact 0.55(max weight of 1st slot) OR 1.10(Max weight of 2nd slot) then I am getting error "There were problems getting a shipping quote. Please verify the delivery and product information and try again.
If this does not resolve the issue, please call in to complete your order."

Can anyone please help me??

Thanks in advance.

joanpc's picture
Offline
Joined: 06/04/2008
Juice: 61
Hi Drupalnewbie, The slots

Hi Drupalnewbie,

The slots should be:

from 0.00 to 0.55 (the max value is excluded)
from 0.55 to 1.10

0.55 will match the slot 2.

if you want to make 0.55 match the first slot you can change it to:

from 0.00 to 0.54 (the max value is excluded)
from 0.54 to 1.10

Cheers

Joan.

Quarantine's picture
Offline
Joined: 09/19/2011
Juice: 6
Re: Ubercart Global Quote

I saw that this module is compatible with Ubercart 3, which I assume would be compatible with D7.

There doesn't seem to be any D7 port for the AHAH helper module. Would this work on D7 then? I enabled the Global Shipping Quote module and immediately got the following errors at the top of the page:

Notice: Undefined index: global_quote in uc_global_quote_uc_shipping_method() (line 35 of /var/www/URL.com/sites/all/modules/uc_global_quote/uc_global_quote.module).
Notice: Undefined index: global_quote in uc_global_quote_uc_shipping_method() (line 43 of /var/www/URL.com/sites/all/modules/uc_global_quote/uc_global_quote.module).

joanpc's picture
Offline
Joined: 06/04/2008
Juice: 61
drupal.org uc_global_quote project page

Hi Quarantine,

You're right, there is a version of the module for Drupal 7.

Get the last version of the module from drupal.org uc_global_quote project page.

I've fixed a lot of stuff like these warnings.

Feel free to post any new issue in the project's page.

Cheers,

Joan.

Quarantine's picture
Offline
Joined: 09/19/2011
Juice: 6
Re: Ubercart Global Quote

Thank you so much for this, this is awesome! I found some error warnings, but I'll post the issue at drupal.org instead.

GijsW's picture
Offline
Joined: 10/31/2011
Juice: 23
Global shipping quote - receiving quotes

Hi,

I am building a website with Drupal 6, Ubercart 2 and am using the Global Shipping Quotes module rc-1. A week or 2 ago I had everything set up, zones, and a number of quotes for different weight ranges per zone. Everything was working perfectly. The last week or so I have been concentrating on other aspects of building the website, however since yesterday I notice that when in the 'View cart' or 'Checkout' pages, after typing in an address the shipping calculating box remains endlessly on "Receiving quotes" and won't proceed any further.

I have gone through the settings about 20 times and I have tried adding an extra zone and quote, but still no success. Since it has already worked on this installation I think we can rule out that it might be a problem with the hosting environment. I have also tried adding a flat rate and disabling global quote, then it works immediately. I have also removed and re-uploaded the global quote module. If I try setting it up on another system it works immediately so I think that the settings I am using should be correct. All other modules on the site are up to date.

So I am completely at a loss for how to get this working again. Can anyone give any tips?

Many thanks,
Gijs W

GijsW's picture
Offline
Joined: 10/31/2011
Juice: 23
Fixed

After a few days of trying to solve this I removed the Ubercart folder from the website and re-uploaded the original module folder again. This solved the problem. Must have been a corrupt file somewhere in Ubercart. Now everything is working perfectly again.

amcoms's picture
Offline
Joined: 04/04/2012
Juice: 150
shipping zones global quote

I am guessing you haven't had a reply to this because no one really knows how this works.

It makes no sense why a module can allow admin to setup shipping zones when there is only the gloabl method that can use it, but can the gloabl method set CA's of course it cant!

The only logic would be to apply / allow access to the shipping zones into the CA's for flat rate!

Setting up shipping zones based on weight increments is pretty simply to understand so why is it so diofficult to setup within ubercart? Or why is it so disjointed in documentation?

lucsar's picture
Offline
Joined: 06/07/2012
Juice: 87
Overlap

Hi all,

just installed uc_global_quote module and works fine but, I would like to be able to select a country more than once inside differents shipping zones allowing overlap weight also. By default, is not allowed by the module that returns: "The following countries are selected in other zones: France,250" and don't display overlaps weights bettween shipping zones.

ie:
countries: Italy, Spain, France
shipping zone: DHL standard & weight
shipping zone: UPS Express & weight

Customers in this case will have both choice with related quotes.

Many thanks!
LS

amcoms's picture
Offline
Joined: 04/04/2012
Juice: 150
Multiple Carriers!

What annoys me the most about Global Shipping Quotes is the word Global! It is far from being a global solution

It is a limited weight based solution assuming 1 and only 1 carrier is used.

I have had to deploy Global Shiping Quotes to create zones to use with Flat Rates

Add a custom hook so the zones are picked up and create multiple carrier rates this way.

amcoms's picture
Offline
Joined: 04/04/2012
Juice: 150
Zones Same Country

Hi LS, Global Shipping Quotes will not allow this feature. We tried it 2 years ago and had to build a custom mod and then go on to use flat rates.

Nothing has changed in Ubercart 3, still just as limited.

Is is an assumption that an etailer uses just one carrier!

We use 3 different carriers depending on the type of order and zone and some zones do overlap because the carrier operates differently.