I have read in many places that the USPS bases its quotes on weight and disregards dimensions. I don't think that is true any longer and I think changes were made to uc_usps that essentially
'broke" USPS quotes.

All of my products have dimensions and weight. When I submit the "calculate postage" button I invariably get:
Dimensions are missing for package; unable to calculate postage. Additional Info: All dimensions must be greater than 0.

I suspect since previously USPS didn't require the size of a product, perhaps dimensions are overridden and set to zero? And maybe now USPS is taking in that information and rejecting it?

EDIT: I was about to submit this issue, when I tried one other thing. I was able to add one product and get a quote without that notice. It only happens on orders with more than one product. You can try it our yourself at:
http://horizonsalesenterprises.com/catalog/bongos just be sure to add two products. (By the way my configuration is set to "Each product in its own package")

On a side note: I just noticed tat regardless of whether you choose "Each product in its own package" OR
"All products in one package," you cannot choose the options for insurance or to require a signature. Why?

Comments

TR’s picture

Status:Active» Postponed (maintainer needs more info)

Because "Dimensions are missing for package;" doesn't appear anywhere in the Ubercart source code, I'm going to assume you've turned on the shipping quotes debug output and that the message is being printed in the debug output returned from USPS? If so you should also be seeing the complete text of the quote request being sent to USPS, and it should be clear whether the dimensions really are there or not. Regardless, we need to see that complete text. Don't forget to strip out your account number before you post.

mcfilms’s picture

Hi TR,

Actually if I have the debug OFF I get that line. With debug ON I get:

    * Dimensions are missing for package; unable to calculate postage. Additional Info: All dimensions must be greater than 0.

