heartbroke Posted January 2, 2011 Share Posted January 2, 2011 Right now my customers get this error msg when they checkout: "An error occured with the USPS shipping calculations. If you prefer to use USPS as your shipping method, please contact the store owner." It was working yesterday. TomB01 1 Quote Link to comment Share on other sites More sharing options...
Jayman11 Posted January 2, 2011 Share Posted January 2, 2011 yeah, the new USPS rates went into affect last night, so there was apparently some other changes too. Hoping it's like last year where it's just a simple set of service name changes but I couldn't figure it out this morning. My domestic shipping is working fine, but my international is broken. Hopefully some of the code guru's on here are looking into it already. Quote Link to comment Share on other sites More sharing options...
Jayman11 Posted January 2, 2011 Share Posted January 2, 2011 keep an eye on this thread: http://www.oscommerce.com/forums/topic/146950-contribution-usps-methods/page__st__720__p__1554777__hl__usps__fromsearch__1#entry1554777 Quote Link to comment Share on other sites More sharing options...
heartbroke Posted January 2, 2011 Author Share Posted January 2, 2011 (edited) Hopefully somebody comes out a solution for international shipping. Edited January 2, 2011 by heartbroke Quote Link to comment Share on other sites More sharing options...
phantompoet Posted January 2, 2011 Share Posted January 2, 2011 my site is also showing weird ampersand characters after the domestic service names (but at least its grabbing the prices) Priority Mail<sup>®</sup> $13.63 Express Mail<sup>®</sup> $40.33 so basically we have no choice but to wait for USPS to fix the international API it on their end? Quote Link to comment Share on other sites More sharing options...
phantompoet Posted January 2, 2011 Share Posted January 2, 2011 I just contacted the USPS webtools help line. they say it's a coding issue,, but it isnt on their end (because amazon uses the same server). your admin need to email them at icustomercare@usps.com let them know the XML string you are using, what server it is contacting, and what response you are getting back from them. instructional help code cannot really be given over the phone. ( i dont do my website's admin or programming so i cannot help at this point) if any one you get the answer before her, please post asap! Quote Link to comment Share on other sites More sharing options...
♥altoid Posted January 2, 2011 Share Posted January 2, 2011 my site is also showing weird ampersand characters after the domestic service names (but at least its grabbing the prices) Priority Mail<sup>®</sup> $13.63 Express Mail<sup>®</sup> $40.33 so basically we have no choice but to wait for USPS to fix the international API it on their end? I get the same message on a couple of my stores. The stuff in the middle <sup>®</sup> appears to have something to to with the html code for the "®" character? So instead of picking up the character it's picking up the html code instead. Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
ztwistbooks Posted January 2, 2011 Share Posted January 2, 2011 I get the same message on a couple of my stores. The stuff in the middle <sup>®</sup> appears to have something to to with the html code for the "®" character? So instead of picking up the character it's picking up the html code instead. Yes. The USPS is feeding something like this out their API: Media Mail<sup>&reg;</sup> When, really, they want: Media Mail<sup>®</sup> To make "Media Mail®" It looks like they fed it through their de-HTML-ifier two times too many. Ech. Anyway, I just got off the phone with the US Postal service. They say they are aware of the issue and will fix it by the close of business today (Sunday, January 2). They also said that they were aware of the International rates issue, and would fix that, too. It sounded like it was related. I was less convinced. If you're desperate enough to take international orders today, I'd recommend implementing some sort of flat rate shipping module until the USPS straightens this out. That's not dependent on the USPS API. Quote Link to comment Share on other sites More sharing options...
♥altoid Posted January 2, 2011 Share Posted January 2, 2011 Yes. The USPS is feeding something like this out their API: Media Mail<sup>&reg;</sup> When, really, they want: Media Mail<sup>®</sup> To make "Media Mail®" It looks like they fed it through their de-HTML-ifier two times too many. Ech. Anyway, I just got off the phone with the US Postal service. They say they are aware of the issue and will fix it by the close of business today (Sunday, January 2). They also said that they were aware of the International rates issue, and would fix that, too. It sounded like it was related. I was less convinced. Thanks for taking the initiative to make the phone call on that Dan. All I have to do now is put my trust in the government to fix something. :) Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
Dennisra Posted January 3, 2011 Share Posted January 3, 2011 Having the same problem here! Quote Link to comment Share on other sites More sharing options...
Clownshoes Posted January 3, 2011 Share Posted January 3, 2011 I'm also having the problem with missing International rates. If someone finds an update to the shipping module that fixes the problem please post info/link here. Thanks! Quote Link to comment Share on other sites More sharing options...
Dennisra Posted January 3, 2011 Share Posted January 3, 2011 They say they are aware of the issue and will fix it by the close of business today (Sunday, January 2). They also said that they were aware of the International rates issue, and would fix that, too. It sounded like it was related. I was less convinced. Not fixed yet and I believe the "business day" has ended. Specially in EST. Quote Link to comment Share on other sites More sharing options...
TomB01 Posted January 3, 2011 Share Posted January 3, 2011 I doubt seriously that the USPS really believes they are at fault and are going to "fix" anything. I bet we're on our own. I got the e-mail from USPS on 12/16 and had hoped that someone had a fix prepared by now. It seemed obvious that the level of changes were extensive and appeared to be completely documented in the e-mail, including addresses to test environment APIs. I'm no php-coder, but this shouldn't have been a surprise to those in the know in the OSCommerce community. Anyway, domestic shipping is working fine for me (using USPS module 2.9.6), but International is completely broken. The following message appears for any international address - An error occured with the USPS shipping calculations.If you prefer to use USPS as your shipping method, please contact the store owner. Of course - I already have international customers reporting trouble at my store. :( Please help! Quote Link to comment Share on other sites More sharing options...
Dennisra Posted January 3, 2011 Share Posted January 3, 2011 It appears that contributors at ZenCart have fixed the problem, at least for them I mean: http://www.zen-cart.com/forum/showthread.php?t=171314&highlight=USPS Quote Link to comment Share on other sites More sharing options...
grapesmuggler Posted January 3, 2011 Share Posted January 3, 2011 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>&reg;</sup>', '', $type); $type = str_replace('<sup>&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! Quote Link to comment Share on other sites More sharing options...
Dennisra Posted January 3, 2011 Share Posted January 3, 2011 This did nothing for me. Are you using USPS Methods contribution? 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>&reg;</sup>', '', $type); $type = str_replace('<sup>&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! Quote Link to comment Share on other sites More sharing options...
chocolategelt Posted January 3, 2011 Share Posted January 3, 2011 (edited) 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>&reg;</sup>', '', $type); $type = str_replace('<sup>&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! Thanks very much! It worked for me. Edited January 3, 2011 by chocolategelt Quote Link to comment Share on other sites More sharing options...
grapesmuggler Posted January 3, 2011 Share Posted January 3, 2011 (edited) This did nothing for me. Are you using USPS Methods contribution? 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. Edited January 3, 2011 by grapesmuggler Quote Link to comment Share on other sites More sharing options...
Guest Posted January 3, 2011 Share Posted January 3, 2011 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. Are you able to receive International and Domestic Rates? I am only receiving Domestic rates still. I looked through the Database to see what we had for International Services and this is what we had: Priority Mail International First-Class Mail International Package We don't offer any other International services, however these aren't displaying to the customer. Quote Link to comment Share on other sites More sharing options...
grapesmuggler Posted January 3, 2011 Share Posted January 3, 2011 Are you able to receive International and Domestic Rates? I am only receiving Domestic rates still. I looked through the Database to see what we had for International Services and this is what we had: Priority Mail International First-Class Mail International Package We don't offer any other International services, however these aren't displaying to the customer. Yes I am able to get both domestic and international rates returned. To test what you are getting from the response from usps just add some code like this in the modules > shipping > usps.php after where you strip the $type: echo "USPS $type @ $cost<br>";. This will allow you to see what the exact response is and you can compare it to what you have populated. Hope that is helpful! Quote Link to comment Share on other sites More sharing options...
Jayman11 Posted January 3, 2011 Share Posted January 3, 2011 Hey Heather...which USPS methods version are you running? Could you supply your full code for both the languages (if it's changed) and the main usps.php file? 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. Quote Link to comment Share on other sites More sharing options...
kb6mcc Posted January 3, 2011 Share Posted January 3, 2011 Yes I am able to get both domestic and international rates returned. To test what you are getting from the response from usps just add some code like this in the modules > shipping > usps.php after where you strip the $type: echo "USPS $type @ $cost<br>";. This will allow you to see what the exact response is and you can compare it to what you have populated. Hope that is helpful! Hi, Can you please post your completed USPS.PHP? I see all the International quote but it will default back to Global Express Guaranteed (GXG) when I check out the items??? Please help. Quote Link to comment Share on other sites More sharing options...
getflocked Posted January 3, 2011 Share Posted January 3, 2011 Hi! Can you supply the full code from the file? Much appreciated :-) Quote Link to comment Share on other sites More sharing options...
kalkal Posted January 3, 2011 Share Posted January 3, 2011 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>&reg;</sup>', '', $type); $type = str_replace('<sup>&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 me!!!!! Both domestic and international rates are working! THANX!!!!!!! Kurt Quote Link to comment Share on other sites More sharing options...
Guest Posted January 4, 2011 Share Posted January 4, 2011 How to fix this problem? 1. ADD THIS FUNCTION TO admin/includes/functions/general.php // USPS Methods 3.0 // Alias function for Store configuration values in the Administration Tool function tep_cfg_select_multioption($select_array, $key_value, $key = '') { for ($i=0; $i<sizeof($select_array); $i++) { $name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value'); $string .= '<br><input type="checkbox" name="' . $name . '" value="' . $select_array[$i] . '"'; $key_values = explode( ", ", $key_value); if ( in_array($select_array[$i], $key_values) ) $string .= ' CHECKED'; $string .= '> ' . $select_array[$i]; } $string .= '<input type="hidden" name="' . $name . '" value="--none--">'; return $string; } 2. Install the last version of this contribution http://www.oscommerce.com/community/contributions,487 Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.