Jump to content
Sign in to follow this  
sfatula

Just Contributed - Fedex Real Time Quotes v2.02

Recommended Posts

This is v 2.02 of the Fedex real time quotes shipping module for OSC. This version includes some minor bug fixes, and also the ability for Canadian users to actually get ground quotes for both residential and businesses. Also, for Canadian users, adds the ability to correct for the missing residential delivery surcharge that Fedex is currently missing.

 

This contrib does NOT include the changes in a previously modified version posted by Daniel Duerr. He had posted some changes that return no quote and an error if the destination was in any way shape or form a PO box. We have found this to not be a problem in 4 years of business. Additionally, we find a lot of our business customers putting both a street address AND a PO box, as numerous businesses do. His change would disallow using Fedex to ship, when in fact it can be used. So, we prefer to handle any exception manually. And in 4 years, no UPS or Fedex package was requested to go to a PO box on our site so I don't think it's a problem.

 

Any discussion on this would be appreciated though as you may have a different experience.

 

For those of you with CURL issues, I don't see many people in the forums who are CURL experts in installation and support. Various people seem to have trouble with CURL, this is an OS level feature, not a shipping module feature. CURL is VERY common on the web, it's not an obscure tool and numerous contributions use it. Perhaps better luck would be obtained by going to the CURL website, which is http://curl.haxx.se as you may find much more assistance and knowledge there. Many times it's a hosting provider restriction that seems to cause you trouble, that's an issue with your provider, not a shipping module and certainly not a CURL problem. The vast majority of providers I've seen allow CURL with no issues or restrictions at all.

 

PHP 4.3.0 and later has allowed for reading of secure sites with OPENSSL support if compiled into PHP and properly set up. Similar restrictions and issues may apply to this as well since you do not have to compile it into PHP (my provider does not for example), and there appear to be some Windows problems. So, for now, we are sticking with CURL for all PHP users as it is by far the most common and widely available product, and one that works very well. In some future version, we may tackle a non-CURL version.


Steve

Share this post


Link to post
Share on other sites

I have installed this module but the only mention of OpenSSL in my server info page is:

 

HTTP Server: Apache/1.3.29 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.2 PHP/4.3.3 FrontPage/5.0.2.2634 mod_ssl/2.8.16 OpenSSL/0.9.7a

 

There is no mention of it under PHP or next to curl, and the webhosts say they will not install openSSL.

 

Should I just give up and delete the Fedex module?

Share this post


Link to post
Share on other sites

Steve,

 

Thanks for the great contribution. It is really what we needed. However, I am having difficulties with CURL. Reading your documentation and going through the code, and the server setup I do not understand what is requiered.

 

This is what I see under the 'server info' in the admin panel of osCommerce:

openssl

OpenSSL support enabled

OpenSSL Version OpenSSL 0.9.6b [engine] 9 Jul 2001

 

curl

CURL support enabled

CURL Information libcurl 7.9.2

 

What to do? Please don't tell me to change my host because I won't consider it.

 

thanks,

Ron Peled

Share this post


Link to post
Share on other sites

Under server info you need to look for something like "--with-curl=/usr/local/bin'" under 'configure commands.' I believe this means that your php was compiled using curl. If you have this then specify "NONE" for the curl path for the FedEx module.

 

However, if you have curl on your server but php is not compiled using curl, you can specify the path such as /usr/local/bin and it should work. I do believe you have to have ssl.

Share this post


Link to post
Share on other sites

Hey all,

 

I think Daniel Duerr's addition of the "P.O. Box checker" is a great idea. You'd be surprised at how many of our customers try to ship Fedex to P.O. Boxes.

 

Just one comment: on line 87, where it says

 

if (eregi("^P(.+)O(.+)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' => 'Federal Express cannot ship to Post Office Boxes.');

 

(At least for the way our host's version of php interprets regular expressions) I think it ought to read

 

if (eregi("^P(.*)O(.+)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' => 'Federal Express cannot ship to Post Office Boxes.');

 

in order to allow for the customers who write "PO" instead of "P.O." etc.

 

Keep up the good work!

Ben

Share this post


Link to post
Share on other sites

what's the problem with P.O. boxes? does fedex not ship to them? i'm only shipping to the continental U.S. so is that a problem?

Share this post


Link to post
Share on other sites

kinetek

 

As I understand it, FedEx can't deliver to PO Boxes because the US Postal Service will not place anything in a PO Box that did not come through their channel.


Rule #1: Without exception, backup your database and files before making any changes to your files or database.

Rule #2: Make sure there are no exceptions to Rule #1.

Share this post


Link to post
Share on other sites

Oh, i got it. you can still ship to p.o. boxes (like at mailboxes etc.) just as long as they're not REAL p.o. boxes. That's what i was having trouble with. Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×