Jump to content
bad_lemming

[Contribution] - USPS Methods

Recommended Posts

I recently started getting an error when calculating international shipping:

 

This error:

An error occured with the USPS shipping calculations.

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

 

I updated to 5.2.1 fix string replace version and I still get the error. domesting shipping calculations work fine, it is just international.

 

I couldn't find a solution from people who had the same problem. my zip code is set correctly. I removed my USPS module in admin. After I updated the code, I re-installed USPS but didn't see any difference. All the options looked the same. Should there also be an international handling option? I don't see that in mine.

 

any ideas?

 

Thanks,

Andy

Share this post


Link to post
Share on other sites

I recently started getting an error when calculating international shipping:

 

This error:

An error occured with the USPS shipping calculations.

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

 

I updated to 5.2.1 fix string replace version and I still get the error. domesting shipping calculations work fine, it is just international.

 

I couldn't find a solution from people who had the same problem. my zip code is set correctly. I removed my USPS module in admin. After I updated the code, I re-installed USPS but didn't see any difference. All the options looked the same. Should there also be an international handling option? I don't see that in mine.

 

any ideas?

 

Thanks,

Andy

 

Found the problem... hehe. updated all the files but forgot to copy over the new usps.php files. Now it works perfectly.

Share this post


Link to post
Share on other sites

 

The following is what you should send:

 

Okay, well, this seems to have done it. the provider won't tell me what they did, just that it seems to be working. And it is. but the same problem pops back up if I add a handling fee. How weird is that?

 

Thanks Fulluv..

Edited by Bearclaw

Tedward

Share this post


Link to post
Share on other sites

Okay, well, this seems to have done it. the provider won't tell me what they did, just that it seems to be working. And it is. but the same problem pops back up if I add a handling fee. How weird is that?

 

Thanks Fulluv..

 

Hmmm, that is very weird. I don't have a clue how the handling fee would have any affect on server communication. So, does that mean that you cannot utilize the handling fee options?

Share this post


Link to post
Share on other sites

Fair Warning (since many of you claimed USPS gave no notice last time - they did):

 

Received today, 2/22/2011 -

Web Tools customers;

 

Please be aware that the USPS Web Tools domestic service standards APIs will be modified as described below:

 

1. Effective April 17, 2011, the Package Services Service Standards (i.e. StandardB) API response will be altered to accommodate additional messaging for items to or from ZIP Codes outside the contiguous United States and APO/FPO/DPO locations. A new <Message> data element, as shown in the example below, will be present in the StandardB response when the following 3-digit ZIP Codes are used: 995, 996, 997, 998, 999, 967, 968, 969, 006, 007, 008, 009 and APO/FPO/DPO ZIP Codes.

 

<StandardBResponse>

<OriginZip>902</OriginZip>

<DestinationZip>969</DestinationZip>

<Days>10</Days>

<Message>The timeliness of service to or from destinations outside the contiguous US may be affected by the limited availability of transportation.</Message>

</StandardBResponse>

 

2. Effective April 17, 2011, the Priority Mail Service Standards (i.e. PriorityMail) API response will be altered to accommodate additional messaging for items to or from APO/FPO/DPO ZIP Codes. A new <Message> data element, as shown in the example below, will be present in the PriorityMail response when APO/FPO/DPO 3-digit ZIP Codes are used.

 

<PriorityMailResponse>

<OriginZip>902</OriginZip>

<DestinationZip>090</DestinationZip>

<Days>Military Mail</Days>

<Message> The origin and/or destination ZIP Code supplied is an APO/FPO/DPO ZIP code. Service commitments to this location are not available at this time.</Message>

</PriorityMailResponse>

 

3. Effective April 17, 2011, the Express Mail Service Standards (i.e ExpressMail) API will be retired. This API returns only error information currently and will no longer return these errors.

 

For questions or concerns, please contact the USPS Internet Customer Care Center at 1-800-344-7779 or icustomercare@usps.com.

 

Thank you,

USPS Web Tools Program Office

 

I get APO customers every once in awhile, so I'm sure this will probably break things when it occurs. :(

Share this post


Link to post
Share on other sites

Fair Warning (since many of you claimed USPS gave no notice last time - they did):

 

Received today, 2/22/2011 -

 

 

I get APO customers every once in awhile, so I'm sure this will probably break things when it occurs. :(

 

Yep, it'll break things a little, but it won't be anything major. It's just a change in the display. It'll be fixed before April. I never get their notices, so thanks for the heads up.

Share this post


Link to post
Share on other sites

Yep, it'll break things a little, but it won't be anything major. It's just a change in the display. It'll be fixed before April. I never get their notices, so thanks for the heads up.

That's great news! Thanks for still keeping interest. I haven't had any issues since you all fixed it.

Share this post


Link to post
Share on other sites

First, let me say thanks! I was using an earlier version that was hacked up to make it mostly work. "5.2.1 - fix string replace" is a huge improvement. There were a few minor issues with my installation (OSC2.2). Perhaps my experience will help others:

 

