Jump to content
Sign in to follow this  
heartbroke

Is USPS shipping module down

Recommended Posts

Unfortunately, this:

 

is simply the coded error message in the usps.php file of the USPS contribs module. The US Post Office has nothing to do with that message.

 

I was getting the usually funky-character issues... and now I'm getting the error message... I didn't change anything... so I would take that to mean that USPS is not sending the data or is working on the API. No?


I find the fun in everything.

Share this post


Link to post
Share on other sites

Crap...

 

Priority Mail<sup>&reg;</sup> International Small Flat Rate Box** $13.95

First-Class Mail<sup>&reg;</sup> International Large Envelope** $23.47

First-Class Mail<sup>&reg;</sup> International Package** $23.67

Express Mail<sup>&reg;</sup> International Flat Rate Envelope $29.95

Express Mail<sup>&reg;</sup> International Legal Flat Rate Envelope $29.95

Priority Mail<sup>&reg;</sup> International $36.25

Express Mail<sup>&reg;</sup> International $43.50

Priority Mail<sup>&reg;</sup> International Medium Flat Rate Box $45.50

Priority Mail<sup>&reg;</sup> International Large Flat Rate Box $

 

is back.


I find the fun in everything.

Share this post


Link to post
Share on other sites

ok so some links were provided for the solution, but when you go to them all you see is peices here and there. Is there an actual solution? If so can we post it here?

 

I'd like to second this request. Is there a real solution?


I find the fun in everything.

Share this post


Link to post
Share on other sites

I'd like to second this request. Is there a real solution?

No, but this is the closest so far, IMHO:

http://www.oscommerce.com/community/contributions,487/category,all/search,USPS+Methods

USPS Methods 5.0.1 with bug fix.

 

I've tried most of the methods in the contribs support thread with mixed success. Nothing fixes it all, yet - at least for me. I think someone is going to have to offer us a completely updated contrib before it fixes it for the rest of us.

Share this post


Link to post
Share on other sites

My quick fix for USPS domestic rates was to just strip out all the new characters on the $type variable before it builds the shipping quotes array. I have a heavily modified usps.php modules file so I cannot show you exactly where, but basically find where the quotes array is built from the USPS response and add this code:

 

Mine looks like this:

 

list($type, $cost) = each($uspsQuote[$i]);

 

so I added this after:

 

$type = str_replace('<sup>&amp;reg;</sup>', '', $type);

$type = str_replace('<sup>&amp;trade;</sup>', '', $type);

$type = str_replace('**', '', $type);

 

This removes the everything that was added by USPS that was causing errors on my site. It also fixes the international issue (response had added a ** to the end of the title).

 

Hope this helps!

 

This Worked For Mine!! :D

 

Thanks

Share this post


Link to post
Share on other sites

I seem to have gotten mine to work - I still have the ** at the end of international options, but I'll live with it for now. But this whole mess brought up an issue I've had for a while now - sometimes foreign customers will choose priority mail flat rate envelope when the product couldn't possibly fit. Is there a note I could add to checkout checkout_shipping.php or something that would only show up for foreign orders that would remind them to make sure what they're ordering will actually fit in a priority flat rate envelope? I can't figure out how to do this/where to add it. Thanks!

Share this post


Link to post
Share on other sites

Who has a real fix for the issue of International postal rates not being available and showing error on customers end??? My domestic works fine, but international doesn't. I'm using osCommerce Online Merchant v2.2 RC1??? Please help if anyone can as I have tried several things others posted here and there none of them have worked??? Thanks Dan

 

Also I'm not using Flat Rate, only 1st Class Mail International and Priority Mail International even though other selections are there not active.

Edited by AbyssRecords

Share this post


Link to post
Share on other sites

My quick fix for USPS domestic rates was to just strip out all the new characters on the $type variable before it builds the shipping quotes array. I have a heavily modified usps.php modules file so I cannot show you exactly where, but basically find where the quotes array is built from the USPS response and add this code:

 

Mine looks like this:

 

list($type, $cost) = each($uspsQuote[$i]);

 

so I added this after:

 

$type = str_replace('&lt;sup&gt;&amp;reg;&lt;/sup&gt;', '', $type);

$type = str_replace('&lt;sup&gt;&amp;trade;&lt;/sup&gt;', '', $type);

$type = str_replace('**', '', $type);

 

This removes the everything that was added by USPS that was causing errors on my site. It also fixes the international issue (response had added a ** to the end of the title).

 

Hope this helps!

 

This sort of works. It isn't super-clean... but it does appear to work "for now". Hopefully USPS will own-up to this issue and it will go back to the way it was (?).

 

Pete


I find the fun in everything.

Share this post


Link to post
Share on other sites

This sort of works. It isn't super-clean... but it does appear to work "for now". Hopefully USPS will own-up to this issue and it will go back to the way it was (?).

 

Pete

 

I will send this over to my webmaster and hope it works, I'm losing 2/3 of my business with this mess being down. 2nd time the postal service screwed things up by making changes. Thanks for the reply.... Cheers Dan

