Jump to content

USPS testing help


Guest GhostRyder

Recommended Posts

Guest GhostRyder

Ok, maybe I'm being a bit dense here but I need some help with this. I'm setting up the USPS shippng module. I've set up an account with USPS Web tools and I have an account number. I have the module in testing mode, I have the proper origin zip set, I have the proper destination zip set, I have the account name set, no password is neccessary but you have to put something in that field so I did that. Now, here comes the issue...in the item setup you have a field to set the weight but only pounds is listed. The testing script NEEDS ounces as well. Am I missing something? How can I get this set?

Link to comment
Share on other sites

Hi,

I am having the same problem.

Right now I am getting an XML error message about the pounds and ounces.

Where do you add the ounces?

You said you fixed it but didn't say where.

Thanks.

Brian

Link to comment
Share on other sites

Guest GhostRyder

Sorry, I guess I should have listed what I did. I found the file modules/shipping/USPS/calc.php

This is the secion that I modified:

case "Priority":

$package = array( 'zip_origin' => $module['zip_origin'],

'zip_dest' => $zip_dest,

'pounds' => $totalWeight,

'ounces' => '0',

'service' => 'PRIORITY',

'size' => $module['prioritySize'],

'container' => $module['priorityContainer'],

'country' => $countryName,

'mail_type' => "Package"

);

I changed:

'ounces' => '0',

to be

'ounces' => '5',

This satisfied the 5 ounces requirement that I needed for USPS testing. It's odd that this isn't a value that you can set in Item setup or at least a hint given to where to go to find it. (When/if testing is complete you'll have to set it back to 0).

Now that I got past all of that, I have the DOMXML issue to deal with.

Link to comment
Share on other sites

I still can't get the shipping to work.

What do you put in the weight box in the edit product page?

I am now getting the error message "Sorry we cannot ship a product of that weight."

I put in 1 lb.

Thanks,

Brian

Link to comment
Share on other sites

Guest GhostRyder

That possibly sounds like a differnet issue from what I'm having. I'm just trying to satisfy the weight requirements that USPS requires for a test script before they will approve moving me into production. The first test requires a Priority Box if 10 pounds and 5 ounces. Since the item setup only lets you put in pounds, you have to edit the code to get the ounces in.

If you are also in testing mode for USPS, I suggest turning in debugging mode. You get more useful information that way.

Link to comment
Share on other sites

After you apply for webtools on the usps site they send you a number.

You then use that number when running the following url from your browser.

A sample test request would look like: "http://testing.shippingapis.com/ShippingAPITest.dll?API=[API_Name]&XML=

[xml_String_containing_User_ID]"

Then call them at: 800-344-7779

And ask them to activate the production server for your ID.

Then put the ID in your USPS user name, and put any text string you want in the password.

Link to comment
Share on other sites

Guest GhostRyder

Right. I've done all that.

I finally got my hosting site to add DOMXML support for my site. Now everything is groovy and I got successful USPS test responses.

Link to comment
Share on other sites

Guest GhostRyder

One other thing I just thought about...does anyone know if USPS can handle decimal points in the weight? Since you can't set ounces and only pounds, if I set something to be .5 pounds, is it going to blow up when trying to calculate a shipping cost on that item? Anyone?

Link to comment
Share on other sites

They told me they only do ounces and pounds not decimals and there is no setting for ounces in the product edit file. I have not gotten the USPS shipping to work with CubeCart yet.

I hope someone can help us.

Link to comment
Share on other sites

Guest KPalicz

I'm also having trouble with the USPS module, and probably more clueless than any of you about what to do about it. If anyone could hold me by the hand a bit, i'd appreciate it.

Last real thing I did was register with the USPS and get that e-mail back. What do I do at this point?

It said (as y'all no doubt know):

A sample test request would look like: "http://testing.shippingapis.com/ShippingAPITest.dll?API=[API_Name]&XML=

[xml_String_containing_User_ID]"

What is/where do I find the API name? And what is/where do I find the XML string? I've got the User ID.

Also, I'm using 3.0.4, do I need to upgrade to 3.0.5? I see that addresses some USPS bugs.

Link to comment
Share on other sites

Guest KPalicz

Ok, I've upgraded to 3.0.5, and called the USPS help line, and they moved me out of the test phase.

Now I'm getting the domxml error. I'll try what GhostRyder suggested and get my server to add domxml support (hopefully they know what that is, i don't).

Link to comment
Share on other sites

Guest KPalicz

I still can't get the shipping to work.

What do you put in the weight box in the edit product page?

I am now getting the error message "Sorry we cannot ship a product of that weight."

I put in 1 lb.

Thanks,

Brian

heh, ok, I got the DOMXML problem fixed thanks to my server, and now I'm getting this error about the weight. Brian, did you find a solution to it?

Link to comment
Share on other sites

Guest GhostRyder

Ok. I finally got moved to production and everything is working fime. USPS will funcion if configured properly.

I figured out that the error mesage "Sorry we cannot ship a product of that weight" is going to occur any time you try to use first class mail. Since you have to have a weight in there, and you can't use decimals (ie .5 lbs - tried it, it fails), the minimum weight you can set is 1 pound. 1 pound is over the weight limit for first class mail which has a limit of 13 ounces. Since you can't even set ounces it's worthless to even have the first class mail option.

In the code, ounces is hard coded to 0. Any of you coding guru's out there feel like tackling a mod that would make ounces a variable and ounces a configurable option in the product admin?

Nevermind on the below. I figured out that I forgot to reset the serice to PARCEL from ALL when I completed testing.

Also, bug note: If you turn on Parcel Post machineable, every shipping option is turned on. Parcel Post non-machineable doesn't have this problem.

Link to comment
Share on other sites

Guest KPalicz

Great Ghost!

That first class shipping error is so obvious, I'm hitting myself for not figuring it out. good job! Thanks for posting too, wow, it looks like I might actually be able to use the USPS shipping thing (mostly).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...