Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] - USPS Methods


Recommended Posts

Hello,

 

USPS methods seems to work fine, but someone from the Russian Federation (Russia) can not process order. I get error occured, but other countries not a problem. Any ideas.

 

Thank Dom

Link to comment
Share on other sites

I don't know if this helps with the Parcel post quotes being higher but I found two errors in the latest uploads of this contribution. Line 95 reads

Thanks Christian, your change to line 95 posted above works like a charm!

 

Regards,

EricK

Link to comment
Share on other sites

Using USPS Methods, the contribution gave an error for "France, Metropolitan". It failed to give a quote and came up with error: -2147219080 - Missing value for Country.

 

I see several problems with this the last few years in searching, but no solutions... <_<

 

The Country Codes are there: FX and FXX. Are these valid for USPS?

 

Anyone at all have any ideas or a solution?

 

Thanks for your help.

 

RDB

 

Same problem here - did you ever find a solution? Thanks!

Link to comment
Share on other sites

Same problem here - did you ever find a solution? Thanks!

 

OK, in usps.php, there is a function called country_list which has an array of countries. France, Metropolitan (FX) is not in that list. I've found very little info about this, but on the official usps site, I think what I gathered was that FR is the only valid country code for France. As I have loaded World Zones, I have a long list of States/Provinces for "France, Metropolitan" (FX). For the time being, I have simply gone into the countries table and changed the country code for France, Metropolitan from "FX" to "FR". From what I read, it sounds like "FX" is just the Paris Metro area.

 

Not sure who included FX in the country list in oscommerce, but it's not valid to USPS.

 

As soon as I made the change, my customer, without changing his address, was able to pull rate quotes from USPS and FedEx.

 

Hopefully, they are correct.

 

Hope this helps someone. I was scratching my head for awhile.

 

J

Link to comment
Share on other sites

  • 2 weeks later...
I don't know if this helps with the Parcel post quotes being higher but I found two errors in the latest uploads of this contribution. Line 95 reads

