Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

USPS Shipping Module Error


nifocus

Recommended Posts

I had post this same problem over 2 weeks ago and no seems to know the answer.

 

Anyway, I recieved the username but no password from the usps. Should we use the password we used while making an account on the website? Because I tried it, too, but it's still gave the same error.

I emailed USPS regarding the password. Their response was they no longer use or accept a password for this so just enter anything in the password field.

Thanks, Bob

Link to comment
Share on other sites

  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

ok, so correct me if i am wrong, but you are saying to put the userid (email addy) in both the userid and password areas of the admin?

I changed my shipping module for USPS from test to production and it works! :thumbsup: Obviously, I had already called them and had them switch me to production.

Thanks, Bob

Link to comment
Share on other sites

I'm having problems with USPS and getting errors too.

 

However, mine was working fine for a long time. All the sudden I start getting errors and its only affecting Canada. People from Canada get the mentioned error but not people from say France.

 

Thoughts?

Link to comment
Share on other sites

Ok I've figured out I'm only getting this error outside of the USA. My USPS works for all packages inside the USA but as soon as I get an order from Canada, France, Denmark, etc, my USPS stops working and gives the error everyone else is mentioning.

 

Thoughts? I really need to fix this.

Link to comment
Share on other sites

My USPS shipping module was working fine up until today (Wednesday, June 6) where all the sudden customers were getting error. Called USPS and of course no-one there can tell me any reason why it suddenly happened today. The error was across the board - All US orders and international orders. I changed my module from 'test' to 'production' and it started working again. Just a heads up.

Link to comment
Share on other sites

My USPS Module set for production - on multiple sites on multiple servers - worked fine up until today - now all customers everywhere return an error. Nothing I do will correct the problem. I am totally stumped.

 

Anybody else having a problem?

 

Anyone have any any ideas?

 

Deb

At least 90% of my programming problems lie somewhere between my keyboard and my chair.

Link to comment
Share on other sites

Seems a lot of us are having this problem. Hopefully someone comes up with a fix soon, I've already lost three sales over seas that I'm aware of and who knows how many others.

I am on the phone with a programmer as I type: To avoid loosing sales, I activated a rate table shipping module that I used to use a very long time ago. I had to "pick shipping" costs for set weight or price amounts but it has allowed us to keep the shops open while we work on the USPS module.

At least 90% of my programming problems lie somewhere between my keyboard and my chair.

Link to comment
Share on other sites

I've been having the same problem for over a week and it only affects people outside the US. Losing tons of sales because of it and not sure what to do.

I just noticed this problem for domestic AND international. I went back to the old production server, and it seems to be working: production.shippingapis.com

Link to comment
Share on other sites

  • 2 weeks later...

I've been on the production server for a year, and now (suddenly) all my Canada orders are being rejected as described above, but domestic is okay. (I only accept USA and Canada, so I can't speak for other countries). I don't see a means for specifying a server hostname - do I need to do that in the sources? So, like everyone else, I'm hopeing for a solution soon.

Link to comment
Share on other sites

I just noticed this problem for domestic AND international. I went back to the old production server, and it seems to be working: production.shippingapis.com

 

Well, I decided to try the USPS Methods 2.8d contribution and now have a different problem.

 

I have been running an OSC site for two years with no problems...until the rate change.

 

So, I do the install:

 

"USPS Methods_2.8d"

"USPS Methods Update for Postal Rates & Services Changes 5.14.07"

 

 

It was pretty simple and straight forward but now I get this for international addresses but not domestic addresses.

 

-2147219080 - Missing value for Country

 

I realize that this is typically because the improper country is selected in the admin -->config...but I have United States selected and my zip code is entered.

 

 

Any ideas on how to get this fixed for my international orders?

 

This is a live site, so any help would be greatly appreciated.

 

Sincerely,

Mark

Link to comment
Share on other sites

I installed the latest update for the May changes, still no luck until I removed and re-added the module, and re-entered the USPS login info. Now it almost all works, and I can accept orders from Canada, but I still cannot select international shipping options in the module configuraiton. No options are listed in the configuration, but all options are offered to users.

 

I want to exclude express mail from the options, but because of this problem I can't do that.

 

This must be some issue with the way I entered the changes, but I haven 't figured it out yet.

Link to comment
Share on other sites

Ok...I decided to re-install the "USPS Methods_2.8d" & "USPS Methods Update for Postal Rates & Services Changes 5.14.07"

 

1.) Turn off ("remove") the USPS shipping module in your admin first (be sure to save all your USPS server login / password info first)

 

2.) Install "USPS Methods_2.8d" per the instructions

 

