World Quotes

Contrib type: 
Module
Status: 
awaiting

Downloads

Compatibility: 
Ubercart 1.x

installation instructions:
unzip into modules/ubercart/shipping/

configuration is under home>administer>store administration>configuration>methods

What's included:

well this was largely based on the geoshipping module and the the weight quotes module so:
you configure shipping rules where you choose the area type: country, zone, postal code, region or anywhere (special default - only applies if no other specific rules apply)
for each rule you may choose a flat rate or a per weight unit multiplication.
you choose a min and max weight range for the rule, and a max amount weight, which means order over that amount are free (shipping).

most of this was already in the geoshipping...what's new you ask?

weight units are fully supported, in each rule you choose the weight unit and the module converts rule units and product units to fit.

works with the shipping quotes module: you can see the shipping costs before the review pane.

supports regions, which will make the configuration easier.

That's it for now...

I tested it a bit, so please help me out and test....and use at own risk =)

also let me know when I should post this in the contributed modules section...

PreviewAttachmentSize
uc_worldquote.zip7.16 KB
zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Hi there,

Hi there,

This module could be the saint graal for all international shipper ! thanks.

However I have an error on install :

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 ''units' enum('LB','G','KG','OZ') NOT NULL, `conditions` text NOT NULL, ' at line 10 query: CREATE TABLE dp_uc_worldquote ( `id` mediumint(9) NOT NULL, `name` varchar(255) NOT NULL, `area` varchar(255) NOT NULL, `type` enum('code','zone','country','anywhere', 'region') NOT NULL, `rate` float unsigned NOT NULL default '0', `min_weight` float unsigned, `max_weight` float unsigned, `max_amount` float unsigned, 'units' enum('LB','G','KG','OZ') NOT NULL, `conditions` text NOT NULL, `flat_weight` enum('flat','weight') NOT NULL, PRIMARY KEY (`id`) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ; in \drupal\includes\database.mysqli.inc on line 151.

Edit : Ok it's a little SQL error in the .install file :

replace :
'units'

By :
`units`

ant It should work.

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Re: Hi there,

Ok, after correcter some error install described above and in this post the module seems to work.

Greetings, You have just created the ultimate module for international customer... I think I love you !

All geoshipping default are corrected, the integration with the shipping quote module is perfect, the idea to define regions is usefull and awesome, it's well integrated with tax.

I will continue testing and give feedback, but T.H.A.N.K.S !

If I can give one idea of new feature it's not important but it could be great, it's to allow to add new shipping quote based on this module.

For example, when you check UPS, Fedex or others modules, you have a pane with a radio button to choose what you want. It could be good to add this possibility with this module, to create several choice based on several country table to let to customer the choice of the shipment he want, but all defined with this module. I think it could be done by duplicating the module folder and change some things in the code, but it could be great to provide this in admin configuration.

Thanks again for your module !

arbel's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/12/2007
Juice: 331
Re: Hi there,

thanks for the reply and the bug find...updated the zip file.

You mean to have the ability to choose from different sets of rules?

Idan

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Re: Re: Hi there,

Yes, I mean différent set of rules that you can name and that appears on the pane that gives shipping choice to customer.

For example you have a shipper named GLS that gives you a shipping table with all countries.

You have another shipper named DHL that gives you another shipping tables.

They have their own price to ship to england, germany, france, or others.

It could be great, with your module, to create a new shipping method, with the name of the transporter and to put the price table with your combination of region and shipping weight then.

When the customer is in checkout pane, he see 2 shipping method available for his country (if the country is filled in admin), and he can choose between DHL and GLS.

That is the idea

thanks

zmobe

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6855
World Quotes module

World Quotes module review
This is just based on looking at the code. I haven't actually installed or tested it yet. That said, it looks like it should work properly. Good job.

Things to fix:
Most of these are the same as for the Regions module, but I put them here again for completeness.

  • The calls to db_query() on lines 308, 314, and 325 are open to an SQL Injection Attack. Parameterize the data. See below for how I dealt with the NULL values problem.
  • The unit conversion constants are define()d in uc_store.module, and do not need to be here.
  • MENU_CALLBACK_ITEM is not defined, MENU_CALLBACK is. My fault for writing modules that way before.
  • I think it's a good idea to remove the version and CVS information added by Drupal in the .info file. We've had version confusion because of that.
  • Please style the code according to the Drupal coding standards. Specifically, use two spaces instead of tabs to indent code. This keeps indentations consistent across text editors.
  • Remove extra files from the .zip archive (.M, .php). I was a little confused by them. *shrug*

I understand that the queries to INSERT and UPDATE the quote rules were made so that NULL values can be used. db_query() doesn't easily allow that to happen. There is still a better way than to insert the data directly into the SQL string.

The best example I can show you is in uc_shipping_package_save(). When packages are first created, they won't have tracking numbers or shipping labels, so those columns should remain NULL until they are set. The function builds the query based on what information it has and INSERTs and UPDATEs only those columns. A similar technique should work for World Quote.

arbel's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/12/2007
Juice: 331
Hi, thanks for the feedback

Hi,

thanks for the feedback and comments...I don't really understand the what to do about the query, how should they be, and what's the problem with the null values, this was code taken for the geoshipping module and I haven't considered changing it...

Idan

arbel's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/12/2007
Juice: 331
Re: Hi, thanks for the feedback

ok, took care of everything except for the sql thing...

robin.puga's picture
Offline
Joined: 10/03/2007
Juice: 6
Love the module, but needs testing.

Hey there, love your module, however it needs more testing.

After the better part of a day plugging away at it I still can't get it to display the World Shipping Rates correctly when I "Click to calculate shipping". It would display $0.00 every time, but after I dug into the code for a while I figured out why but I still couldn't get it to display properly. There are some issues going on in the uc_worldquote_quote function.

uc_worldquote.module - Line 474
    $units = $product->units;   
should read
    $units = $product->weight_units;   

My goal was to create three regional flat-rate shipping costs: US ($15), Canada($5) and International($20). (If anyone has successfully configured something like this already please, please, please let me know how you did it. Smiling ) I had some issues when the code passes through uc_worldquote.module - function uc_worldquote_quote - Lines 498-504


$rules = uc_worldquote_get_rules();

//remove all the rules that don't apply to the pkgwieght
$rules = uc_worldquote_match_weight($rules, $pkgweight);

//remove all rules that don't apply to the shipping infomration
$rules = uc_worldquote_match_area($rules, $postal_code, $zone, $country);

The rules array is populated correctly, but then the uc_worldquote_match_weight clears all my rules before it gets to the rule filter for the area matching I need. If I comment out the function call to uc_worldquote_match_area, then I get the correct area rules returned. Not too sure how to fix this, but if I get some time I'll look into it later.

One final (super minor note), a little spelling mistake: uc_worldquote.module - Line 363
    'title' => t('Wolrd Quote Shipping'), 

Once again. This module kicks butt! I can't wait till it's all finished. I'll lend a hand when I have more time. In the mean time, keep up the great work and many thanks.

Robin

arbel's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/12/2007
Juice: 331
Hi, Thanks for your

Hi,

Thanks for your comment.

The change with the units, is from the ubercart7d version...just updated right now =) the module works good for 7e too.