1. Step 7: in the instructions, the path should be catalog/includes/modules/order_total/ot_shipping.php rather than 'order_totals'

 

2. Step 9: since my files were already hacked up, I started with the clean general.php files from the OSC download and skipped to step 10. The sections that needed to be found in step 9 weren't there in the version I had running. So, although I was modifying an old version, for this part I was really making a new install.

 

3. Step 10: if it's not a new install or an upgrade, what is it? The wording confused me a bit.

 

4. After everything was installed and configured, I got the "an error occurred with the USPS shipping calculations" message. I had the common problem of not having an appropriate shipping type for the weight involved. It's way easier to fix in the configuration panel than in the files!

 

So, thanks to Fulluvscents and the others that made this possible. Your efforts are sincerely appreciated!

 

-Jerry-

Share this post


Link to post
Share on other sites

I have a issue. Maybe someone can help or suggest a possible solution?

 

I noticed there are First-Class and 'Other' thresholds for weight - which work very well. Any chance to get this feature added for International packages too?

 

The main problem I have is I offer Priority Mail International Small Flat Rate Box, and for most small orders that's fine. However if I receive a larger order then the user will need to select Priority Mail International - which I also offer, however they do not know when to select it. For instance if there is a way to set anything over 1.5 pounds to automatically default to Priority Mail International and not show International Small Flat Rate Box that would be a great feature and a major time saver!

 

Any ideas? Thanks!

Share this post


Link to post
Share on other sites

I'm using "5.2.1 - fix string replace" with my installation (OSC2.2). It has been working fine.

 

I got an order at 03/05/2011 20:57:11 PST that worked perfectly. I happened to be testing things a couple of hours later using the same item in my order and I get "An error occured with the USPS shipping calculations." This is for a US address, international seems to be working fine.

 

Since I didn't do anything at my end, I suspect the USPS is having issues, or perhaps my webserver.

 

Any ideas??

Share this post


Link to post
Share on other sites

I'm using "5.2.1 - fix string replace" with my installation (OSC2.2). It has been working fine.

 

I got an order at 03/05/2011 20:57:11 PST that worked perfectly. I happened to be testing things a couple of hours later using the same item in my order and I get "An error occured with the USPS shipping calculations." This is for a US address, international seems to be working fine.

 

Since I didn't do anything at my end, I suspect the USPS is having issues, or perhaps my webserver.

 

Any ideas??

 

I just uninstalled the module, removed the remaining 8 'USPS' entries from the configuration table, reinstalled the module, and found the required 30 entries in the table. I still have the same problem - international works fine USA gives me "An error occured with the USPS shipping calculations." Any other ideas??

 

-Jerry-

Share this post


Link to post
Share on other sites

I just uninstalled the module, removed the remaining 8 'USPS' entries from the configuration table, reinstalled the module, and found the required 30 entries in the table. I still have the same problem - international works fine USA gives me "An error occured with the USPS shipping calculations." Any other ideas??

 

-Jerry-

 

No idea. The order that went through, was it domestic or international? Try going to your usps.php mod and setting it to send you the response emails (by uncommenting the email address local@localhost.com and changing it to your own). Go through a test checkout on the site and then put the comment back on the email in the file.

 

See what USPS sent you. You might find the error that way. Otherwise, it is hard to pinpoint that generic USPS error.

Share this post


Link to post
Share on other sites

Hi,

 

Is there any maximum that the USPS insurance can go up to for international packages? I've got an order from France totaling in $1,195.00 and United States Postal Service (Priority Mail® International ---Approx. delivery time 6 - 10 business days ---Insured for $11.01). Please note the difference in total amount and the insured amount. What exactly is wrong?

 

Thanks.

Share this post


Link to post
Share on other sites

@ Irin:

 

Yes, there is a limit for different countries, although I don't know who has what limits. USPS determines that limit which you can probably find on their site, but thinking about it, I don't have the module written to display what USPS insures. It is written to display the order total as insured - even if USPS insures less - which I realize now is a glitch. Double check the actual shipping cost and insurance cost against the shopping cart. As long as THAT is correct, it might be best to uncheck the "display insurance" option.

 

I am presently very busy with my businesses and haven't had much time to look at things, but I plan on getting some glitches fixed and a new upload in the next month. I'll look into the insurance calculation at that time.

 

@ others:

 

Regarding personal conversations: Please don't send me PMs asking technical questions about this mod - how to install, etc.. I spent three weeks writing a module which I graciously shared with the community for free. I am not also a free personal website advisor. If you have questions about this module, post them on the forum. When the answer comes about, the next person can avoid asking it again.

 

Regarding other questions, anything is possible with the USPS module, but there is no way to customize everybody's wants and wishes while making it a universally friendly contribution. In fact, my personal mod is different from the community mod because I customized it.

 

Yes, we can get thresholds for international. We can get regional rates. The USPS rate responses are phenominal and includes pretty much ANY possible rate you can think of. Personally, I charge handling based on a percentage of the order+shipping total rather than flat fees - and I pull registered mail rates for international. For the module, I pull the most common extra service rates - insurance, delivery confirmation, and signature confirmation with regular first class, priority, parcel, and express mail rates - international and domestic. If anything else were defaulted into this mod, then it would be too much. It is practically too much as it is.

 

