Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

FedEx - Web Services v9


greasemonkey

Recommended Posts

Also something that came up today.

In the original FedEx real time quotes there was a solution provided to stop the shippng address from including a PO Box. As FedEx does not deliver to PO boxes.

the code was inserted just below the Country

Just below line 32

$this->country = STORE_ORIGIN_COUNTRY;

}

 

became:

$this->country = STORE_ORIGIN_COUNTRY;

}

if (eregi("^P(.+)O(.+)BOX",$order->delivery['street_address']) ||eregi("^PO BOX",$order->delivery['street_address']) || eregi("^P(.+)O(.+)BOX",$order->delivery['suburb']) || eregi("^[A-Z]PO",$order->delivery['street_address']) || eregi("^[A-Z]PO",$order->delivery['suburb'])) {

$this->quotes = array('module' => $this->title,

'error' => '<font size=+2 color=red><b>Federal Express cannot ship to Post Office Boxes.<b></font>'); }

 

I have tried just adding this code, but it does not show the error text, in fact it has no effect at all.

Any thoughts?

If you choose not to decide you still have made a choice, I will choose a purpose clear, I will choose Free Will. --Neal Peart - Rush

Link to comment
Share on other sites

Another strange thing. After line 110:

// customer details

$street_address = $order->delivery['street_address'];

$street_address2 = $order->delivery['suburb'];

$city = $order->delivery['city'];

This code is wrong. We added the second address line to OSCommerce a long time ago so it should be something like:

// customer details

$street_address = $order->delivery['street_address'];

$street_address2 = $order->delivery['street_address_2'];

$suburb = $order->delivery['suburb'];

$city = $order->delivery['city'];

 

 

and then after line 380