API=RateV4&XML=<RateV4Request USERID="##########"><Revision>2</Revision><Package ID="0"><Service>ONLINE</Service><ZipOrigination>91436</ZipOrigination><ZipDestination>90401</ZipDestination><Pounds>12</Pounds><Ounces>0.0</Ounces><Container>VARIABLE</Container><Size>LARGE</Size><Value>99</Value><Machinable>TRUE</Machinable><ReturnLocations>TRUE</ReturnLocations><ShipDate Option="EMSH">08-Dec-2011</ShipDate></Package><Package ID="1"><Service>ONLINE</Service><ZipOrigination>91436</ZipOrigination><ZipDestination>90401</ZipDestination><Pounds>15</Pounds><Ounces>0.0</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Value>129</Value><Machinable>TRUE</Machinable><ReturnLocations>TRUE</ReturnLocations><ShipDate Option="EMSH">08-Dec-2011</ShipDate></Package></RateV4Request>
<?xml version="1.0"?>
<RateV4Response><Package ID="0"><Error><Number>-2147219426</Number><Source>DomesticRatesV4;clsRateV4.ValidateDimension;RateEngineV4.ProcessRequest</Source><Description>Dimensions are missing for package; unable to calculate postage. Additional Info: All dimensions must be greater than 0.</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error></Package><Package ID="1"><ZipOrigination>91436</ZipOrigination><ZipDestination>90401</ZipDestination><Pounds>15</Pounds><Ounces>0.0</Ounces><Size>REGULAR</Size><Machinable>TRUE</Machinable><Zone>1</Zone><Postage CLASSID="3"><MailService>Express Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt;</MailService><Rate>37.05</Rate><CommercialRate>36.24</CommercialRate><CommitmentDate>09-Dec-2011</CommitmentDate><Location>
<CutOff>5:30 PM</CutOff>
<Facility>POST OFFICE</Facility>
<Street>5805 WHITE OAK AVE</Street>
<City>ENCINO</City>
<State>CA</State>
<Zip>91316</Zip>
</Location>
</Postage><Postage CLASSID="2"><MailService>Express Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Hold For Pickup</MailService><Rate>37.05</Rate><CommercialRate>36.24</CommercialRate><CommitmentDate>09-Dec-2011</CommitmentDate><Location>
<CutOff>4:10 PM</CutOff>
<Facility>POST OFFICE</Facility>
<Street>5805 WHITE OAK AVE</Street>
<City>ENCINO</City>
<State>CA</State>
<Zip>91316</Zip>
</Location>
</Postage><Postage CLASSID="13"><MailService>Express Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Flat Rate Envelope</MailService><Rate>18.30</Rate><CommercialRate>17.40</CommercialRate><CommitmentDate>09-Dec-2011</CommitmentDate><Location>
<CutOff>5:30 PM</CutOff>
<Facility>POST OFFICE</Facility>
<Street>5805 WHITE OAK AVE</Street>
<City>ENCINO</City>
<State>CA</State>
<Zip>91316</Zip>
</Location>
</Postage><Postage CLASSID="27"><MailService>Express Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Flat Rate Envelope Hold For Pickup</MailService><Rate>18.30</Rate><CommercialRate>17.40</CommercialRate><CommitmentDate>09-Dec-2011</CommitmentDate><Location>
<CutOff>4:10 PM</CutOff>
<Facility>POST OFFICE</Facility>
<Street>5805 WHITE OAK AVE</Street>
<City>ENCINO</City>
<State>CA</State>
<Zip>91316</Zip>
</Location>
</Postage><Postage CLASSID="30"><MailService>Express Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Legal Flat Rate Envelope</MailService><Rate>18.30</Rate><CommercialRate>17.40</CommercialRate><CommitmentDate>09-Dec-2011</CommitmentDate><Location>
<CutOff>5:30 PM</CutOff>
<Facility>POST OFFICE</Facility>
<Street>5805 WHITE OAK AVE</Street>
<City>ENCINO</City>
<State>CA</State>
<Zip>91316</Zip>
</Location>
</Postage><Postage CLASSID="31"><MailService>Express Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Legal Flat Rate Envelope Hold For Pickup</MailService><Rate>18.30</Rate><CommercialRate>17.40</CommercialRate><CommitmentDate>09-Dec-2011</CommitmentDate><Location>
<CutOff>4:10 PM</CutOff>
<Facility>POST OFFICE</Facility>
<Street>5805 WHITE OAK AVE</Street>
<City>ENCINO</City>
<State>CA</State>
<Zip>91316</Zip>
</Location>
</Postage><Postage CLASSID="1"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt;</MailService><Rate>15.25</Rate><CommercialRate>13.32</CommercialRate></Postage><Postage CLASSID="33"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>13.32</CommercialRate></Postage><Postage CLASSID="22"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Large Flat Rate Box</MailService><Rate>14.95</Rate><CommercialRate>14.20</CommercialRate></Postage><Postage CLASSID="34"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Large Flat Rate Box Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>14.20</CommercialRate></Postage><Postage CLASSID="17"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Medium Flat Rate Box</MailService><Rate>10.95</Rate><CommercialRate>10.50</CommercialRate></Postage><Postage CLASSID="35"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Medium Flat Rate Box Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>10.50</CommercialRate></Postage><Postage CLASSID="28"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Small Flat Rate Box</MailService><Rate>5.20</Rate><CommercialRate>5.00</CommercialRate></Postage><Postage CLASSID="36"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Small Flat Rate Box Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>5.00</CommercialRate></Postage><Postage CLASSID="47"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Regional Rate Box A</MailService><Rate>0.00</Rate><CommercialRate>4.97</CommercialRate></Postage><Postage CLASSID="48"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Regional Rate Box A Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>4.97</CommercialRate></Postage><Postage CLASSID="49"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Regional Rate Box B</MailService><Rate>0.00</Rate><CommercialRate>5.81</CommercialRate></Postage><Postage CLASSID="50"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Regional Rate Box B Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>5.81</CommercialRate></Postage><Postage CLASSID="16"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Flat Rate Envelope</MailService><Rate>4.95</Rate><CommercialRate>4.75</CommercialRate></Postage><Postage CLASSID="37"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Flat Rate Envelope Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>4.75</CommercialRate></Postage><Postage CLASSID="44"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Legal Flat Rate Envelope</MailService><Rate>4.95</Rate><CommercialRate>4.95</CommercialRate></Postage><Postage CLASSID="45"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Legal Flat Rate Envelope Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>4.95</CommercialRate></Postage><Postage CLASSID="29"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Padded Flat Rate Envelope</MailService><Rate>4.95</Rate><CommercialRate>4.95</CommercialRate></Postage><Postage CLASSID="46"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Padded Flat Rate Envelope Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>4.95</CommercialRate></Postage><Postage CLASSID="38"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Gift Card Flat Rate Envelope</MailService><Rate>4.95</Rate><CommercialRate>4.75</CommercialRate></Postage><Postage CLASSID="39"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Gift Card Flat Rate Envelope Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>4.75</CommercialRate></Postage><Postage CLASSID="42"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Small Flat Rate Envelope</MailService><Rate>4.95</Rate><CommercialRate>4.75</CommercialRate></Postage><Postage CLASSID="43"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Small Flat Rate Envelope Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>4.75</CommercialRate></Postage><Postage CLASSID="40"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Window Flat Rate Envelope</MailService><Rate>4.95</Rate><CommercialRate>4.75</CommercialRate></Postage><Postage CLASSID="41"><MailService>Priority Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; Window Flat Rate Envelope Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>4.75</CommercialRate></Postage><Postage CLASSID="4"><MailService>Parcel Post&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt;</MailService><Rate>10.73</Rate></Postage><Postage CLASSID="6"><MailService>Media Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt;</MailService><Rate>7.99</Rate></Postage><Postage CLASSID="7"><MailService>Library Mail</MailService><Rate>7.59</Rate></Postage></Package></RateV4Response>

