Post by wizwig » Sat Jun 06, 2015 1:00 pm

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

Newbie

Posts

Joined
Tue Sep 16, 2014 11:04 am

Post by bigcheese » Sun Jun 07, 2015 5:27 am

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

Newbie

Posts

Joined
Sun Jun 07, 2015 5:23 am

Post by bigcheese » Sun Jun 07, 2015 5:32 am

The temporary work around of disabling Priority International will allow you to get quotes for Canada again.

Now, on to a proper fix.

Newbie

Posts

Joined
Sun Jun 07, 2015 5:23 am

Post by bigcheese » Sun Jun 07, 2015 7:19 am

I have fixed the issue, still working on a vqmod.

In the file:

Code: Select all

catalog/model/shipping/usps.php
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.

Newbie

Posts

Joined
Sun Jun 07, 2015 5:23 am

Post by bigcheese » Sun Jun 07, 2015 7:46 am

Attached is the vqmod I am using with 1.5.6.

Attachments

VQ Mod for USPS Canada API update


Newbie

Posts

Joined
Sun Jun 07, 2015 5:23 am

Post by virtualgeorge » Tue Jun 09, 2015 12:52 pm

Just noticed I have the same issue and only for Canada.

Active Member

Posts

Joined
Wed Jun 18, 2008 5:57 am

Post by somjuan » Tue Jun 09, 2015 10:51 pm

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.

Newbie

Posts

Joined
Fri May 23, 2014 12:19 am

Post by virtualgeorge » Tue Jun 09, 2015 11:16 pm

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.

Active Member

Posts

Joined
Wed Jun 18, 2008 5:57 am

Post by DaBrainz » Tue Jun 09, 2015 11:28 pm

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.

Newbie

Posts

Joined
Tue Nov 04, 2014 1:41 pm

Post by DaBrainz » Tue Jun 09, 2015 11:35 pm

Never mind do the update. The rate are off even though it does not give an error.

Newbie

Posts

Joined
Tue Nov 04, 2014 1:41 pm

Post by wizwig » Wed Jun 10, 2015 4:51 pm

You are correct, this solved the issue for me:

http://forum.opencart.com/viewtopic.php ... 40#p564292

Newbie

Posts

Joined
Tue Sep 16, 2014 11:04 am
Who is online

Users browsing this forum: No registered users and 142 guests