Usps Not Working For 4.3.1

First let me say we tried this fix [url=“Usps Is Aboutto Make Changes Again - Questions - CS-Cart Forums”]http://bit.ly/1QJlRmU[/url] and it didn’t work for v. 4.3.1 . Does anyone have a fix to this issue with USPS for 4.3.1? Yes we’ve also posted a support ticket but we’re not hopeful. Any help is appreciated!

Our USPS works just fine in 4.3.1. We have not modified anything from the the default package.

Maybe messed something up when trying to fix it… Just overwrite the files with the originals.

There was a May 19, 2015 change by USPS that only impacted Canadian orders.



Now is required to acquire shipping rates to Canada.



I would like to know if this change is in cs-cart 4.3.2? I just made the change to one of my old Quikstore sites and all is working on it again.



You can read more at https://www.usps.com…pis/welcome.htm

Download May 2015 Release Notes

USPS works fine for our site v 4.3.1



see below results





USPS First Class Mail < 2 oz. - $0.49

[color=#000000][font=Arial, Helvetica, sans-serif][size=3]USPS Priority Mail (4-5 Days) - $[/size][/font][/color][color=#000000][font=Arial, Helvetica, sans-serif][size=3]9.15[/size][/font][/color]

Total weight 0.01 lbs

[quote name='Triplets' timestamp='1433983780' post='218324']

There was a May 19, 2015 change by USPS that only impacted Canadian orders.



Now is required to acquire shipping rates to Canada.



I would like to know if this change is in cs-cart 4.3.2? I just made the change to one of my old Quikstore sites and all is working on it again.



You can read more at https://www.usps.com…pis/welcome.htm

Download May 2015 Release Notes

[/quote]



Triplets, can you let me know what changes did you do?

Sorry for my previous stupid question. I'm working on 3 hours sleep. In regards to adding the code , we just tried this and it didn't work and we received an error.

We finally got it fixed and working. See the attached screen shot of the code fix if you're experiencing the same issue.[attachment=9681:usps-code-fix.jpg]

usps-code-fix.jpg

I don't think you need to check for Canada. Origin zip is optional for all other countries. No harm if it is there or not.

Is there a definitive answer on this? We're getting calls about Canadian orders not working quite so right across multiple versions.



Flat rate seems to work, International Priority as Package or Parcel, not so much.

This is primarily for USPS Priority International and not the flat rate options.

Thank you for the code example, mayanetwork. This appears to have fixed my problem with priority mail quotes to Canada on my old 2.2.5 version. I replaced the “origination-postal” variable with my postal code, for lack of knowing how to make use of that variable. I had to wonder if I really needed any of those lines other than the #798 , but I stopped experimenting when it started working.

USPS Priority Mail International did not work.



The fix will be included to 4.3.4

In order to fix this at your current version just replace the app/Tygh/Shippings/Services/Usps.php with this one: https://dl.dropboxus…492865/Usps.php

We applied the fix from the developer notes for Origin Zip … still no luck in 3.0 - is there a different fix for this?

[quote name='FDGWEB' timestamp='1437434371' post='223677']

We applied the fix from the developer notes for Origin Zip … still no luck in 3.0 - is there a different fix for this?

[/quote]



There is no other fix. Can you contact tech support, if the problem still exists they should investigate it on your server.

Fixing v3 is very similar to the fix for v4.

File: /shippings/usps.php

Find:

$query=<<
2

$pounds
$ounces
$mailtype
0
$destination_country
$container
$intl_package_size
$intl_package_width
$intl_package_length
$intl_package_height
$intl_package_girth
N


EOT;




Replace with this:

if ($destination_country == 'Canada') {
$origin_zip = "$origination_postal";
} else {
$origin_zip = '';
}
$query=<<
2

$pounds
$ounces
$mailtype
0
$destination_country
$container
$intl_package_size
$intl_package_width
$intl_package_length
$intl_package_height
$intl_package_girth
$origin_zip
N


EOT;




Note that the requirement, in the fix above for v4, that the variable $origination_country == 'United States' is removed. It didn't work for v3 and even if it did, it's redundant.