can you export your rules, or let me know exactly what they are, for me everything currently works great.

Feel free to pm/email me.

Idan

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

yhager's picture
Offline
Joined: 10/01/2007
Juice: 59
Adding permissions

In order to enable users which are not admin to configure this module, add:

/*
** Implementation of hook_perm()
*/
function uc_worldquote_perm() {
  return array('configure worldquote');
}
arbel's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/12/2007
Juice: 331
Hello, I've updated the

Hello,

I've updated the module to work with 7e. Added the permissions (thanks). and fixed the sql injection vulnerability, and a small bug.

I'll take a look the the un groups.

I'd appreciate any code review, feedback, bug reports or anything!

Idan

arbel's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/12/2007
Juice: 331
Hi, Sorry, don't quite

Hi,

Sorry, don't quite understand what you suggest to use the un groupings for?

I looked in the db, and currently there isn't a column in the uc_countries for a region for each country.

I simply don't understand =) I'm eager to hear any suggestions that might make this module better, although i'm a very novice coder so it might need some explaining.

Regards,

Idan

CpILL's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 550
Re: Hi, Sorry, don't quite

Ah Yes, the CSV file:
http://www.ubercart.org/files/all%20countires%20and%20iso%20codes.csv_.txt

The last column should be "Region" which groups together countries in to Europe, Africa, Asia etc. The postage I assume would be similar for these regions except for the one your posting from in which case your own country would be cheaper and every other country in your region would probably be about the same.