If you need your mod customized, then it can be done. But, I won't be adding more features to this module as a default.

Share this post


Link to post
Share on other sites

Hello and thanks for the contribution!

 

I am trying to upgrade from USPS Methods 3.0 and everything looks good until I try to edit the contribution. That is when the following error occurs:

Fatal error: Call to undefined function tep_cfg_multiinput_list() in /home/content/i/e/m/iemusic/html/dev/ie1/admin/modules.php(219) : eval()'d code on line 1

I am not sure why modules.php in the admin folder would return this error? If anyone has an idea I would appreciate any feedback.

Thanks in advance.

Vid

Share this post


Link to post
Share on other sites

Hello and thanks for the contribution!

 

I am trying to upgrade from USPS Methods 3.0 and everything looks good until I try to edit the contribution. That is when the following error occurs:

Fatal error: Call to undefined function tep_cfg_multiinput_list() in /home/content/i/e/m/iemusic/html/dev/ie1/admin/modules.php(219) : eval()'d code on line 1

I am not sure why modules.php in the admin folder would return this error? If anyone has an idea I would appreciate any feedback.

Thanks in advance.

Vid

Share this post


Link to post
Share on other sites

My iPod just went moo (message notification). So, I scurried to my computer to check. I think the details are lost in cyberspace.

Share this post


Link to post
Share on other sites

Perhaps the code that was supposed to be added to admin/includes/functions/general.php was added to admin/modules.php instead.

 

tep_cfg_multiinput_list is defined in the general.php file and is called in the usps.php file. It shouldn't exist anywhere in the modules.php file.

 

Double check the code against the instructions.

Share this post


Link to post
Share on other sites

Ugh! Ok, don't beat me too badly. I checked the /admin/includes/functions/general.php file and part of the code that someone (me) copied and pasted was missing. After a recopy & repaste it the contribution is working! Yeah!!

 

We realized after reading through many pages of posts... we were missing code not provided in the 3.0 contribution, which is provided in the 5.2.1 upgrade. We then performed comparisons of the files and the code for New Installs/Old Versions (the install instructions) to see what we were missing. We completed the dev installation and testing phase, and are moving on to the next phase.. production install..

 

This was our second install attempt after restoring everything back to 3.0 One of our dev sites had too many USPS entries and went belly up from not uninstalling properly. Yes we backed up first.! :D I just want to let you know we probably spent about 6 hours (which is better than weeks) getting this to work. Not too shabby for rookies?

 

Thank you again for quick responses and getting us to USPS V4. *a round of appluse for fulluvscents*

 

Cheers!

 

Vid

Share this post


Link to post
Share on other sites

Can't select USPS shipping method options.

 

I have the latest version and no matter which USPS shipping method I choose (express, first class, parcel, etc) when I get to the checkout confirmation page it always has the top option selected. I have gone over the instructions and still the same issue. Any advice? Thanks in advance!

Share this post


Link to post
Share on other sites

I've tried to find the answer to this question in this forum but either I missed it, or it simply wasn't clear. I only ship USPS priority mail flat rate envelopes. So I have that method selected. I don't have an weights on my products because they fit in the flate rate envelope.

 

Upon checkout I get this error below

 

"2147219094 - Service must be Express, Express SH, Express Commercial, Express SH Commercial, First Class, Priority, Priority Commercial, Parcel, Library, BPM, Media, ALL or ONLINE; you passed NONE"

 

Is there coding I can remove to not get this method and only ship via the priority mail flat rate envelope I have selected my admin.

Share this post


Link to post
Share on other sites

You need to set a threshold for flat rate envelopes in your admin panel. As long as your cart weight is below that threshold, it should let the method through. No idea what you're selling, but what if someone orders 15 of your item? Will that fit in a flat rate envelope?

 

If you have no weight at all, then you may still get an error since the module is comparing NULL to an integer. If you have a weight of zero, it shouldn't be a problem. But, for ease and sanity, why not just set the weight to .01 lbs for your product(s). Set a weight. Set a threshold above that weight. It will pass the test and USPS will send the response.

 

No weight and no threshold (or a threshold of zero) will prevent the method from being sent and USPS will not be able to respond.

 

As far as overriding the threshold test, it can be done, but requires a change in coding, which is uneccessary.

Share this post


Link to post
Share on other sites

Can't select USPS shipping method options.

 

I have the latest version and no matter which USPS shipping method I choose (express, first class, parcel, etc) when I get to the checkout confirmation page it always has the top option selected. I have gone over the instructions and still the same issue. Any advice? Thanks in advance!

 

That problem arose right after the API changes, but was fixed soon thereafter. If you have the module from Jan 28 or later - which are the only acceptable modules now, then you shouldn't have that problem.

 

Did you clear your database of the old configuration entries? If not, then go back into the instructions and I think it tells you how to clear the entries before reinstalling the new module. That could be your problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×