Active
Project:
Ubercart
Version:
8.x-4.x-dev
Component:
Shipping
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
30 Aug 2011 at 18:34 UTC
Updated:
30 May 2015 at 23:12 UTC
Jump to comment: Most recent
Hello,
Seems that there is an error with USPS international shipping quotes in case there is one heavy and one light product in the cart (for example 20lb and 0.5lb).
Separately both products have proper shipping quotes.
It is the same for test products as well.
Any suggestions on this?
Thanks
Comments
Comment #1
longwaveWhat do you mean by "there is an error"? An error message, or the calculation is incorrect? Can you give a better example of the problem?
Comment #2
Ivanhoe123 commentedSorry, just now saw the post
I will explain this in details:
1. One light product - correct shipping method appears (let's say $10)
2. One heavy product - correct shipping method as well (let's say $40)
3. One light + one heavy - I get all correct heavy quotes but first is always the quote for light product only ($10)
The error is that the module (or USPS?) returns shipping cost for light product, even though there is heavy + light product inside.
Let me know if this helps
Thanks!
Comment #3
longwaveAssigning to TR, as he knows far more about USPS than I do.
Comment #4
tr commentedYes, what you describe is a fundamental flaw in the quoting and packaging algorithm used by the USPS and UPS modules. That code is structured wrong and is so messy already that patching it to fix this issue makes it unreadable and unmaintainable, to the point that I wouldn't be able to say whether it was even doing the right thing. I have a patch that I wrote to fix this a while back that I will try to find and post here, but I don't want to put that into the module because I believe that just takes us farther away from the right thing and because I don't want to support the resulting mess. I am in the process of re-architecting the whole packaging process in Ubercart, but it's been slow going because I don't have a lot of time to devote to it.
Summary of why this happens:
A fix would be, instead of the straight merge, merge only when all the packages in the order contribute to the cost. That requires extra bookkeeping in the code, and does not always work because it assumes that there *is* a common method that can be used by all packages. Another fix is to present combinations to the customer when the packages have to ship by different methods. That will always work, unlike the previous fix, but is a lot more complicated - how do you present "1 package by First Class Mail, 1 package by Priority Mail, 1 package by Express Mail" and *all* the other possible permutations to the customer so that he/she can make a choice? You would probably have to only present general categories based on time: 3-5 day, 2-day, overnight, and show each category choice only if all the packages can be delivered in that time frame or faster. This would be a fundamental change in how things are done, and would require a bit of work.
Comment #5
WesleyTx commentedAny progress on this? I know this has to be a difficult system to update, but even a temporary solution would be fantastic.
Thanks!
Comment #6
tr commented