I'm sure different postage systems will have their own grouping of countries which they might want to over these presets. you would probably need a different table for this grouping and it wold join the countries and "shipping services" table where you could define special rules for different postal/shipping services.

But if your not a coder this might be too tricky. In any case having all the countries to choose from is always handy.

Uberdevelopment www.tsd.net.au/blog

arbel's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/12/2007
Juice: 331
thanks, I think that's a

thanks,

I think that's a bit out of my league =)

I'm using a different countries/zones list. I think ubercart are planning to insert one of them into the core installation, so I no need for the modules to install them too.

Idan

zoo33@drupal.org's picture
Offline
Joined: 08/23/2007
Juice: 13
Trouble with product weights

I'm seeing the same problem as robin.puga. I looked at the code (which is a little messy) and I found that the problem, in my case at least, is with uc_worldquote_match_weight().

I don't use weight at all on one particular store, which means all weights are 0. So I defined all my rules as flatrate. The if statements in uc_worldquote_match_weight() doesn't seem to handle this case very well.

I simply commented out the call to that function in uc_worldquote_quote() and now it works. Obviously not a good solution for people in general, but somewhere there lies the problem.

zoo33@drupal.org's picture
Offline
Joined: 08/23/2007
Juice: 13
Max order price

I can't find any parts of the uc_worldquote_quote() that deals with the Max order price setting. I added these snippets of code to make it work:

<?php

 

//get order weight and price
 
$pkgweight = 0;
 
$pkgprice = 0; // << addition
 
foreach ($products as $product) {
   
$units = $product->units;
   
//make everything into kg
   
$kg = $product->weight;// * constant(strtoupper($units) .'_TO_KG');
    // ^^ by the way, the line above gave me errors so I commented it out
   
$kg = $kg * $product->qty;
   
$pkgweight += $kg;
   
$pkgprice += $product->qty * $product->sell_price; // << addition
 
}

<

snip>

  foreach(

$rules as $rule) {
   
    if (
$pkgprice <= $rule->max_amount) { // << addition
     
switch ($rule->flat_weight) {
        case
'flat':
         
$rate += $rule->rate;
          break;
        case
'weight':
         
$units = $rule->units;
         
$rate += $rule->rate * $pkgweight;
          break;
      }
    }
?>

Guess this module needs some work. I needed this functionality now, so I settled for these hackish changes for now.

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Re: World Quotes

I tested the last version of the worldquote module, I put an "anywhere" flat rate to test and I have the same problem that zoo33@drupal.org :

1) It doesn't calculate the shipping cost (it put 0.00)

2) When I validate the checkout page, I have the folowing error :

warning: constant() [function.constant]: Couldn't find constant _TO_KG in drupal\sites\all\modules\ubercart\contrib\uc_worldquote\uc_worldquote.module on line 502.

By making the zoo33@drupal.org hack, it works but I don't know if it's the good way to do ? the module maintainer can confirm this problem and solution ?

In addition there is 2 messages that appear, cou can remove them :

line 508 - 509 replace