Share this post


Link to post
Share on other sites

My quick fix for USPS domestic rates was to just strip out all the new characters on the $type variable before it builds the shipping quotes array. I have a heavily modified usps.php modules file so I cannot show you exactly where, but basically find where the quotes array is built from the USPS response and add this code:

 

Mine looks like this:

 

list($type, $cost) = each($uspsQuote[$i]);

 

so I added this after:

 

$type = str_replace('&lt;sup&gt;&amp;reg;&lt;/sup&gt;', '', $type);

$type = str_replace('&lt;sup&gt;&amp;trade;&lt;/sup&gt;', '', $type);

$type = str_replace('**', '', $type);

 

This removes the everything that was added by USPS that was causing errors on my site. It also fixes the international issue (response had added a ** to the end of the title).

 

Hope this helps!

 

Thanks grapesmuggler ! mad props for you

Share this post


Link to post
Share on other sites

I updated my USPS to version 5.0.0 and now to 5.0.1. It looks like it worked for most of you but mine simply says:

 

Please select how you would like your order shipped.

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.

 

 

 

So, I'm trying to figure out how to trouble shoot this.

 

I have not updated anything other than the usps.php in /includes/languages/english/modules/shipping and /includes/modules/shipping

 

Any pointers would be greatly appreciated!

Share this post


Link to post
Share on other sites

Are you able to update the shipping methods from the admin panel? I've installed the module, but I can't update the shipping methods without causing problems.

 

I updated my USPS to version 5.0.0 and now to 5.0.1. It looks like it worked for most of you but mine simply says:

 

Please select how you would like your order shipped.

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.

 

 

 

So, I'm trying to figure out how to trouble shoot this.

 

I have not updated anything other than the usps.php in /includes/languages/english/modules/shipping and /includes/modules/shipping

 

Any pointers would be greatly appreciated!

Share this post


Link to post
Share on other sites

What if Domestic shipping is working fine and you have issue with just International postage not able to connect and retrive rates??? Can anyone help as I'm running Version osCommerce Online Merchant v2.2 RC1??? Been down since 1/2/2011 when they done rates change for International.

Share this post


Link to post
Share on other sites

What if Domestic shipping is working fine and you have issue with just International postage not able to connect and retrive rates??? Can anyone help as I'm running Version osCommerce Online Merchant v2.2 RC1??? Been down since 1/2/2011 when they done rates change for International.

Share this post


Link to post
Share on other sites

Yes I am. Since the titles have changed for some of the shipping class types you have to be sure that what you have populated in your Configuration table > configuration_title = Shipping Methods record matches what USPS sends in their response.

 

Using my code the stripped response for domestic services looks like this now:

 

Express Mail

Express Mail Sunday/Holiday Delivery

Express Mail Flat Rate Envelope

Express Mail Sunday/Holiday Delivery Flat Rate Envelope

Express Mail Legal Flat Rate Envelope

Express Mail Sunday/Holiday Delivery Legal Flat Rate Envelope

Priority Mail

Priority Mail Large Flat Rate Box

Priority Mail Medium Flat Rate Box

Priority Mail Small Flat Rate Box

Priority Mail Flat Rate Envelope

Priority Mail Legal Flat Rate Envelope

Priority Mail Padded Flat Rate Envelope

Priority Mail Gift Card Flat Rate Envelope

Priority Mail Small Flat Rate Envelope

Priority Mail Window Flat Rate Envelope

Parcel Post

Media Mail

Library Mail

 

And for International (Canada was my test country):

 

Global Express Guaranteed (GXG)

Global Express Guaranteed Non-Document Rectangular

USPS GXG Envelopes

Express Mail International

Express Mail International Flat Rate Envelope

Express Mail International Legal Flat Rate Envelope

Priority Mail International

Priority Mail International Flat Rate Envelope

Priority Mail International Legal Flat Rate Envelope

Priority Mail International Padded Flat Rate Envelope

Priority Mail International Gift Card Flat Rate Envelope

Priority Mail International Small Flat Rate Envelope

Priority Mail International Window Flat Rate Envelope

First-Class Mail International Package

First-Class Mail International Large Envelope

 

If these service names do not match what you have populated in the configuration_title = Shipping Methods record then these services will not display. Be sure you update both the configuration_value & set_function with the updated service names.

 

Hi, thanks for all the help provided by all users and contributors, I don't have configuration_title = Shipping Methods record on my configuration table, what values should I have on it?

 

Also I'm getting the Parse error: syntax error, unexpected T_GLOBAL, expecting ')' in /admin/modules.php(221) : eval()'d code on line 2 . I've updated the shipping module following the instructions and changed configuration -> set_funtion to TEXT from VARCHAR

 

On the site looks like I have running the international shipping but the domestic isn't, it has the options of what services offer on domestic but I can't select what international options I want to offer.

Share this post


Link to post
Share on other sites

Hi, thanks for all the help provided by all users and contributors, I don't have configuration_title = Shipping Methods record on my configuration table, what values should I have on it?

 

