Post by futureshock » Mon Aug 13, 2012 11:47 am

When doing international orders most province regions are 3 letter abbreviations, however, fedex is barfing on that saying they have to be 2 letters.

I read on one form for a different cart that when doing international orders the state/region should not be sent over.

Can anyone shed some light on this.

I tried to register an account with fedex to look at their developer resources but their registration server was down.

Has anyone else had this issue and found a fix.
Are there any other places I can find a text for the WSDL package.

Thanks
Scotty

Newbie

Posts

Joined
Wed Apr 18, 2012 10:41 am

Post by futureshock » Thu Aug 16, 2012 9:52 am

OK for those who may have this issue down the road, I found a solutions.

A single line of code needs to be corrected.

catalog/model/shipping/fedex_wsdl.php

Original Code:

Code: Select all

// Destination Data
	$fedex_wsdl->DestStreetLines1 = $address['address_1'];
	$fedex_wsdl->DestStreetLines2 = $address['address_2'];
	$fedex_wsdl->DestCity = $address['city'];
	if ($address['iso_code_2'] == 'US' || $address['iso_code_2'] == 'CA') {
	      $fedex_wsdl->DestStateOrProvinceCode = $address['zone_code'];
	} else {
	      $fedex_wsdl->DestStateOrProvinceCode = $address['zone_code'];
	}
Simply change the second

Code: Select all

$fedex_wsdl->DestStateOrProvinceCode = $address['zone_code'];
to

Code: Select all

$fedex_wsdl->DestStateOrProvinceCode = '';
So you get

Code: Select all

// Destination Data
	$fedex_wsdl->DestStreetLines1 = $address['address_1'];
	$fedex_wsdl->DestStreetLines2 = $address['address_2'];
	$fedex_wsdl->DestCity = $address['city'];
	if ($address['iso_code_2'] == 'US' || $address['iso_code_2'] == 'CA') {
	      $fedex_wsdl->DestStateOrProvinceCode = $address['zone_code'];
	} else {
	      $fedex_wsdl->DestStateOrProvinceCode = '';
	}
This way you still get state/zone info logged but fedex will not barf on it.

Newbie

Posts

Joined
Wed Apr 18, 2012 10:41 am

Post by asiegbucp » Sat Feb 23, 2013 1:44 am

Hello, I am using Opencart version 1.5.5.1 and it seems that it is different from the version you described here. Please do you know how I can correct the FedEX shipping module error in version 1.5.5.1? I will appreciate your help.

Newbie

Posts

Joined
Sat Feb 23, 2013 1:34 am
Who is online

Users browsing this forum: No registered users and 3 guests