USPS Webtools

Posts: 45
Joined: 11/07/2007

Hi all,

in which module or function I could find out if a USPS request is made or not? Or maybe echo a request xml?

I thin I did all confugurations right in USPS and my ubercart shop but I ve never get a response @ shipping quote.

Best,

Patrick

Posts: 924
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

I dealt with this just recently.

When you sign up for a USPS web tools API account, the password they assign you is good ONLY for the test server. And the test server does not implement the whole API functionality, in particular it won't return a rate quote.

Look at the confirmation e-mail they sent you with the user ID and password - it gives instructions for upgrading your account to the production server.

Once you have done that, you can test to see whether your account is working by typing the following URL into your brower:

http://production.shippingapis.com/ShippingAPI.dll?API=RateV3&XML=<RateV3Request%20USERID="xxxxxxx"><Package%20ID="0"><Service>ALL</Service><ZipOrigination>98144</ZipOrigination><ZipDestination>10010</ZipDestination><Pounds>1</Pounds><Ounces>0</Ounces><Size>REGULAR</Size><Machinable>True</Machinable></Package></RateV3Request>

(don't forget to put your own USERID in where I have left the xxxxxx)

This is the form of the URL that is created by sites/all/modules/ubercart/shipping/uc_usps/uc_usps.module

The USPS web site should return an XML file containing the rate quote.

Verifying your account like this should be the first step in debugging, and it would be nice to have some of this information in the Ubercart documentation. (I'll help write it - I'm taking a lot of notes like this as I go through the install and setup and encounter problems...)

--

<tr>.

Posts: 45
Joined: 11/07/2007

Hi,

thanks for response. Do you now in what funxtion the XML request is created in the USPS Module? So I am able to check it out if everthing is correct and could run it manually.

Bests,

Patrick

Posts: 45
Joined: 11/07/2007

Hi...

ok ifound the function which make the XML request to USPS... I put a print_r($request) and a print "started"; inside but nothing happens when I calculate the shipping quotes. It seems the function is not called.

Posts: 1293
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Not sure why you're trying to troubleshoot the code. USPS works fine for my site (using latest code).

You've setup your store's default location? (Has to be inside U.S., obviously).

You've signed up for web tools? Are you using the production server or the testing server? (I've read elsewhere the testing server doesn't return part of a quote which breaks XML? - Correct if wrong).

Remember to move from testing server (after you've received your WebTools ID) you need to call them or send them an email asking to be moved to the production server.

Hope this helps. We've been giving out USPS Domestic and Int'l rate quotes for over a week now - haven't had a problem.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 45
Joined: 11/07/2007

Hi,

I am troubleshooting because it is not the newest ubercart version (aplha7e)an I have also problems to get any requests with the UPS Module. So if I see request is correctly made by this functions I could sleep better Laughing out loud

It is possible to print the requests?

Now I will wait for production upgrade of USPS.

Before I post another thread.... Could it be the same thing with the UPS Module? That I have to test it on production quality?

Thanks a lot

Patrick

Posts: 1293
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

It is possible to print the requests, there is a debug option under the Shipping settings in Ubercart to allow for debug information to be shown to administrators. Enable that.

(Also I'd recommend upgrading to alpha8)

And if you weren't on the production server of USPS, that might explain your issue here. UPS is another issue I can't help you with I'm afraid - check other threads or start a new one.

Cheers!

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 45
Joined: 11/07/2007

Thanks a lot Laughing out loud

would a upgrade affect actual products we ve already inserted? And under "Shipping settings" I ve got only nothing to see here Laughing out loud

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

Like Drupal, we try hard to preserve data during upgrades. So far we've been doing well.

By Shipping settings he means the Quote methods tab under the Shipping quote settings page. I finally got rid of the "Shipping settings" page because there really was nothing to put there.

Posts: 1293
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Shows how long it's been since I've looked there. Thanks for the correction Smiling

USPS International has been working like a charm, BTW...

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 45
Joined: 11/07/2007

Thanks guys ... but I get nothing Laughing out loud

Now the upgrade is done and if I run the request on IE I get an nice XML response... but it doesn'work in my site. neither in alpha 7e or alpha 8 ... What do I wrong??? And I can't find anything to debug it...

Maybe someone could take a look to the test server http://shoptest.xibiua.000webhost.org ?

User : admin
pass : adm2201

Posts: 1293
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

I took a quick look - you probably need to configure more things.

You need to put in your default pickup address here. That's how USPS knows where the package is coming from:
http://shoptest.xibiua.000webhost.org/?q=admin/store/settings/quotes/edi...

You can also set the "Display debug information to administrators." checkbox here to display your XML request.

Should probably enable USPS Int'l here:
http://shoptest.xibiua.000webhost.org/?q=admin/store/settings/quotes/met...

Do that and then try again. Hope it helps.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 45
Joined: 11/07/2007

Why was the solution so easy Laughing out loud

I am so stupid Oo

Thanks a lot to the men who rescued my day...

Posts: 15
Joined: 11/20/2007

Hi there,

We have a working USPS account set to their prod server that we've been using with Zencart. We're switching to Ubercart.

I installed the Ubercart and the USPS module. Domestic works great, but International shipping options simply aren't provided either by pressing "Calculate" in the Shopping Cart, or "Click to Calculate Shipping" in the Checkout. This is when I put a Canadian address and postal code in. International USPS shipping methods ARE set. The company's default pickup address is set (again, domestic works great). Am I missing something obvious here?

Thanks,

Shiraz

Posts: 1293
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Not sure where to start. I just tested with a live item on our site, to an Ontario address from San Diego, and it works fine.

First thoughts:
- Where are you shipping from?
- Where to?
- How heavy is your total order?
- The items are set to be shippable, I imagine. They're all set with weights, right?
- Check your packaging. I think International automatically reverts to VARIABLE as a packaging type, and I'm pretty sure the module ignores any per-product setting anyhow.
- You're using the latest versions of everything, right? (Seems to be the case).
- Can you install Firebug (for FireFox) and see if you get any debuggable data? You might also turn on the "show debug info to admin" in your shipping methods config.

That's all I have for now. Can't really do more without investigating your setup.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

I got to wondering, so I thought I'd check. The USPS module (and UPS probably behaves similarly) uses RECTANGULAR when the "all in one" setting is enabled. It uses the per-product package type if they are quoted per product. The weight limits are 6oz. minimum and 35lbs, 0oz maximum for "machinable" packages.

If you're not using the "all in one" packaging, you should also check the dimensions listed for your products. If the length plus twice the width plus twice the height (L + 2W + 2H) is more than 130 inches, it won't be shipped. I also just noticed that USPS does not convert the length, width, and height like it should. Fortunately, the product weights are being converted to pounds and ounces.

Posts: 15
Joined: 11/20/2007

Hi Torgos,

Thank you for your response!

All the items in your list check out. I checked with Firebug too -- nothing there.

I'll private msg admin access to the server. If you have a moment, see if you can see anything. I suspect I'm missing something obvious.

Peace,

Shiraz

Posts: 3
Joined: 01/13/2008

im having the same problem here.

have my usps web id and have had personal response from usps that has me activated on the live server there.
sending a direct test to their server gets me back a dll file that says all is well.
but i have flat rate and usps shipping quotes active and the only one that shows up when a user hits "click to calculate shipping" is the flat rate. disabling flat rate means that no shipping amount shows up and user can't proceed.

i have clicked to enable bugs, but am not seeing any.

store address is configured. weight and size of product is configured.

site is www.pulsewavenyc.com and the product is the only product i have active, on the right hand side block.

any thoughts on other things to check? im happy to provide temporary admin access if anyone has the time to poke around. it just doesnt seem like its even sending the request to usps, but i just dont even know how to check.

-mike

Posts: 1293
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

What version of PHP are you using? My guess is 4 - see if you can upgrade to PHP 5. (Unless that's not the case)

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 3
Joined: 01/13/2008

hm. you were right. however, since switching to php5 it doesnt seem to have made a difference...
can you think of anything else that might be wrong? weird to be getting no debugging info...

Posts: 163
Joined: 08/07/2007
Uber DonorBug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Not Kulvik

USPS internation is working fine for many countries. There is a small list of countries which get kicked back with an error: Invalid Country Name when trying to get a quote from the UK. torgos, the UK is working fine for you? country_id == 826 is correct?

Thanks

Posts: 15
Joined: 11/20/2007

Steve,

Torgos is using an updated list of countries: http://www.ubercart.org/files/uc_usps_intl_module-csv-sql.zip

as he supplied to the community and described later in the thread here:
http://www.ubercart.org/forum/support/1514/usps_international

This will solve the invalid country error for the U.K. (USPS expects a "(Great Britain)" as the country name suffix.)

Cheers,

Shiraz

Posts: 1293
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

And I think Lyle had rolled this into Core? Lyle please correct me if I'm wrong. I know CpILL and I worked on it a little bit and Lyle did some finishing touches on it. We do have customers in UK and I haven't heard of any problems.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

No, I don't think I have a separate country list for USPS in the module. I'm sure I can find the actual list somewhere, but it's not being used.

Check over those UK orders just to be sure. Maybe the Postal Service actually wised up and starting using standard codes....

Posts: 163
Joined: 08/07/2007
Uber DonorBug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Not Kulvik

no such luck on USPS. No matter, I have encountered the Borg before... Best to just comply. In my case, I am using the workflow-ng to use USPS for international shipping and UPS domestically. So I really only need one list which will be quasi-ISO with USPS ICL exceptions. This hybrid list works well for me.

Posts: 91
Joined: 11/06/2007
Bug FinderGetting busy with the Ubercode.

Has the 'invalid country name' been fixed for countries like the UK?

Posts: 4
Joined: 09/18/2008

I'm getting "invalid country name" from USPS for the UK as well, with the latest version of ubercart (5.x-1.4) -- does anyone know what the current fix is for this? Values are currently set to 826 / United Kingdom / GB / GBR

update: changed the country name to Great Britain and now it's working

Posts: 91
Joined: 11/06/2007
Bug FinderGetting busy with the Ubercode.

'United Kingdom' should be changed to 'Great Britain'.