<?php
drupal_set_message
("<pre> rules - 1</pre>");
drupal_set_message("<pre>" . print_r($rules) . "</pre>");
?>

by :

<?php
#drupal_set_message("<pre> rules - 1</pre>");
#drupal_set_message("<pre>" . print_r($rules) . "</pre>");
?>
sanne's picture
Offline
Joined: 08/13/2007
Juice: 121
status

@ Arbel,

Have come anyfurther with your module?
At the moment I am using geoshipping but your solution seems very good.

I can help with some testing but I am not a programmer...

Sanne

arbel's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/12/2007
Juice: 331
Hi, I'll take a look at

Hi,

I'll take a look at these issues, can you describe a bit more the exact problems you're facing.
I'm sorry about the code being messy...i'm not really a programmer.

Regards,

Idan

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Re: Hi, I'll take a look at

I found a lot of problems in the module and, looking to the code, a lot of things seems very strange/understandable for me :

in uc_worldquote_match_weight() :

$max_amount = $worldquote->max_amount * constant(strtoupper($units) .'_TO_KG');

Damn strange, you want to conver the maximum amount price into Kilogram ???!!!

if (($max_amount) && ($pkgweight > $max_amount)){

And then, you want to compare the package weight with an amount ?

I don't understand this lines of code, for me, the maximum order amount price, is the maximum order price fot which all order with a superior amount is shipped for free.

I think lots of problems come from this function, I have a lot of difficulties to understand why because I can't trace anything (my drupal_set_message() or print, just show.... nothing, I don't understand why).

I will try to post a patch if I found all problems, but with my trace problem, it will be really hard

sanne's picture
Offline
Joined: 08/13/2007
Juice: 121
@Arbel Just as other people

@Arbel

Just as other people I can't get the shipping cost visible in the checkout/review page.
I am not a programmer at all, I couldn't even figure out to hack the module according the above instructions.

Sanne

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4111
Re: @Arbel Just as other people

Yeah, I can't get any regions to show up here either. Was hoping to be able to use this module until USPS gets sorted out... may have to use something else for now.

--
Help directly fund development: Donate via PayPal!

CpILL's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 550
Re: Re: @Arbel Just as other people

Ya, seems the Drupal multi-step-form-thing is bugging out. I had to enter the rules by hand. To get regions in you have to use the Region form (tab).

This also needs to be integrated with Workflow-ng to work properly which I'm gong to have a stab at today I think...

Uberdevelopment www.tsd.net.au/blog

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4111
Re: Re: Re: @Arbel Just as other people

I saw that. With modification I was able to use your CSV to import every country. Then I combined it with another table (from my current cart system) to get all of the usps International codes for the shipping quotes. Fun times.

--
Help directly fund development: Donate via PayPal!

CpILL's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 550
Re: Re: Re: Re: @Arbel Just as other people

Good stuff! I might modify this module and make all the countries inserted into the DB as part of the install function.

Uberdevelopment www.tsd.net.au/blog

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Re: Re: Re: Re: Re: @Arbel Just as other people

I worked a little on module improvement. I corrected some things that didn't worked for me like wrong weight calculation, wrong max amount calculation.

I will be able to post the modification for test, but there is still a bug.

You cannot get the worldquote shipping cos when you create the order in the administration page. Did the module bug like that on your installation ? I tried the modified module I did and the original module, and the bug appear on both installation. I don't know if it's my drupal installation that make it don't work or if it's a real bug.

Can you bring feedback about this feature, I will try to correct it if it's a real bug and post the improved module.

CpILL's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 550
Re: Re: Re: Re: Re: Re: @Arbel Just as other people

I don't know which version of UC your using but you'll need to have the 'Workflow-ng' module installed and then create a configuration for this module that calls the "get shipping quote" action. I'm guessing this will fix it up for the admin as well as the front end. Seems to work on the latest version in Bazaar. You can have this setup automatically if you implement the workflow-ng hook_configuration() function as in the uc_ups module.