http://www.oscommerce.com/community/contri...ch,usps+methods

 

3.) Install "USPS Methods Update for Postal Rates & Services Changes 5.14.07" per the instructions

 

4.) In PHPAdmin, run the SQL queries.

 

5.) In OSC Admin, re-install the USPS shipping module and edit the info for you server login/password and make sure you're on the "production" server.

 

Works like a charm now. I believe the the error is caused by an improper installation during the editing of the USPS.php file. Instead of replacing code, comment out the old code by placing a /* before and a */ after the old code. Then paste in the new code.

 

Here's my tip - go slow...some the code that needs to be replaced in the USPS.php file looks the same in 5 places but read CAREFULLY and make sure you are replacing the EXACT same code. Not sure if this was my problem but it's working now, so I am pretty sure that's what occurred.

 

Either that or I ran the first SQL query and didn't run BOTH SQL queries

 

Good luck!

 

~Mark

Link to comment
Share on other sites

Guys,

 

One more question.

 

In phpmyadmin do I need to execute both these queries and do I just copy and paste it in the Run SQL query/queries on server localhost: window. Please do let me know.

 

Thanks

 

Amit

 

Execute this SQL update:

 

ALTER TABLE `configuration` CHANGE `set_function` `set_function` VARCHAR( 555 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL;

 

Execute this SQL update if you already have the module installed and are updating:

 

UPDATE `configuration` SET `set_function` = 'tep_cfg_select_multioption(array(''Global Express'', ''Global Express Non-Doc Rect'', ''Global Express Non-Doc Non-Rect'', ''Express Mail Int'', ''Express Mail Int Flat Rate Env'', ''Priority Mail Int'', ''Priority Mail Int Flat Rate Env'', ''Priority Mail Int Flat Rate Box'', ''First-Class Mail Int''),' WHERE `configuration_key` ='MODULE_SHIPPING_USPS_TYPES_INTL' LIMIT 1 ;

 

 

 

 

Ok...I decided to re-install the "USPS Methods_2.8d" & "USPS Methods Update for Postal Rates & Services Changes 5.14.07"

 

1.) Turn off ("remove") the USPS shipping module in your admin first (be sure to save all your USPS server login / password info first)

 

2.) Install "USPS Methods_2.8d" per the instructions

 

http://www.oscommerce.com/community/contri...ch,usps+methods

 

3.) Install "USPS Methods Update for Postal Rates & Services Changes 5.14.07" per the instructions

 

4.) In PHPAdmin, run the SQL queries.

 

5.) In OSC Admin, re-install the USPS shipping module and edit the info for you server login/password and make sure you're on the "production" server.

 

Works like a charm now. I believe the the error is caused by an improper installation during the editing of the USPS.php file. Instead of replacing code, comment out the old code by placing a /* before and a */ after the old code. Then paste in the new code.

 

Here's my tip - go slow...some the code that needs to be replaced in the USPS.php file looks the same in 5 places but read CAREFULLY and make sure you are replacing the EXACT same code. Not sure if this was my problem but it's working now, so I am pretty sure that's what occurred.

 

Either that or I ran the first SQL query and didn't run BOTH SQL queries

 

Good luck!

 

~Mark

Link to comment
Share on other sites

Important Note:

 

If you are running MySQL below version 5.0.3

 

Change the first MySQL command to:

 

ALTER TABLE `configuration` CHANGE `set_function` `set_function` TEXT

 

instead of:

 