My read on this is that USPS is now expecting to get the dimensions and it is only getting Size>LARGE.

Other data worth mentioning. My shipping quote settings are only using "U.S.P.S. Parcel Post." My "Default order fulfillment type for products" is "Small Package" because my only other choice is "Letter."

This quote for two packages weighing 15 and 12 pounds came to a total that said:
"Parcel Post® (1 package): $10.73"

I'm not saying an error on my part is not possible. But I have deployed three other ubercart shops previously and have not run into this issue. I believe there is a problem with the D7 version of this shipping module.

WesleyTx’s picture

I was getting this same error in version 6.x-2.7 and I appear to have fixed it simply by adding the following into uc_usps_rate_request:

        '<Width>'. $package->width .'</Width>'.
        '<Length>'. $package->length .'</Length>'.
        '<Height>'. $package->height .'</Height>'.
        '<Girth>'. $package->girth .'</Girth>'.

The rates I'm getting jibe with those I get directly from USPS's online form.

drum5ormore’s picture

It appears this error only occurs when the size is set to "LARGE".

To fix this, add the code mentioned above, but make sure you add the extra elements just after
'<Size>' . $package->size . '</Size>' .

Otherwise you'll get a DTD/schema error.

turbogeek’s picture

I can confirm that with the addition of the four lines WesleyTx posted, it will resolve the issue. The error seemed to crop up with larger packages (over 2'x2'). After I altered the uc_usps_rate_request function, I was getting incorrect rates when more than one item was in the cart - it was actually a lower amount with multiple items than a single item. The remedy seemed to be a setting in the USPS config, under Quote Options, changing Product Packages to "Each in its own package" (if this applies to your store).

sander-martijn’s picture

To fix international quoting for oversized packages, several more things need to change than the ones listed above. What I have so far is:

'<MailType>Package</MailType>'.
        '<GXG><POBoxFlag>N</POBoxFlag><GiftFlag>N</GiftFlag></GXG>'.
        '<ValueOfContents>'. $package->price .'</ValueOfContents>'.
        '<Country>'. $shipto_country .'</Country>'.
        '<Container>'. 'RECTANGULAR' .'</Container>'.
        '<Size>'. $package->size .'</Size>'.
        '<Width>'. $package->width . '</Width>'.
        '<Length>'. $package->length . '</Length>'.
        '<Height>'. $package->height . '</Height>'.
        '<Girth>'. $package->girth . '</Girth>'.

This is now returning the proper quote for large items international. However it's still showing up as an error and I'm not sure why. In the error response I can clearly see the proper quote:

undefined:

API=IntlRateV2&XML=<IntlRateV2Request USERID="888MRCHI5727"><Revision>2</Revision><Package ID="0"><Pounds>12</Pounds><Ounces>0</Ounces><MailType>Package</MailType><GXG><POBoxFlag>N</POBoxFlag><GiftFlag>N</GiftFlag></GXG><ValueOfContents>174.95</ValueOfContents><Country>Australia</Country><Container>RECTANGULAR</Container><Size>LARGE</Size><Width>19</Width><Length>21</Length><Height>21</Height><Girth>80</Girth><OriginZip>60050</OriginZip></Package></IntlRateV2Request>