This is such a mess, I got half way though debugging and realised that most of this rule checking code could be done with 1 sql statement per rule class if you make sure all the weight units in the table are converted to the same type and the regions table is cleaned up, so I'm half thinking I should rewrite it, but if you have it working zmove then post it up and I'll forget this mad idea...

Uberdevelopment www.tsd.net.au/blog

CpILL's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 550
verions 1.0 CpILL hack

OK, So I've made it work... for me. What I needed it for was to do quotes fro Regions, groups of countries, and apply a flat-rate price between certain weight brackets. So it does this now. I cleaned up the code a little, added some per-request caching to speed it up a little and reduce SQL query's.

I removed all the code that related to "over a certain weight charge nothing", which it does if as it returns zero if the weight doesn't fall between any rules weight bracket (so don't leave holes between rules).

The multi-page form still doesn't work for me and I entered all the data via phpMyAdmin directly into the table as I didn't have so many rules and I once spent 3 days trying to figure out how Drupals multi-page form works and am still none the wiser.

Also gave it a version number.

Hope this helps further the cause people.

Enjoy

p.s. No support for this I'm afraid. Its not my module Smiling

AttachmentSize
uc_worldquote_v1.0CpILL.zip 9.01 KB

Uberdevelopment www.tsd.net.au/blog

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Hi there, First, thanks

Hi there,

First, thanks CPILL to bring worldquote improvement !

I worked to improve the CpILL modification too, and that is the list of improvements :

  • Works for Ubercart Alpha 8 and the workflow-ng integration
  • Maximum amount reworking, now, if you put an amount in this field and your order total is above this amount, the shipping cost will be free
  • Correct PHP error (foreach error) when you get some quote and then return to cart
  • Put the name of the rule instead of "World shipping quote" in the checkout page

The last thing I need to improve is the fact to not ship to 0$ when no rules are find, I will work on it this week end.

Please, give me feedback.

AttachmentSize
uc_worldquote.zip 8.6 KB
sanne's picture
Offline
Joined: 08/13/2007
Juice: 121
Hi Zmove, I tried your

Hi Zmove,

I tried your module again. The setup is great but still I get an error with the checkout:

null: $0,00

It doesn't seem to take the world quote settings.

Did I make a mistake on my side? Setting? Or is this still a bug?

I use version 7e of ubercart and the latest zip of world quotes...

Sanne

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
HI there, As Alpha 8 rework

HI there,

As Alpha 8 rework the shipping system by integrating workflow, I think it's not compatible with inferior version.

If you want it work with alpha 7, take CpILL release, if you want it for Alpha 8, take mine.

CpILL's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 550
Re: HI there, As Alpha 8 rework

Actually, mine should work for both as I was testing on the development code, but you will need to create the workflow manually as I didn't get around to doing an automatic integration with workflow-ng. Have you done this zmove?

Uberdevelopment www.tsd.net.au/blog

lostcarpark's picture
Offline
Joined: 09/22/2007
Juice: 109
Re: verions 1.0 CpILL hack

Guys, this is beautiful. It seems to do exactly what I'm looking for, and is very easy to set up. The rules system is very well thought out.

One minor thing - almost too small to mention, but might be worth fixing in the next release.

On the "Shipping Quote Settings" page, the shipping quote method is listed as "Wolrd Quote Shipping". Just a typo, and since customers will never see it, I'm not going to worry about it.

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Re: Re: verions 1.0 CpILL hack

Yes CpILL, my modification create the workflow automatically.

In addition, you can put a maximum amount for each rules below the shipping cost will be free.

CpILL's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 550
Re: Re: Re: verions 1.0 CpILL hack

So if you have a rule:

Region 1
Min Weight: 10
Max weight: 20
Maximum for free shipping: 30 (?)
Rate: 13

and also:

Region 1
Min Weight: 10
Max weight: 30
Maximum for free shipping: 40 (?)
Rate: 69

