tcpope Posted October 10, 2003 Share Posted October 10, 2003 Hi all, Not sure if anyone else has discovered this, but I ran into a problem with quotes for International shipping from the US. I wasn't receiving a quote for "Airmail Letter". For others with the same problem here is how to fix. - backup files - edit the file 'catalog/includes/modules/shipping/usps.php' - search for 'Airmail Letter Post' - replace with 'Airmail Letter-post' Now it works. I contacted USPS and they responded with the following email: Dear USPS Customer, Thank you for contacting us. In order to resolve the issue where you are not receiving shipping rates for Airmail Letter Post, you will need to change your coding to parse through our XML for the following value: <SvcDescription>Airmail Letter-post</SvcDescription> During a recent update to the International Rate Engine, a hyphen was placed into the value for Airmail Letter Post, thus disabling any parsing for that particular string. By inserting a hyphen between "Letter" and "post", you will resolve any failures your shopping cart is encountering. Thank you, Justin USPS Internet Customer Care Center [email protected] 800-344-7779 7:00AM - 11:00PM EST Cheers, Tim Pope www.ShooShoosUSA.com Link to comment Share on other sites More sharing options...
kwyjibo Posted October 14, 2003 Share Posted October 14, 2003 Was having the same problem for quite some time. Thanks for posting the fix, now my airmail rates are showing up properly. Link to comment Share on other sites More sharing options...
dat2zip Posted October 17, 2003 Share Posted October 17, 2003 I'm having similar problems. I've fixed all but Global Priority variable. Here is the email I got from USPS for the changes needed. Dear USPS customer, The International Rates API engine was recently updated which in turn led to some unexpected changes to the XML values we respond with. Below are the affected SvcDescription Strings and what they are now being returned as: Global Priority Mail - Flat-rate Envelope (large) IS NOW Global Priority Mail - Flat-rate Envelope (Large) Global Priority Mail - Flat-rate Envelope (small) IS NOW Global Priority Mail - Flat-rate Envelope (Small) Global Priority Mail - Variable Weight (single) IS NOW Global Priority Mail - Variable Weight (Single) Airmail Letter Post IS NOW Airmail Letter-post Economy (Surface) Letter Post IS NOW Economy (Surface) Letter-post These changes will affect your shopping cart's ability to parse through the list of possible international services. Please verify/modify your parsing selections to reflect these changes in order to ensure accurate parsing and the display of all available options to your end customer. USPS Internet Customer Care Center [email protected] 800-344-7779 7:00AM - 11:00PM EST 0054 So, the one I can't figure out is Priority Mail - Variable Weight (Single). This change has not fixed this problem. I'm using USPS module version 2.4. I tried 2.5, but, that appears to not be compatible with my version of osCommerce site. Link to comment Share on other sites More sharing options...
twinmoons Posted October 30, 2003 Share Posted October 30, 2003 Thank you SOOOOO much for this post. I've been having this problem for quite some time. I had reported this nearly a year ago in the bugreports and it was closed as "fixed in cvs", which at that time it was. And then it cropped up again. I just changed the USPS file as stated here and it works perfectly now! Thanks again. Link to comment Share on other sites More sharing options...
zzfritz Posted November 2, 2003 Share Posted November 2, 2003 Responding to the reported change in the XML rate quote responses from USPS, the contribution USPS Methods has been revised: http://www.oscommerce.com/community/contributions,487/page,4 Link to comment Share on other sites More sharing options...
Guest Posted July 23, 2004 Share Posted July 23, 2004 Thank you to those updating this contribution, it's fantastic. Link to comment Share on other sites More sharing options...
olga Posted July 13, 2005 Share Posted July 13, 2005 I'm having similar problems. I've fixed all but Global Priority variable. Here is the email I got from USPS for the changes needed. So, the one I can't figure out is Priority Mail - Variable Weight (Single). This change has not fixed this problem. I'm using USPS module version 2.4. I tried 2.5, but, that appears to not be compatible with my version of osCommerce site. <{POST_SNAPBACK}> THANK YOU! A simple under minute edit and whala! Link to comment Share on other sites More sharing options...
phenam Posted September 22, 2005 Share Posted September 22, 2005 This fix worked great! Thank you! Here it is for those that would like to see it. Change this: $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: $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 (Single)', 'Airmail Letter' => 'Airmail Letter-post', 'Airmail Parcel' => 'Airmail Parcel-post', 'Surface Letter' => 'Economy (Surface) Letter-post', 'Surface Post' => 'Economy (Surface) Parcel-post'); I am still having trouble with my shipping rates rounding up. Does anyone have a fix for this? Say priority mail is $3.85 at check out it rounds it up to $4.00. Any help would be great! Link to comment Share on other sites More sharing options...
redneckmom Posted November 7, 2006 Share Posted November 7, 2006 The above code is no longer accurate, as we found out today with our first international customer trying to make a purchase! No matter what one picks, the first option (Global express guaranteed Doc service) is what would show up on the order confirmation page. I did more searching online and found a slightly different version (on the bug report for this), but that didn't fix all of the options. So I started changing one thing at a time until I found the combination that works as of today. So here it is for anybody else having this problem!!! As an FYI, the parsing is case sensitive -- so if one letter is lower case when it's looking for upper -- it'll fail and default to the first shipping option. Picky Picky!! I have retested selecting ALL available shipping options shown below, and ALL work as they should now. We are running on OSC 2.2 MS2 and using the USPS shipping module that came stock. Find this code (around line 52 for me) in file /catalog/includes/modules/shipping/usps.php BACKUP FIRST!! Replace with this code: $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 (Single)', 'Airmail Letter' => 'Airmail Letter Post', 'Airmail Parcel' => 'Airmail Parcel Post', 'Surface Letter' => 'Economy (Surface) Letter Post', 'Surface Post' => 'Economy (Surface) Parcel Post'); Specifically, the words Large, Small, Single and Post (all 4 occurrences), all had to have the first letters made capital from lower-case. The dash - between Letter and Post for the Airmail and Economy options has to be removed now too. Hopefully this works for everyone else. It got us up and running! WHEW!!! :thumbsup: Lets hope USPS stops mucking with this code!! Link to comment Share on other sites More sharing options...
redneckmom Posted November 7, 2006 Share Posted November 7, 2006 Sorry -- the code did not keep the spacing I put in -- never posted before, so I'm a newbie at this! The lines starting at GXG Non-Document thru Surface Post should be indented. But you'll see it when you come to this section in your code. Cheers!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.