<?xml version="1.0"?>
<IntlRateV2Response><Package ID="0"><Prohibitions>Coins; bank notes; currency notes (paper money); securities of any kind payable to bearer; traveler's checks; platinum, gold, and silver (except for jewelry items meeting the requirement in "Restrictions" below); precious stones (except when contained in jewelry items meeting the requirement in "Restrictions" below); and other valuable articles are prohibited.
Fruit cartons (used or new).
Goods bearing the name "Anzac."
Goods produced wholly or partly in prisons or by convict labor.
Perishable infectious biological substances.
Radioactive materials.
Registered philatelic articles with fictitious addresses.
Seditious literature.
Silencers for firearms.
Used bedding.</Prohibitions><Restrictions>Jewelry is permitted only when sent as an insured parcel using Priority Mail International service. In addition, Australian Customs regulations prohibit importation of jewelry that is made with ivory or from endangered species, such as snake, elephant, or crocodile, that does not have an accompanying Import/Export Permit in relation to the Convention on International Trade in Endangered Species of Wild Fauna and Flora (CITES).
Meat and other animal products; powdered or concentrated milk; and other dairy products requires permission to import from the Australian quarantine authorities.
Permission of the Australian Director-General of Health is required to import medicines.</Restrictions><Observations>Duty may be levied on catalogs, price lists, circulars, and all advertising introduced into Australia through the mail, regardless of the class of mail used.</Observations><CustomsForms>First-Class Mail International items and Priority Mail International Flat Rate Envelopes and Small Flat Rate Boxes:
PS Form 2976 (see 123.61)
Priority Mail International parcels:
PS Form 2976-A inside 2976-E (envelope)</CustomsForms><ExpressMail>Country Code:
AU

Reciprocal Service Name:
Express Post

Required Customs Form/Endorsement  
1. Business and commercial papers.
No form required. Endorse item clearly next to mailing label as BUSINESS PAPERS.

2. Merchandise samples without commercial value microfilm, microfiche, and computer data.
PS Form 2976-A, Customs Declaration and Dispatch Note CP 72, inside a PS Form 2976-E, Customs Declaration Envelope CP 91.

3. Merchandise and all articles subject to customs duty.
PS Form 2976-A, Customs Declaration and Dispatch Note CP 72, inside a PS Form 2976-E, Customs Declaration Envelope CP 91.

Note:
1. Coins; banknotes; currency notes, including paper money; securities of any kind payable to bearer; traveler's checks; platinum, gold, and silver; precious stones; jewelry; watches; and other valuable articles are prohibited in Express Mail International shipments to Australia.
2. Express Mail International With Guarantee service - which offers a date-certain, postage-refund guarantee - is available to Australia.

Areas Served:

All except Lord Howe Island and the Australian Antarctic territories.</ExpressMail><AreasServed>Please reference Express Mail for Areas Served.</AreasServed><AdditionalRestrictions>No Additional Restrictions Data found.</AdditionalRestrictions><Service ID="4"><Pounds>12</Pounds><Ounces>0</Ounces><MailType>Package</MailType><GXG><POBoxFlag>N</POBoxFlag><GiftFlag>N</GiftFlag></GXG><Container>RECTANGULAR</Container><Size>LARGE</Size><Width>19</Width><Length>21</Length><Height>21</Height><Girth>80</Girth><Country>AUSTRALIA</Country><Postage>380.75</Postage><ExtraServices><ExtraService><ServiceID>1</ServiceID><ServiceName>Insurance</ServiceName><Available>True</Available><Price>1.00</Price><DeclaredValueRequired>True</DeclaredValueRequired></ExtraService></ExtraServices><ValueOfContents>174.95</ValueOfContents><SvcCommitments>1 - 3 business days</SvcCommitments><SvcDescription>Global Express Guaranteed&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt; (GXG)**</SvcDescription><MaxDimensions>Max. length 46", width 35", height 46" and max. length plus girth combined 108"</MaxDimensions><MaxWeight>70</MaxWeight><GXGLocations><PostOffice><Name>MEIJER #218</Name><Address>2253 N RICHMOND RD</Address><City>MCHENRY</City><State>IL</State><ZipCode></ZipCode><RetailGXGCutOffTime>5:30 PM</RetailGXGCutOffTime><SaturDayCutOffTime>1:00 PM</SaturDayCutOffTime></PostOffice></GXGLocations></Service></Package></IntlRateV2Response>

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.

sander-martijn’s picture

Status:Postponed (maintainer needs more info)» Needs work

Just realized I didn't change the status of this after providing a partial solution and question regarding the last bit.

longwave’s picture

Status:Needs work» Fixed

Committed the changes from #3 to both branches. If you still have problems with USPS after upgrading to the latest -dev release, please open a new request with full debugging information.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.