USPS quote breaks if country field disabled

Project:Ubercart Contributions
Component:Code
Category:
Priority:normal
Assigned:Unassigned
Status:active
Description
Project: 
Ubercart

If the country field of the checkout address is disabled, a shipping quote from USPS works on the checkout form but produces a cryptic error message on the review page.

The cause is inconsistent handling of default country. The initial call to the USPS server supplies the default country but the review page call puts null in the delivery country field. The null causes the USPS server to kick the request back with an error message.

The workaround is to enable the country field on the checkout address form even if you don't plan to ship outside the country.

The fix would be to handle default country more consistently.

Version: 
beta7
Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: USPS quote breaks if country field disabled

Can you point us to the code where this happens? It sounds like it could happen in uc_usps, uc_quote, uc_order, or uc_cart, and I'd rather not search all of them if I don't have to. Smiling