Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

USPS Module Not Working!!


Tomas

Recommended Posts

Hi:

 

I've tried to use the USPS module, getting my ID and password from the USPS webpage. Everything looks OK until I try to use it. Everytime I try it shows something like this:

 

United States Postal Service

An error occured with the USPS shipping calculations.

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

 

I've checked twice and even trice the "Shipping/Packaging" feature, and looks OK. I don't know what the heck is happenning. My ID and pass are the ones for production server (I got the confirmation email).

 

Please!! Help me!!!

 

Thanks in advance!

Link to comment
Share on other sites

I'm having same problem. I'm still trying to get the test mode to work. The initial password and ID you get when you first sign up is for test server. Then you need to call or email them to get them to activate ur account to work with the production servers.

 

I still haven't been able to get it to work with the test server. Does anyone know if 'USPS Methods' needs cURL installed within PHP? I'm wondering if that could be the problem.

Link to comment
Share on other sites

I think it has to do with what is explained in this thread link

 

 

Go into your usps.php file in /store/includes/modules/shipping

 

I think what you need to do is change:

 

$this->types = array('Express' => 'Express Mail',

'First Class' => 'First-Class Mail',

'Priority' => 'Priority Mail',

'Parcel' => 'Parcel Post');

 

INTO:

 

$this->types = array('Express' => 'EXPRESS',

'First Class' => 'First-Class Mail',

'Priority' => 'Priority',

'Parcel' => 'Parcel');

 

That should make the difference. Also, the international services need to be changed too as written in the thread I linked above. I was able to finally get a response from the test server when I made the change I just showed. let me know if it helps.

Link to comment
Share on other sites

Did you tell USPS to set your account to point to their server, and select the 'production server' or 'production' option in the shipping module admin, as oppossed to test?

 

Also, make sure your zip code is selected already for your store configuration *I learned from that mistake*

 

These answers should resolve your issue, and another one, where it says there is an invalid zip code or what not.

 

Anyway, let me know. I went through this hell. Nobody here knows anything about shipping, trust me.

 

These questions always go unanswered, and I was furious with the lack of support on that mod, but I got it to work. So I want to help.

Link to comment
Share on other sites

Responding to the changes (on 9 Oct 2003) to the XML literals for the service types in the USPS rate quote responses, the USPS Methods contribution has been revised:

 

http://www.oscommerce.com/community/contributions,487/page,4

 

And, to answer the earlier question, the USPS Methods contribution does NOT require cURL.

Link to comment
Share on other sites

Hello,

 

I successfully installed USPS Methods 2.6- but I am trying to get Media Mail to work with this contribution. I have tried editing the code and it is working in the admin, but I get the same error message when testing the checkout.

 

Does anyone know how to add Media Mail to this mod? I need it because I sell books, and Media rate is the best way to ship.

 

Any help appreciated!

Link to comment
Share on other sites

  • 1 month later...
Hello,

 

I successfully installed USPS Methods 2.6- but I am trying to get Media Mail to work with this contribution. I have tried editing the code and it is working in the admin, but I get the same error message when testing the checkout.

 

Does anyone know how to add Media Mail to this mod? I need it because I sell books, and Media rate is the best way to ship.

 

Any help appreciated!

:D Ah! Ha! I too managed to get USPS working with the use of USPS Methods 2.6 in the contributions library.

 

And I would also like to add Media Mail. So before I go banging my head on the wall over it wondered if you figured it out and if you did would you care to share how you did it? TIA!

Link to comment
Share on other sites

I did figure it out- but as usual, did not really document the process! I will be able to go back through the files later this evening to give you the code, but in the meantime....

 

I used USPS Methods as a guide. First, I backed everything up- database included! Then I went into Admin, and disabled USPS Methods.

Next, I opened each file included in USPS Methods in an editor (I used BBEdit), and searched for each case of 'parcel' and added the same block of code underneath, changing parcel to media.

 

For example, in catalog/includes/modules/shipping/usps.php, on about line 47 it looks like this:

$this->types = array('Express' => 'EXPRESS',
                          'First Class' => 'First-Class Mail',
                          'Priority' => 'Priority',
                          'Parcel' => 'Parcel',
                          'Media' => 'Media');

 

Do this for all files included in the USPS Methods module.

 

Now, I don't remember what else I did to get the damn thing working, but I will try to compile it together later tonight if you still need help. You will have to edit files in the admin as well, in order to get it to show up as an option.

 

Good luck!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...