| Project: | Ubercart |
| Version: | 7.x-3.x-dev |
| Component: | Shipping |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Receiving error messages when box is larger than 12".
Error message seen was: "Package size must be 'Regular' or 'Large'"
According to v4 of API Package/Size should be LARGE. Other available option is REGULAR.
Changes to code to fix the error:
Line 775 of uc_usps.module (original)
elseif ($package->size <= 130) {
$package->size = 'OVERSIZE';
}
modified:
elseif ($package->size <= 130) {
$package->size = 'LARGE'; // changed due to RateV4 API
}
FROM USPS API Documentation:
RateV4Request /
Package / Size
required
once
Defined as follows:
REGULAR: Package dimensions are 12’’ or less;
LARGE: Any package dimension is larger than 12’’.
For example: REGULAR
string
whiteSpace=collapse
enumeration=LARGE
enumeration=REGULAR
Comments
#1
Assuming that https://www.usps.com/webtools/htm/Rate-Calculators-v1-5.htm has it right, here's a patch. Note that $package->length is guaranteed to be the longest dimension.
I haven't tested this in the least since I don't use this feature. I'm just making a patch to get this moving.
#2
The last submitted patch, ubercart_usps_package_size-1905920-1.patch, failed testing.
#3
#1: ubercart_usps_package_size-1905920-1.patch queued for re-testing.
#4
The last submitted patch, ubercart_usps_package_size-1905920-1.patch, failed testing.
#5
#6
#1: ubercart_usps_package_size-1905920-1.patch queued for re-testing.
#7
Testbot only works properly with dev releases.
Also, the USPS documentation notes that length, width, height and girth are required when size is LARGE, yet we do not seem to send this to USPS. This is probably the cause of #1364508: USPS error: Dimensions are missing for package; unable to calculate postage.
#8
Yes, sorry. I did add those changes to my setup. as described in #1364508.
Mike
#9
Committed #1 to both branches.
#10
Automatically closed -- issue fixed for 2 weeks with no activity.