ALTER TABLE `configuration` CHANGE `set_function` `set_function` VARCHAR( 555 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL;

 

cheers!

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 2 weeks later...

I am also getting this error message, but only for domestic (US) orders. I have gone through the rate-calculators link and made all of the updates that I can see to make, but to no avail. If anyone can provide specifics on what needs to change it would be greatly appreciated; I'm running the USPS shipping module with no contributions.

Link to comment
Share on other sites

I can successfully install and use USPS Methods for domestic and international orders, but when I try to install the Update for Rates and Services, International quotes fail. In the admin section for shipping modules, there are no checkboxes for international shipping methods.

 

This whole process is disappointingly kludgy, and I have PHP/MySQL experience.

 

In the instructions for installing the Update for Rates and Services, it says:

"

***************************************************************************

Find this section around line 49:

 

$this->intl_types = array('GXG Document' => 'Global Express Guaranteed Document Service',

'GXG Non-Document' => 'Global Express Guaranteed Non-Document Service',

'Express' => 'Global Express Mail (EMS)',

'Priority Lg' => 'Global Priority Mail - Flat-rate Envelope (Large)',

'Priority Sm' => 'Global Priority Mail - Flat-rate Envelope (Small)',

'Priority Var' => 'Global Priority Mail - Variable Weight (Single)',

'Airmail Letter' => 'Airmail Letter Post',

'Airmail Parcel' => 'Airmail Parcel Post',

'Surface Letter' => 'Economy (Surface) Letter Post',

'Surface Post' => 'Economy (Surface) Parcel Post');

 

Comment out and change to this:

 

$this->intl_types = array('GXG' => 'Global Express Guaranteed',

'GXG Non-Doc Rect' => 'Global Express Guaranteed Non-Document Rectangular',

'GXG Non-Doc Non-Rect' => 'Global Express Guaranteed Non-Document Non-Rectangular',

'Express' => 'Express Mail International (EMS)',

'Express FlatEnv' => 'Express Mail International (EMS) Flat Rate Envelope',

'Priority Intl' => 'Priority Mail International',

'Priority Intl FlatEnv' => 'Priority Mail International Flat Rate Envelope',

'Priority Intl FlatBox' => 'Priority Mail International Flat Rate Box',

'FirstClass Intl' => 'First-Class Mail International');

 

***************************************************************************

"

 

The code it says to locate does not exist. In the original USPS.PHP file I extracted from the USPS Methods .ZIP, the code block it says to replace has already been replaced. Later, when the instructions say to find and replace the code around line 154 (155 in the file I have), I get suspicious. This query doesn't seem to jive with the code block that creates the array.

 

It seems to me that I've got bits and pieces of the whole solution, but I can't seem to get all functions to work.

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
I am also getting this error message, but only for domestic (US) orders. I have gone through the rate-calculators link and made all of the updates that I can see to make, but to no avail. If anyone can provide specifics on what needs to change it would be greatly appreciated; I'm running the USPS shipping module with no contributions.

 

ok, I have also been restling with this for one of my clients since April. Here is how I solved the dredded:

 

An error occured with the USPS shipping calculations.

If you prefer to use USPS as your shipping method, please contact the store owner.

 

First, I went to the catalog/includes/modules/shipping/usps.php file and went to line 270 (or thereabouts). There is a commented line to email USPS rate quote responses. The email comes back in XML format. Mine said this

 

<?xml version="1.0"?>

<RateResponse><Package ID="0"><Error><Number>-2147219498</Number><Source>DomesticRatesV2;RateEngineV2.ProcessRequest</Source><Description>Please enter a valid ZIP Code for the sender.

 

Well that gave me a clue to check out the Zipcode stuff in usps.php. I did a search in the code for the word zip and I found:

 

'<ZipOrigination>' . SHIPPING_ORIGIN_ZIP . '</ZipOrigination>' .

 

I changed SHIPPING_ORIGIN_ZIP to '90210' and it worked great (make sure you put the single quotes around your zipcode).

Next, I went into phpmyadmin and went to see why SHIPPING_ORIGIN_ZIP wasn't working. In the configuration table, I found that I didn't have the CONFIGURATION_KEY of SHIPPING_ORIGIN_ZIP. Instead I had STORE_ORIGIN_ZIP.

 

So, finally, I changed that line in usps.php

'<ZipOrigination>' . SHIPPING_ORIGIN_ZIP . '</ZipOrigination>' .

 

to say

'<ZipOrigination>' . STORE_ORIGIN_ZIP . '</ZipOrigination>' .

 

And it worked. Sorry for being so long winded, but I think this can help those who are also stumped.

 

Mike

Link to comment
Share on other sites

In the admin area, under configuration, click "Shipping / Packaging" . You must setup the zip code in that area. I thought at first it was pulling from the "My store" info area.

 

All I did was setup the account on USPS, within seconds I got an e-mail with my username and password. Entered that into the module, called USPS, and it worked. Prices seem kinda of low though, so further testing will tell me the accuracy.

Jason Miller

www.jamz.net

Link to comment
Share on other sites

Tried it... I changed that line (it's line 197 in my usps.php), but with no success, for either of your suggestions - changing it to the actual postal code in single quotes, or changing it to STORE_ORIGIN_ZIP.

 

My postal code is set in the Shipping/Packaging admin area.

 

So... still no luck with this for me.

Link to comment
Share on other sites

  • 1 month later...
I had been moved to production server but still got the same error.

 

so have I and I just spoke with someone from the USPS web tools technical support and they are advising customers NOT to use this interface because of the volume of complaints received. they are referring other interfaces. the most common complaint reported was switching from one shipping type to another.

 

I'm just simply trying to send a standard packages and keep getting the can't calculate shipping error.

Edited by makeit4me
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...