Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need Help with both USPS and UPS Modules!


ipsofacto

Recommended Posts

Please help. I've installed the USPS and UPS modules for shipping and I am getting the following errors on the shipment methods page:

 

To start off, there is no radio button for me to choose whether to use UPS or USPS as my preferrded carrier.

 

For UPS, I am getting:

An error occured with the UPS shipping calculations.

and

Invalid ShipperPostalCode

 

For USPS, I've registered, switch the server from TEST to PRODUCTION, inserted my id and pw, but I am still getting this error:

 

An error occured with the USPS shipping calculations.

 

Any suggestions or advice? Any help will be greatly appreciated.

Link to comment
Share on other sites

I don't believe there is a "preferred carrier" option as part of the standard shipping modules.

 

The other problem sounds like you haven't set the "postal code" (aka Zip) in the admin->configuration->shipping/packaging section of the admin page.

 

HTH

Tom

Link to comment
Share on other sites

Hi Tom.

 

Thanks for your reply. I did everything by the book and after I set the postal code in the admin->configuration->shipping/packaging section of the admin page, UPS is working like a champion. But my USPS is still showing up the calculation error. I've read through the threads in this forum and applied all the suggestions. But seems like USPS is still not functioning properly. Any other suggestions?

 

But thanks for your help though.

 

-Reed

 

I don't believe there is a "preferred carrier" option as part of the standard shipping modules.

 

The other problem sounds like you haven't set the "postal code" (aka Zip) in the admin->configuration->shipping/packaging section of the admin page.

 

HTH

Tom

Link to comment
Share on other sites

I think your problem might be due to USPS having changed the definitions of their services. If you are using the stock USPS module that comes with osC, you can try installing the USPS Methods contribution in its place, or take a look at the stock catalog/includes/modules/shipping/usps.php file and try changing the method definitions from

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

     $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 Envelope (single)',
                               'Airmail Letter' => 'Airmail Letter Post',
                               'Airmail Parcel' => 'Airmail Parcel Post',
                               'Surface Letter' => 'Economy (Surface) Letter Post',
                               'Surface Post' => 'Economy (Surface) Parcel Post');

to

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

     $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 Envelope (Single)',
                               'Airmail Letter' => 'Airmail Letter-post',
                               'Airmail Parcel' => 'Airmail Parcel Post',
                               'Surface Letter' => 'Economy (Surface) Letter-post',
                               'Surface Post' => 'Economy (Surface) Parcel Post');

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

I've also seen in other posts that you might need to call the USPS 800 number they provide you in the sign-up tools package and have THEM change on their server from TEST to Production.

 

Also, make sure your product weight is not zero.

 

HTH

Tom

Edited by OceanRanch
Link to comment
Share on other sites

Howdy folks,

 

Thank you both for your valuable input. I am going to try your suggestions and see what happens.

 

I will let you know the results. Once again, thanks for your time and for sharing your knowledges.

 

mucho appreciation,

 

-Reed

Link to comment
Share on other sites

EEEEK! I tried making the changes to the code as you suggested, and I get the following error when I test it!

 

Parse error: parse error, unexpected T_STRING, expecting ')' in /mnt/web_a/d35/s26/b01b91b0/www/photos/nfoscomm/catalog/includes/modules/shipping/usps.php on line 366

 

I think your problem might be due to USPS having changed the definitions of their services. If you are using the stock USPS module that comes with osC, you can try installing the USPS Methods contribution in its place, or take a look at the stock catalog/includes/modules/shipping/usps.php file and try changing the method definitions from

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

? ? ?$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 Envelope (single)',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'Airmail Letter' => 'Airmail Letter Post',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'Airmail Parcel' => 'Airmail Parcel Post',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'Surface Letter' => 'Economy (Surface) Letter Post',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'Surface Post' => 'Economy (Surface) Parcel Post');

to

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

? ? ?$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 Envelope (Single)',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'Airmail Letter' => 'Airmail Letter-post',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'Airmail Parcel' => 'Airmail Parcel Post',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'Surface Letter' => 'Economy (Surface) Letter-post',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'Surface Post' => 'Economy (Surface) Parcel Post');

Link to comment
Share on other sites

Line 366 in the stock module is down in the "C" named countires

 

I would look first at

 

'CI' => 'Cote d\'Ivoire (Ivory Coast)',

 

and make sure the escape "\" has not somehow been removed from your code

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Thank you so much!!! I was having the same issue and USPS coudn't help, my tech support was worthless, and I was at the end of my patience! I had neglected to put in my zip. Once I did it works perfectly. I cannot thank you enough and not a moment too soon - with the holidays coming up. Thanks again, I really appreciate you all taking the time to share your knowledge and keep the rest of us from jumping off that sky scraper!

Edited by ShellysBaskets
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...