what will happen?

also if you just don't have a weight range defined past 40 and you get an order with weight 50 what will happen, and whats the difference between that and your "maximum weight for zero shipping" rule?

Uberdevelopment www.tsd.net.au/blog

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Re: Re: Re: Re: verions 1.0 CpILL hack

By regarding how the module is done, it just get all rules and call functions to eliminate don't matching rules from the list.

So if you put your 2 rules above and your total order is 35, the second one will only applied.

I need to test that because I'm just supposing how it will work because I'm not on my work computer for now.

I don't understand the last question, the maximum for free shiping, is not a maximum weight, it's a maximum total order price.

And if no rules applied to the order, actually, it return 0 shipping. It's a thing I want to remove, I want to display an error that say that the shipping cannot be calculated. It seems to be impossible at the moment see this post.

pieterjan's picture
Offline
Joined: 11/08/2007
Juice: 7
Zipcode problem

This is a nice contribution. The module does a lot for me already.

But I have some problems with the current version. I have an international shop to implement and I need to be able to send to almost every country in Europe. There are additional charges for certain parts, like islands. I wanted to specify this by making 1 rule for country and 1 rule for the zone/postcode of the part. Zone is no problem, since this is defined in the database and has therefor an unique id. But zipcode gives me problems, because zipcodes are only unique per country. Shouldn't there be an extra selector when providing zipcodes? Or did i overlook something in the configuration?

In relation to that I noticed something else. Since the zipcode/region rules aren't linked to the country ones, you can't favour certain regions through "Max order price" settings, because they just get filtered out and the country rules stay.
Would it be a good idea to link these in a dependency tree so they can be overruled? I do realize that this makes configuration a bit harder.

Thanks in advance.

fossie@drupal.org's picture
Offline
Joined: 11/20/2007
Juice: 48
Re: Zipcode problem

I have an issue when I try to review my order, everytime it says:
Product "xyz" (SKU: 60000 ) does not have its weight units set. Shipping quote could not be calculated.

<?php

   

foreach($products as $product) {
        if(
$product->weight_units) {
           
$pkgweight += _uc_normalise_weight($product->weight, $product->weight_units) * $product->qty;
           
$pkgprice += $product->price * $product->qty;
        }    else {
           
drupal_set_message('Product "'.$product->title.'" (SKU: '.$product->model.' ) does not have its weight units set. Shipping quote could not be calculated.', 'error');
            return
0;
        }
    }
?>

When I manually recalculate shipping price, it's stated (not correct for the moment, but that's probably a configuration issue.

Does someone had simular issues with:
version: uc_worldquote_1 (On November 7th, 2007 zmove says)

TIA,
Fossie

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Hi, I modify the worldquote

Hi,

I modify the worldquote module to provide, as I said a free shipping cost over a certain amount.

I test it since 2 week in a production site, all seems work, so I think it's ok to be released.

let's download.

AttachmentSize
uc_worldquote.zip 9.06 KB
sanne's picture
Offline
Joined: 08/13/2007
Juice: 121
Awesome Zmove

Is it compatible with version 7E?
And are there other modules that need to be installed for world quotes to work with?

sanne

fossie@drupal.org's picture
Offline
Joined: 11/20/2007
Juice: 48
Re: Hi, I modify the worldquote

I do still have the issue (mentioned above):
* Product "Schnauzers" (SKU: 60000 ) does not have its weight units set. Shipping quote could not be calculated.
* Invalid option selected. Recalculate shipping quotes to continue.

When I manually recalculate it shows the correct shipping cost.

Hope anybody can help me with this.

Fossie

fossie@drupal.org's picture
Offline
Joined: 11/20/2007
Juice: 48
Re: Re: Hi, I modify the worldquote

I also saw that when I manually calculate the shipping cost, in the payment Method, the correct rule is (eg. 2Kg Belgium) is shown, when I click the Review Order button, I get the error that
Product 'abc' does not have its weight units set...
Invalid option selected. Recalculate...

