Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

FexEx Zones and Canada address errors...


sf7804

Recommended Posts

I am having a problem whenever a customer in Canada tries to place an order, they get an error from the FexEx zones contrib...

 

For example:

1064 - You have an error in your SQL syntax near '2P2 >= pcode_from and M5V 2P2 <= pcode_to' at line 4



SELECT * FROM fedex_pcode_to_zone_xref WHERE M5V 2P2 >= pcode_from and M5V 2P2 <= pcode_to



[TEP STOP]

 

Is there a simple way to edit the FedEx zones to by-pass that shipping option when shipping to canada and just use the USPS rates (which is already set up)?

Link to comment
Share on other sites

Try this before //Tim's new code....

 

// If the country is not the United States then error out

 $ctry = $order->delivery['country_id'];

  if ( $ctry != '223' ){

   // something is wrong, this is not the US

 $this->quotes['error'] = MODULE_SHIPPING_FEDEXZIPZONES_INVALID_ZONE;

    	 return $this->quotes;

     }

Link to comment
Share on other sites

Need to add the title and icon for the FedEx line when an error occurs (like non US zipcodes :wink: ). Search in catalog/includes/modules/shipping/fedexzipzones.php for:

 

$this->quotes['error'] =

 

And add this after...

 

$this->quotes['module'] = MODULE_SHIPPING_FEDEXZIPZONES_TEXT_TITLE;

$this->quotes['icon'] = tep_image($this->icon, $this->title);

Link to comment
Share on other sites

Sorry but all that does is give the person a nice error message, but still does not allow to ship to Canada using Fedex zone.

 

I would really be interested in a solution that would allow me to use Fedex to ship to Canada, heck internation.

 

Not trying to be lippy just frustrated in trying to find a way for OSC to ship to Canada and the rest of the world from the US.

 

TY

Theo

Share your knowlege and you learn even more !

Link to comment
Share on other sites

1. The easiest approach is to take Sarah's suggestion above and use USPS Methods contribution for International orders. The error handling code above at least allows your Canadian customer to checkout.

 

2. Do the above but also install the Manual Order Entry contribution and change the shipping charges to Fedex Rates after checkout and refund the difference ... or perform the order entry for your client and bill them the cost plus Fedex.

 

3. Take the FedEx contribution and substitute the tables with the Canadian tables. The challenge is that Canadian zipcodes are not numeric like the US but alpha-numeric.

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.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...