Page 1 of 1
USPS CANADA ORIGIN ZIP ERROR
Posted: Sat Jun 06, 2015 1:00 pm
by wizwig
I am getting this error in the log file.
ServiceErrors><ServiceError><Id>50050</Id><Description>The Origin ZIP Code and the Destination Postal Code is required for Priority Mail International when mailing to Canada.</Description></ServiceError>
It seems that USPS has changed their API for CANADA only and now it shows $0.00 fo the shipping cost.
ALL other countries are OK.
I am using OC Version 1.5.6.1
Re: USPS CANADA ORIGIN ZIP ERROR
Posted: Sun Jun 07, 2015 5:27 am
by bigcheese
Seeing the same thing on 1.5.6. I found clues here, but still trying to figure out how to fix OC:
http://magento.stackexchange.com/questi ... nal-broken
NOTE: It appears that Canadian customers can check out without choosing a shipping method, or paying for shipping at all. This is how it shows up on the invoice: (Estimated Time: ): $0.00
Re: USPS CANADA ORIGIN ZIP ERROR
Posted: Sun Jun 07, 2015 5:32 am
by bigcheese
The temporary work around of disabling Priority International will allow you to get quotes for Canada again.
Now, on to a proper fix.
Re: USPS CANADA ORIGIN ZIP ERROR
Posted: Sun Jun 07, 2015 7:19 am
by bigcheese
I have fixed the issue, still working on a vqmod.
In the file:
Around line 284 you'll find:
Code: Select all
$xml = '<IntlRateV2Request USERID="' . $this->config->get('usps_user_id') . '">';
Insert the following after line 284:
Code: Select all
$xml .= ' <Revision>2</Revision>';
Around line 306 you'll find:
Code: Select all
$xml .= ' <Girth>' . $this->config->get('usps_girth') . '</Girth>';
Insert the following after line 306:
Code: Select all
if ($address['iso_code_2'] == 'CA') {
$xml .= ' <OriginZip>' . substr($this->config->get('usps_postcode'), 0, 5) . '</OriginZip>';
}
That seems to work.
I did a quick check and it looks like this will affect everything up until the latest 2.0.x release. I will work on a vqmod and submitting this to the main codebase.
Re: USPS CANADA ORIGIN ZIP ERROR
Posted: Sun Jun 07, 2015 7:46 am
by bigcheese
Attached is the vqmod I am using with 1.5.6.
Re: USPS CANADA ORIGIN ZIP ERROR
Posted: Tue Jun 09, 2015 12:52 pm
by virtualgeorge
Just noticed I have the same issue and only for Canada.
Re: USPS CANADA ORIGIN ZIP ERROR
Posted: Tue Jun 09, 2015 10:51 pm
by somjuan
Also on 1.5.6.1, experiencing similar problems.
Code: Select all
<ServiceErrors><ServiceError><Id>50050</Id><Description>The Origin ZIP Code and the Destination Postal Code is required for Priority Mail International when mailing to Canada.</Description></ServiceError></ServiceErrors>
Identical symptoms to OP. I haven't found any updated code anywhere yet.
Re: USPS CANADA ORIGIN ZIP ERROR
Posted: Tue Jun 09, 2015 11:16 pm
by virtualgeorge
I guess we didn't search hard enough

There is a fix here:
http://forum.opencart.com/viewtopic.php ... &start=140
I updated the usps.php file with the instructions from henkster on that page it worked.
Re: USPS CANADA ORIGIN ZIP ERROR
Posted: Tue Jun 09, 2015 11:28 pm
by DaBrainz
Mine works by just doing the opposite of this:
http://forum.opencart.com/viewtopic.php ... hp#p564426
I just changed it to variable and the Canada quotes work again. Is this OK or should I do the update as suggested above.
Re: USPS CANADA ORIGIN ZIP ERROR
Posted: Tue Jun 09, 2015 11:35 pm
by DaBrainz
Never mind do the update. The rate are off even though it does not give an error.
Re: USPS CANADA ORIGIN ZIP ERROR
Posted: Wed Jun 10, 2015 4:51 pm
by wizwig