so this returns to the page and then in the Payment Method the rule disappeared and : Shipping World Quote: 0,00€ is placed instead.

In watchdog I get the following error (warnings):
No shipping rules selected for: Post code: '1234', zone: '85', country '56', total weight: 7.26 lbs
and when I manually calculate, everything seems to be fine. So the problem is, I don't know why, that there are no rules for some reason at the Review Order process.

Did someone had those problems?

TIA,
Fossie

heeke's picture
Offline
Joined: 11/29/2007
Juice: 4
Same error for me

I get this error, "Invalid option selected. Recalculate shipping quotes to continue.", when clicking Review Order.
Shipping cost shows up OK when calculating.
The following gets in the log: "No shipping rules selected for: Post code: '632 31', zone: '', country '752', total weight: 0.66 lbs"

I'm using zmove's version from November 7th, 2007 on Ubercart 8 Alfa.

emerson's picture
Offline
Joined: 11/12/2007
Juice: 19
worldquote problem

Hi,

for this module would be a big help with my ubercart-installation i tried to use worldquote for fixing the shipping fee, which means that all products with an totalprice until 19.94 € should be charged with a fee (4,00 €), and all totals above are free.
installing the module and configuring workflow ng is selfexplaning and easy to do. BUT everytime i go to checkout i get the message "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."
i'm running uc alpha8 - all modules are uptodate. uc_region is installed.
quotes with flat fee using uc_flatrate are working fine.

My worldquote settings are

region : everywhere
rule type: flat value
units: gramm (not necessary in my case - i think)
shipping rate : 4.00 (i suppose this is the fee, which is inserted, when total under defined maximum
min.weight: 0
max.weight: 0
max. order price: 19.94

i am grateful for every hint.

Thanx in advance

Emerson

heeke's picture
Offline
Joined: 11/29/2007
Juice: 4
I figured it out

My problem with "No option selected" was that I hade a region rule set for Sweden but I hadent the Contry field enabeld in the shipping pane during checkout.
Enabeling the contry field or changeing the rule to anywhere solved my problem.

emerson: Just a thought, what appens if you but in somthing else but 0 in the max weight field (should be a big number so that the maximum shippment weight never exeeds the value ypou enter) in your rule?
I'm not sure but it's a quick fix if it works.

emerson's picture
Offline
Joined: 11/12/2007
Juice: 19
still problems with world quote

changing configurations in the workflow-ng module now i get a different feedback:

in the checkout-section (below the "click to calculate shipping"-button) i get the event: "null: 0,00 € and above the review sheet i find the message:
array
(
)

array
(
)

For i am not a coder this is not very helpful to me, but i'm sure there are some guys out there who can easily find out.

(Meanwhile i use the ratequote module which works fine (so i'm no longer in a hurry as far as the problem is concerned), but in the long run i need an more international solution - and this -as far as i understand the situation - will be worldquote.)

Emerson

still thankful for a helping hand

hedac's picture
Offline
Joined: 12/14/2007
Juice: 144
Re: Hi, I modify the worldquote

excelent module !!!! is a very important module

But still doesn't work as expected. if I select by weight, I always get a 0,00 € of shipping costs. If I select a flat value it works.. Detects the region well, but the problem is calculating the costs by weight for that region.

using 27 november zmove version and alpha8

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Hi there, I don't use the

Hi there,

I don't use the per weight option, so I didn't touch the original code about that. In fact, I don't know what this option should do. I never see a shop using this king of shipping, at least in my country, so what the per weight option should do ?

hedac's picture
Offline
Joined: 12/14/2007
Juice: 144
Re: Hi there, I don't use the

I think it makes an averaged price depending on the weight... let's say for example if you put from 0 to 1 kilogram, 3 euros.. it the weight is 0,5 kilgrams... the price would be 1,5 euros... I prefer the flat method... from x to y... that price.. and from y to z... other price...