Also I'm getting the Parse error: syntax error, unexpected T_GLOBAL, expecting ')' in /admin/modules.php(221) : eval()'d code on line 2 . I've updated the shipping module following the instructions and changed configuration -> set_funtion to TEXT from VARCHAR

 

On the site looks like I have running the international shipping but the domestic isn't, it has the options of what services offer on domestic but I can't select what international options I want to offer.

 

 

So would this work for me you think???

Share this post


Link to post
Share on other sites

I will send this over to my webmaster and hope it works, I'm losing 2/3 of my business with this mess being down. 2nd time the postal service screwed things up by making changes. Thanks for the reply.... Cheers Dan

 

 

Domestic is working fine, still nothing to fix International issue when running Version osCommerce Online Merchant v2.2 RC1

Share this post


Link to post
Share on other sites

Hi, thanks for all the help provided by all users and contributors, I don't have configuration_title = Shipping Methods record on my configuration table, what values should I have on it?

 

Also I'm getting the Parse error: syntax error, unexpected T_GLOBAL, expecting ')' in /admin/modules.php(221) : eval()'d code on line 2 . I've updated the shipping module following the instructions and changed configuration -> set_funtion to TEXT from VARCHAR

 

On the site looks like I have running the international shipping but the domestic isn't, it has the options of what services offer on domestic but I can't select what international options I want to offer.

 

For those getting the Parse error and are unable to edit the international rates, I found this fix on another forum posting. And it worked for me.

 

Problem has been identified and resolved. The problem was with the SQL Update statment VARCHAR(555) is. If you are using SQL 4.x you will need to change this statement to read as the new idicated below;

 

Original Execute this SQL update:

 

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

 

New Execute SQL update statement:

 

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

 

After performing this, you will be successful in update the next SQL update which is as follows;

 

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 ;

 

This is assuming that you have installed the new 5.0.1 USPS module fix. I have both domestic and international rates working for me after executing the new statements above.

Share this post


Link to post
Share on other sites

Domestic is working fine, still nothing to fix International issue when running Version osCommerce Online Merchant v2.2 RC1

 

Same here.


I find the fun in everything.

Share this post


Link to post
Share on other sites

For those getting the Parse error and are unable to edit the international rates, I found this fix on another forum posting. And it worked for me.

 

Problem has been identified and resolved. The problem was with the SQL Update statment VARCHAR(555) is. If you are using SQL 4.x you will need to change this statement to read as the new idicated below;

 

Original Execute this SQL update:

 

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

 

New Execute SQL update statement:

 

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

 

After performing this, you will be successful in update the next SQL update which is as follows;

 

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 ;

 

This is assuming that you have installed the new 5.0.1 USPS module fix. I have both domestic and international rates working for me after executing the new statements above.

 

Would this fix my issue running Version osCommerce Online Merchant v2.2 RC1, my Domestic is working but International is not???

Share this post


Link to post
Share on other sites

Same here.

 

No luck on your end to resolve the issue either??? If I come across something I will let you know and please do the same if you find out anything??? Thanks .... Dan

Share this post


Link to post
Share on other sites

No luck on your end to resolve the issue either??? If I come across something I will let you know and please do the same if you find out anything??? Thanks .... Dan

 

If you made this change "ALTER TABLE `configuration` CHANGE `set_function` `set_function` TEXT" and you are using the latest contribution..

 

Then all you need to do is uninstall the USPS Shipping module and reinstall it.

Edited by HenryTimmes

Unlock The Inbox

www.unlocktheinbox.com

Share this post


Link to post
Share on other sites

Would this fix my issue running Version osCommerce Online Merchant v2.2 RC1, my Domestic is working but International is not???

 

If you are unable to select any international shipping options in the admin for the USPS 5.0.1 module and you are getting that parse error message then yes this will fix your issue.

 

You must have first run this:

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

 

Then you run this update below:

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 ;

 

These are only international rate selections as you can see. But as stated above this is for only if you are receiving the parse error and using the updated module. Be sure to back up your database before making these changes.

Share this post


Link to post
Share on other sites

If you are unable to select any international shipping options in the admin for the USPS 5.0.1 module and you are getting that parse error message then yes this will fix your issue.

 

You must have first run this:

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

 

Then you run this update below:

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 ;

 

These are only international rate selections as you can see. But as stated above this is for only if you are receiving the parse error and using the updated module. Be sure to back up your database before making these changes.

 

I will have my webmaster give this a shot and hope it works, this is killing my business as 2/3 of mine is International.

Share this post


Link to post
Share on other sites

The USPS 5.0.3 upgrade was going easy until I ran into this step:

 

6. SQL changes

 

I cannot locate the sql statement but this is what it needs to look like:

set_function text latin1_swedish_ci Yes NULL

 

Phpmyadmin

configuration table --> structure

edit set_function from 255 to 1020

 

 

What??? This is what what needs to look like? This screwed my usps module to the point where I'm downgrading to 5.0.0

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
Sign in to follow this  

×