Usps Is Aboutto Make Changes Again

I received this email about upcoming change slated for May 31.

My brief looking at it has me worried about one item " Origin ZIP Code required for Priority Mail International to Canada" . I am using cs-caart 2.1.1 and have had changes made each time the post office makes changes, some easy some not. Does anyone know if this change will affect my cart?

Here is the email: ( the web tools home page link seems to have more info)

thanks, David DeWitt


Thank you for using USPS Web Tools.

May 31, 2015 USPS Web Tools will be implementing modifications and additional features to the U.S. Postal Service APIs. The following changes may especially impact shipping systems:[list]

[]Origin ZIP Code required for Priority Mail International to Canada

]Modified special services

[]Modified service IDs

]Modified available mail classes for Merchandise Return Services


Detailed release notes are available on the Web Tools home page at under the Web Tools Announcements section. Included in the release notes are the URLs of the staging environments, which are now available to developers for testing.

To receive future Web Tools updates, follow us on Twitter @USPSWebTools. If you have any questions, encounter any issues, or have any feedback, please let us know by simply replying to this email.

Thank you,

USPS Web Tools Program Office

Does anyone understand the changes that USPS is about to make? Maybe using my test site I can test what may happen. The give a test environment url. What file would I need to alter to point it to their test site?

Thanks for any info,

David DeWitt

After some digging around I came up with this.

has the following lines around line 41

if ($shipping_settings['usps']['test_mode'] == 'Y') {
$url = '';
} else {
$url = '';

I made the following changes

if ($shipping_settings['usps']['test_mode'] == 'Y') {
$url = ''; // changed to stg-production. from testing.
} else {
$url = '';

I changed the admin setting to test mode, then cleared cache. So everything seems to work, but that seemed to easy. So I decided to make the url point to a false address. Cleared the cache and everything still worked perfect. also cleared browser cache. So I concluded that this is not where to make the changes.

Then I thought maybe the test mode is not functional, so I altered the production url above, cleared caches, etc… everything still worked. Seems strange, if I leave everything alone, something goes wrong, but if I try to break it, nothing goes wrong.

Does anyone have a better idea?


David DeWitt

Well us domestic rates are coming in. so I see in the logs. and from a test user. From logs I see that I am sending to the correct url.

Now the strange thing is, if my test user is out of country ( lets say Ireland) the test user get rates back, but the log only shows the rate request, no rate response. I see from the usps.php file that I am not using IntlRateV2 API. As I started test with it I seem to receive errors. sample request and response:

Request: array ( 'API' => 'IntlRateV2', 'XML' => ' 0 5 package Ireland ', )
Response: -2147221202Common:XmlParseThe element 'Package' has invalid child element 'Country'. List of possible elements expected: 'GXG, ValueOfContents'.

Thanks for any help,

David DeWitt

After much tinkering, I have got it all working. us domestic, international 1st class and priority. both Canada and other countries.

I think most of my problem was in USPS parsing of the XML data.


I can confirm that for CS-Cart v3 and v4 the test URL needs to be updated in the usps.php script, but that's all. And the test URL does not seem to be used when testing shipping methods thru the CS-Cart interface. Not once did I find a HTTP request to the test URL when testing the different shipping methods to domestic or international destinations.

I wish CS-Cart would include a “test address” selection on the Shipping Method configuration screen where the method is tested. Changing the Settings>General>Default Location back and forth between foreign and domestic so you can test shipping methods is kind of silly.

I'm on 4.2.4 do I need to make any changes?