Jump to content

[Resolved] Fedex plugin causing a blank page


Leo Clark

Recommended Posts

Hi there,

I read a couple of posts about similar issues, but still, I can't get it to work.

From the error_log:

[06-Jan-2016 21:48:18] PHP Fatal error:  FedEx Error: No shipping quotes could be obtained for 33173-3512, US in /home1/bribeiro/public_html/lumi/store/modules/shipping/FedEx/shipping.class.php on line 217

Line 217:

trigger_error('FedEx Error: No shipping quotes could be obtained for '.$this->_basket['delivery_address']['postcode'].', '.$this->_basket['delivery_address']['country_iso'], E_USER_ERROR);

I am in touch with Fedex here in Brazil and my account is good to go.

I tried a couple of ZIP codes from Colorado and Florida but no change so far.

I am shipping from Brazil and I have enabled only International options from the Fedex settings page.

Thanks!

 

Link to comment
Share on other sites

According to the FedEx Developer's docs, I will say that the Postal Format for US, being NNNNN, suggests the +4 is not allowed - although not specifically mentioned as being not allowed.

If this is the problem, we can make a small edit to the FedEx module to test.

In shipping.class.php, near line 145:

if (in_array($this->_basket['delivery_address']['country_iso'], array('US','CA'))) {
	$delivery_state = $this->_basket['delivery_address']['state_abbrev'];
	if(strlen($delivery_state)>2) {
		$delivery_state = getStateFormat($delivery_state, 'name', 'abbrev');
	}
}

Add after:
if (in_array($this->_basket['delivery_address']['country_iso'], array('US'))) {
	$delivery_postcode = substr($this->_basket['delivery_address']['postcode'],0,5);
}

A few lines after, find:

'PostalCode' => $this->_basket['delivery_address']['postcode'],

Change to:

'PostalCode' => $delivery_postcode,

However, if this is not the problem we will need to add code that will log the actual response from FedEx.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...