return array('MODULE_SHIPPING_FEDEX_WEB_SERVICES_STATUS',

'MODULE_SHIPPING_FEDEX_WEB_SERVICES_KEY',

'MODULE_SHIPPING_FEDEX_WEB_SERVICES_PWD',

'MODULE_SHIPPING_FEDEX_WEB_SERVICES_ACT_NUM',

'MODULE_SHIPPING_FEDEX_WEB_SERVICES_METER_NUM',

'MODULE_SHIPPING_FEDEX_WEB_SERVICES_WEIGHT',

'MODULE_SHIPPING_FEDEX_WEB_SERVICES_ADDRESS_1',

'MODULE_SHIPPING_FEDEX_WEB_SERVICES_ADDRESS_2',

would become:

return array('MODULE_SHIPPING_FEDEX_WEB_SERVICES_STATUS',

'MODULE_SHIPPING_FEDEX_WEB_SERVICES_KEY',

'MODULE_SHIPPING_FEDEX_WEB_SERVICES_PWD',

'MODULE_SHIPPING_FEDEX_WEB_SERVICES_ACT_NUM',

'MODULE_SHIPPING_FEDEX_WEB_SERVICES_METER_NUM',

'MODULE_SHIPPING_FEDEX_WEB_SERVICES_WEIGHT',

'MODULE_SHIPPING_FEDEX_WEB_SERVICES_ADDRESS_1',

'MODULE_SHIPPING_FEDEX_WEB_SERVICES_ADDRESS_2',

'MODULE_SHIPPING_FEDEX_WEB_SERVICES_SUBURB

 

Again any thoughts?

I am just becomeing familiar with this module so any help would be appreciated,

If you choose not to decide you still have made a choice, I will choose a purpose clear, I will choose Free Will. --Neal Peart - Rush

Link to comment
Share on other sites

Hi Guys. Thank you for this great contribution.

 

It works very well in general. However, if you include any accented character in the shipping address, é è ñ á ó for exemple, it triggers a 500 Server error.

Many foreign addresses include accented characters and it is impossible for the foreign customer to get a shipping quote. Am I an isolated case or is this a know issue?

 

Thank you.

 

 

Hi, i have the same problem:

 

Hi,

 

if a customer use special characters in his address , he gets this error when he want to the shipping page:

Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: string 'pok\xf3...' is not a valid utf-8 string in /home/bram/public_html/catalog/includes/modules/shipping/fedexwebservices.php:184 Stack trace: #0 /home/bram/public_html/catalog/includes/modules/shipping/fedexwebservices.php(184): SoapClient->__call('getRates', Array) #1 /home/bram/public_html/catalog/includes/modules/shipping/fedexwebservices.php(184): SoapClient->getRates(Array) #2 /home/bram/public_html/catalog/includes/classes/shipping.php(124): fedexwebservices->quote('') #3 /home/bram/public_html/catalog/checkout_shipping.php(192): shipping->quote() #4 {main} thrown in /home/bram/public_html/catalog/includes/modules/shipping/fedexwebservices.php on line 184

 

anybody can help me?

Thanks in advance.

 

Bram

Link to comment
Share on other sites

I've installed and it works great. We need to fix the sorting and add transit times. I'll do my best. Thanks for a great solution. By the way, this contribution will be mandatory by Feb. 2012

Anyone can buy a camera... it's what you do with it that counts!

Sticky Pod

www.stickypod.com

Link to comment
Share on other sites

Anyone getting this error?

 

Fatal error: Cannot redeclare cmp() (previously declared in /includes/modules/shipping/fedexwebservices.php:225) in /includes/modules/shipping/fedexwebservices.php on line 225

 

I'm using Paypal Express as the payment module, I go through and confirm my paypal information and this comes up after clicking continue.

Link to comment
Share on other sites

Anyone getting this error?

 

 

 

I'm using Paypal Express as the payment module, I go through and confirm my paypal information and this comes up after clicking continue.

 

Ok looks like my problem above is limited to using Paypal Express module. When the user is sent to paypal to log in, then they are sent back to the checkout, the error occurs. Any ideas?

Link to comment
Share on other sites

Has anyone been able to get this mod working with Fedex Automatic Labels?

 

I'm gonna start preparing (I know fedex will require webservices after Feb 2012) for the shutdown of of the old system.... however I know ship_fedex.php requires fedexdc.php in several places.

Link to comment
Share on other sites

I have been using my FedEx automated labels all along,

We updated the the webservices module about a month ago, all I did was turn off the FedEx Realtime Quotes shipping module in the admin>modules>shipping.

I did not make any changes to it or unistall it. Just set enable to FALSE.

Our Automated labels is working fine.

I think the only reason you needed Realtime Quotes to begin with was to get a fedex meter ID

If you choose not to decide you still have made a choice, I will choose a purpose clear, I will choose Free Will. --Neal Peart - Rush

Link to comment
Share on other sites

Just posted to the contribs section a V9.3. http://addons.oscommerce.com/info/7977

 

 

Includes all changes from V9.2

Added:

My attempt at installation instructions. (they are crude but I tried)

A Changelog (to try and keep track of changes)

 

Stopped the module from quoting a ground rate to a foriegn country (international ground, if enabled, is unaffected).

 

Stopped the module from quoting rates for a PO Box shipping address.

 

The only changes are to /includes/modules/shipping/fedexwebservices.php

 

at or about line 88

if (MODULE_SHIPPING_FEDEX_WEB_SERVICES_INTERNATIONAL_GROUND == 'true') {

 

Changed to:

if ((MODULE_SHIPPING_FEDEX_WEB_SERVICES_GROUND == 'true') && ($order->delivery['country']['iso_code_2'] == $this->country)) {

 

at or about line 287

$this->quotes = array('module' => $this->title,

'error' => $message);

}

changed to:

 

$this->quotes = array('module' => $this->title,

'error' => $message);

}

// po box hack by JD

if (eregi("^P(.+)O(.+)BOX",$order->delivery['street_address']) ||eregi("^PO BOX",$order->delivery['street_address']) || eregi("^P(.+)O(.+)BOX",$order->delivery['suburb']) || eregi("^[A-Z]PO",$order->delivery['street_address']) || eregi("^[A-Z]PO",$order->delivery['suburb'])) {

$this->quotes = array('module' => $this->title,

'error' => '<font size=+2 color=red><b>Federal Express cannot ship to Post Office Boxes.<b></font><br>Use the Change Address button above to use a FedEx accepted street address.'); }

// end po box hack by JD

 

Hope this helps someone else besides me.

If you choose not to decide you still have made a choice, I will choose a purpose clear, I will choose Free Will. --Neal Peart - Rush

Link to comment
Share on other sites

In case anyone was having the same problem I was with this contrib where the call back to the shopping cart causes a Fatal error:

 

Fatal error: Cannot redeclare cmp() (previously declared in /includes/modules/shipping/fedexwebservices.php:225) in /includes/modules/shipping/fedexwebservices.php on line 225

 

I found a different contrib that works really well here: http://addons.oscommerce.com/info/1462

Link to comment
Share on other sites

Are you using PayPal Express or any other PayPal module? You say the error occurs "where the call back to the shopping cart".

If you are, run a search on the paypal module for function cmp()

 

I have to wonder now if that was not used in that module. If so, that is the problem, two different modules using the same function call for two different functions.

Just my guess at the moment, as I do not know what modules you have installed.

 

As for useing FedEx Real Time Quotes. That will only work for a short time, FedEx will be phasing out all of the old API support next year.

If you choose not to decide you still have made a choice, I will choose a purpose clear, I will choose Free Will. --Neal Peart - Rush

Link to comment
Share on other sites

Are you using PayPal Express or any other PayPal module? You say the error occurs "where the call back to the shopping cart".

If you are, run a search on the paypal module for function cmp()

 

I have to wonder now if that was not used in that module. If so, that is the problem, two different modules using the same function call for two different functions.

Just my guess at the moment, as I do not know what modules you have installed.

 

As for useing FedEx Real Time Quotes. That will only work for a short time, FedEx will be phasing out all of the old API support next year.

 

Yes I am running Paypal Express also. I have not seen anything regarding this error when searching. I tried to rename the function to something other than cmp(), but it just gives me the same error with the new name I created.

 

Thanks for the heads up regarding the Real Time Quotes. That one actually stopped working for me b/c I moved the project to the production server and now I'm getting a different error. I'll try this contrib on the new server and see if I get the same function error.

 

ho humm... sad.png

Link to comment
Share on other sites

I searched this thread, but did not find an answer. If I missed, please point me in the right direction.

 

I have installed the module on several carts, it works very, very well. Thank you for the fine contribution.

 

We had an error problem with Canadian ground shipping from the USA.

 

I had a chance this evening to chat with the WebEx services technician. He was able to explain exactly the problem with Ground to Canada. This is the ONLY service affected in this manner. Any other FedEx service to Canada from the USA and any method of shipment to any other country form the USA is NOT affected.

 

Ground services to Canada need to have the declaration value of the shipment passed to FedEx as this service automatically adds in brokerage fees unless the seller specifies a broker when printing the shipping label. Currently, a "$0.00" value is passed. I need to know how to:

 

1. Determine the country as Canada,

2. Determine the method as International Ground,

3. Determine the "declared value" of the shipment

4. By-pass the declared value if the seller specifies a Broker is to be used

 

then send the above information to FedEx to get the actual charges for shipping via International Ground to Canada.

 

George

Edited by Geotex

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

another minor problem

 

When using the latest published module AND having FedEx rates set to List, I get a $0.00 rate for international shipping. When the rates are set to Account, shipping charges are shown.

 

??

 

George

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

Assuming I did not get an answer as I might be using a modified update that would cause a problem, I installed the full version v9.2 dated Aug, 2011. The same problems outlined in the above two postings still exist.

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

Download and install my upload V9.3. It turns off International Ground to any foreign country.

http://addons.oscommerce.com/info/7977

 

But does not have any effect on any other FedEx service quote, you still get international econ and priority to Canada rates.

(it is easier and less hassle to use FedEx Express to cross a border anyway- Just MHO and my experience)

 

There has always been an issue with FedEx returning $0.00 shipping cost for international when LIST rates are applied.

Not sure why but that problem goes back way before this module.

If you choose not to decide you still have made a choice, I will choose a purpose clear, I will choose Free Will. --Neal Peart - Rush

Link to comment
Share on other sites

  • 4 weeks later...

OK, latest developments.

 

Received this e-mail today, which surprised the hell out of me;

 

 

 

Still 1 to 2 months away from PHP SOAP on the EIG servers, HOWEVER, I am working with some of their technical staff to get this module implemented correctly on servers with PEAR SOAP, for now.

 

When they mod and test the code (I'm not a coder) and I test it on my site (no PHP SOAP) and see if it works or not, I will not only let you know, I will bring the modded code back here for others that are have the same problem as I (and others) are.

 

There is a good chance that Mr. Lopez will give this effort his blessing and we'll have it sooner rather than later.

 

Just an update that EIG is no closer to resolving this than they were back in the summer of 2011. Here's a quote from someone I've been working with from an EIG-related ISP:

 

"Hi Rob,

 

I want to give you a quick update as to where we stand with this:

 

I was able to determine that while we have the PEAR SOAP module installed on our system, we do not have PHP SOAP installed. As a result, we will have to recompile PHP with SOAP support to rectify this situation for you. As I'm sure you can imagine, recompiling PHP for our entire customer base is not something that can be taken lightly. While I am confident we will find the best way to go about this, I can't really say for sure when we will execute that plan. My hope is that it will be completed before May of this year, when FedEx plans to make their changes, but I really can't say for sure right now.

 

If I hear anything else about this project, I will be sure to update you. Until then, please let me know if there is anything else we can assist you with.

 

Thank you,

Dan Gorman

Technical Support Manager

 

FatCow Web Hosting"

 

It's hard to imagine that other OSC-based sites aren't screaming about this. Is everyone waiting until the last minute? One or two of us can't make this happen, as EIG doesn't seem to appreciate the potential impact. For my own interests, I'll have to leave my present provider and am not waiting until May 2012.

 

I'm curious what others are experiencing. Am I completely missing something?

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

 

I have recently installed this module on the osCommerce site I'm working on for a client. Everything seems to work great since I am getting rates to display.

 

However, my client has mentioned a FedEx shipping option called "SmartPost" in which case FedEx drops the package at a local USPS office and then USPS delivers it from there. It is cheaper than the Ground Home Delivery, but the rates for this cheaper SmartPost option are not returned with this Web Services module.

 

Is anyone else experiencing this?

 

 

I tried looking online for a "FedEx SmartPost" osCommerce contribution that could maybe run alongside Web Services, but I didn't find anything.

 

Hopefully someone else out there can shed some light on how to display FedEx SmartPost rates...

 

 

Thanks!!!

Link to comment
Share on other sites

  • 2 weeks later...

I can't believe this module is sooooo unsupported. It makes me sad.

I've tried to modify the module to support the Ship-Separate capability, and have not been succesful yet. If anyones up to the challenge I'm willing to contribute $.

 

This module is excellent but just lacking a few features to make it perfect. Would any of you code experts have time to attach this now?

This post lists several several features that could help, some which have already been addressed, but the Ship-Seperate designation is critical.

 

Time is running out

-Dave

Link to comment
Share on other sites

Need Ideas please - it works on my in-house development server, but not online???

 

I'm getting a 500 Internal Server error when testing on my production server running PHP 5.2.17. I've run the SOAP test and it works fine. Soap is listed as 'enabled' for "Soap Client" and "Soap Server" with my phpinfo.php script.

 

I'm not sure where to troubleshoot. Any ideas welcome.

Link to comment
Share on other sites

  • 2 weeks later...

Not sure what I am doing wrong. Uploaded the files went into the admin area. Went to install the module and I do not see the Fedex module to install. Did 3 shift refresh and still nothing.

 

Any suggestions?

 

PS I checked the placement it is in the right areas

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
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...