if($shipping_pounds > 35 || $shipping_ounces < 6){

and it should read

if($shipping_pounds > 35 || ($shipping_pounds == 0 && $shipping_ounces < 6)){

Line 280 reads

default:		   $usps_server = 'testing.shippingapis.com';
					   $api_dll = 'ShippingAPITest.dll';

 

and it should read

default:		   $usps_server = 'stg-production.shippingapis.com';
					   $api_dll = 'shippingapi.dll';

Ignore me if I'm wrong, but I think that the top line should help as it is part of the "ismachinable" test

Thanks for the contribution and the updates to keep the USPS in line.

Christian

 

Thanks Christian, that fix worked on my website for more accurate parcel post quotes as well... the funny thing is that if you go to the usps website, their own code is messed up because it consistently quotes parcel post higher than priority mail as well. my guess is that they will eventually fix this and then the code will once again need to be modded.

 

Scott

Link to comment
Share on other sites

Just so it doesn't go unnoticed, the insurance rates for usps methods were not accurate - you should go correct them:

 

USPS Insurance Rates

 

Scott

Link to comment
Share on other sites

CoffMan!!!! Thanks for the fix. I use a free shipping module and rarely do people pay for shipping so I didn't find out there was a problem until today!

 

Worked like a charm.

 

I'm assuming that this also impacts the Global shipping options as well?

Link to comment
Share on other sites

Ran the latest USPS 2.9.4 and got:

 

An error occured with the USPS shipping calculations.

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

 

Here is the email troubleshoot response.

 

?xml version="1.0"?>

<Error><Number>-2147219085</Number><Source>Rate_Respond.;SOLServerRates.Rate_Respond</Source><Description>Invalid XML Element cannot be empty according to the DTD/Schema.

</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error>

 

Thanks

Link to comment
Share on other sites

Just put out an update 2.9.5, let me know how it works.

 

Scott

olsonsp4c

Link to comment
Share on other sites

Just put out an update 2.9.5, let me know how it works.

 

Scott

olsonsp4c

 

Scott,

 

Disabled module

Replaced catalog/includes/modules/shipping/usps.php

Replace catalog/includes/languages/english/modules/shipping/usps.php

catalog/admin/modules.php was already updated from 2.9.4

catalog/admin/includes/functions/general.php - (wrote over the USPS Methods 2.5 with 2.9)

Enabled module

 

 

Still no luck.

 

United States Postal Service 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.

 

Waiting for email xml error.

 

Thanks

Link to comment
Share on other sites

Scott,

 

Disabled module

Replaced catalog/includes/modules/shipping/usps.php

Replace catalog/includes/languages/english/modules/shipping/usps.php

catalog/admin/modules.php was already updated from 2.9.4

catalog/admin/includes/functions/general.php - (wrote over the USPS Methods 2.5 with 2.9)

Enabled module

Still no luck.

 

United States Postal Service 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.

 

Waiting for email xml error.

 

Thanks

 

I apologize for this question in advance - but, I need to rule it out. Did you follow the pre-instructions, getting your usps userID which is also used for the password - then email usps and request that it be shifted to production and receive an email confirmation from usps saying the server was in fact switched?

 

thanks!

 

Scott

Edited by olsonsp4c
Link to comment
Share on other sites

Excellent update and great instructions. Thanks for doing that.

 

Your certainly welcome!

 

Scott

Link to comment
Share on other sites

United States Postal Service 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.

 

Waiting for email xml error.

 

Thanks

 

I am also having a similar issue where I get the error message stated above (sans the Waiting for XML error part). I do have log-in credentials with the USPS, though I am in the process of verifying that information now. However, I have noticed on my admin panel for the module the following information is displayed on the configuration screen.

 

United States Postal Service

You will need to have registered an account with USPS.

USPS expects you to use pounds as weight measure for your products.

Click HERE for registration details and instructions for proper usage.

Enable USPS Shipping
False

Enter the USPS User ID
************

Enter the USPS Password
************

Which server to use
production

Handling Fee
0

Tax Class
Taxable Goods

Shipping Zone
--none--

Sort Order
2

USPS Options
Array

Domestic Shipping Methods
Array

Int'l Shipping Methods
Array

US/Canada to $50
1.65

US/Canada $50-100
2.05

US/Canada $100-200
2.45

US/Canada $200-300
4.60

US/Canada per $100
.90

International to $50
2.40

International $50-100
3.30

International per $100
.90

Insure Packages
True

Insure Tax
True

 

This is how the configuration panel is displayed prior to editing it. In particular, I am noticing that the USPS Options, Domestic Shipping Methods, and Int'l Shipping Methods configs are showing the word "Array" instead of the actual methods I have selected for those. When I go in to edit these, all of the checkboxes are blank. The module never seems to actually save the methods I want to use. I'm thinking this is probably the reason for the error I'm receiving, and was hoping someone might have an idea as to what's going on.

 

Thanks!

Brian (Schadeboy) Schade

CIO and Webmaster

Twilight Teez, LLC

 

"Camping is nature's way of promoting the hotel industry."

-Dave Barry

Link to comment
Share on other sites

This is how the configuration panel is displayed prior to editing it. In particular, I am noticing that the USPS Options, Domestic Shipping Methods, and Int'l Shipping Methods configs are showing the word "Array" instead of the actual methods I have selected for those. When I go in to edit these, all of the checkboxes are blank. The module never seems to actually save the methods I want to use. I'm thinking this is probably the reason for the error I'm receiving, and was hoping someone might have an idea as to what's going on.

 

Thanks!

 

Okay, I went back through the installation instructions and found that I had not done a couple of steps. Not sure how I missed them, but I did. Now the arrays are saving the information properly. I'm getting the error above still, but I think it's because I'm awaiting verification from the USPS to have my newly generated login credentials changed for use with the production servers. I hope this will take place soon.

 

Thanks!

Brian (Schadeboy) Schade

CIO and Webmaster

Twilight Teez, LLC

 

"Camping is nature's way of promoting the hotel industry."

-Dave Barry

Link to comment
Share on other sites

I apologize for this question in advance - but, I need to rule it out. Did you follow the pre-instructions, getting your usps userID which is also used for the password - then email usps and request that it be shifted to production and receive an email confirmation from usps saying the server was in fact switched?

 

thanks!

 

Scott

 

Sorry for delay Scott. I got sick!

 

I did get shifted to production and received email confirmation. Please note that I am also getting the word "Array" instead of the actual methods in the admin module in the following fields and none of these options are selected when I go to edit:

 

Display weight

Display transit time

 

Domestic Shipping Methods

Select the domestic services to be offered:

 

Schadeboy is having the same issue.

 

Int'l Shipping Methods

Select the international services to be offered:

 

Schadeboy looks like he had the same problem. Schadeboy, what steps did you miss. I will check my installation again. In the meantime, do you have any other ideas Scott?

 

Thanks!

Link to comment
Share on other sites

Sorry for delay Scott. I got sick!

 

I did get shifted to production and received email confirmation. Please note that I am also getting the word "Array" instead of the actual methods in the admin module in the following fields and none of these options are selected when I go to edit:

 

Display weight

Display transit time

 

Domestic Shipping Methods

Select the domestic services to be offered:

 

Schadeboy is having the same issue.

 

Int'l Shipping Methods

Select the international services to be offered:

 

Schadeboy looks like he had the same problem. Schadeboy, what steps did you miss. I will check my installation again. In the meantime, do you have any other ideas Scott?

 

Thanks!

 

could you try overwriting your files with the latest upload and let me know? (first disable/remove the module before overwriting)

thanks!

 

Scott

Edited by olsonsp4c
Link to comment
Share on other sites

could you try overwriting your files with the latest upload and let me know? (first disable/remove the module before overwriting)

thanks!

 

Scott

 

Scott,

 

Looks like is was somewhere in the catalog/admin/includes/functions/general.php file.

It wouldn't work with the updated general.php file so I went back to original saved general.php file and applied the changes along with the new 2.9.5 files.

 

Thanks again Scott,

 

Dave

Link to comment
Share on other sites

Scott,

 

Looks like is was somewhere in the catalog/admin/includes/functions/general.php file.

It wouldn't work with the updated general.php file so I went back to original saved general.php file and applied the changes along with the new 2.9.5 files.

 

Thanks again Scott,

 

Dave

 

Glad that is works now, thanks for letting me know.

 

Scott

Link to comment
Share on other sites

This contribution appears to be working fine in OSC and does work all the way through PayPal if my sale requires Sales Tax. When the sale doesn't have sales tax, the shipping gets dropped out of PayPal. The correct amount looks fine at check out and stays good up until the last step in PayPal and then the shipping amount doesn't get charged. Where do I look??

Link to comment
Share on other sites

This contribution appears to be working fine in OSC and does work all the way through PayPal if my sale requires Sales Tax. When the sale doesn't have sales tax, the shipping gets dropped out of PayPal. The correct amount looks fine at check out and stays good up until the last step in PayPal and then the shipping amount doesn't get charged. Where do I look??

 

 

does the correct amount show when a person gets to the Payal off-site payment screen?

 

Scott

Link to comment
Share on other sites

Perhaps I was not clear???

 

UPSP methods does not print labels, that is a different contribution.

 

Scott

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...