Contrib type:
ModuleStatus:
Complete and workingCompatibility:
Ubercart Beta 1Latest version:
0.3Shipping quote module that interfaces with the FedEx Web Services API to get rates for package shipments. Replaces the previous FedEx contribution, which was based on an older, deprecated FedEx API.
This module requires PHP 5 built with the SOAP extension enabled (--enable-soap).
Detailed information about requirements, limitations, installation, troubleshooting, etc. are included in the README.txt.
Bug Fixes / Features added in version 0.3:
- Fixed minor error in parsing ACCOUNT rates
- Verified module works with Ubercart Beta 1
Bug Fixes / Features added in version 0.2:
- Fixed weight calculation error - was returning too high a weight by a few percent (typo)
- Added package tracking function, not tied into admin menus yet
- Made List Rates/Account Rates functional
- Minor fix to support shipping to non-US destinations
- Changed README.txt to reflect current version of the code
Related threads:
| Attachment | Size |
|---|---|
| uc_fedex-0.3.tar.gz | 85.25 KB |



Thank you!
Thanks, this works great!
Any chance of a bounty for uploading shipments to fedex so as to allow merchants to print out labels with doing double entry?
Re: Thank you!
Thanks. It's pretty cool to see it actually in use so soon!
I do plan to eventually tackle label printing etc., but that gets into the issue of how to do shipping in Ubercart, as opposed to shipping *quotes*, which is what all the shipping modules currently do. There are a number of hurdles and technical difficulties involved with printing labels, one of which is the need, at least for FedEx, to get the label printing code certified by FedEx. I understand UPS restricts issuing credentials for label printing to organizations that ship >50 packages a day, or something like that. And it's plain just not do-able for USPS (I've looked into this and will write a detailed post of my findings someday soon). There may be similar problems with FedEx, I really haven't explored that in detail yet.
broken in beta 2
Hi - the module is no longer working in beta 2. I have lost the fedex config page and "recieving quotes" just hangs on the checkout page. Any ideas? Thanks
Re: broken in beta 2
Hmm, I have it running on beta 2 - there's nothing new that should affect this module specifically. "Lost the config page" is an indication that something bigger is going on - I don't know how that can happen unless the installation got screwed up somehow. Do *any* of the shipping quotes modules work?
Re: Re: broken in beta 2
By enabling another shipping module, suddenly my fedex settings are back
However, it's still hanging when it tries to get quotes. It didn't do this before. Any other ideas?
Re: Re: Re: broken in beta 2
Are you using the production server or the test server? The test server seems to go down a lot, but I've never seen the production server go down yet.
it's production
production, all the settings are valid. any way to debug this?
Re: it's production
Turn on the debug flag at admin/store/settings/quotes/edit
Then when you try to get a quote and the progress bar spins and spins, click on a link to go to another page on your site (like the home page) and you will see the FedEx request/response displayed at the top of the page.
But the issue is almost certainly a workflow-ng problem - workflow-ng seems to get confused when any of the shipping modules are changed (additional shipping methods added/removed, modules installed/disabled, etc). One thing to do to get it back working is described here: http://www.ubercart.org/comment/9688/Re-Its-works-m
no success
I have enabled debugging and when I go to another page, no errors are displayed?
I tried the fix you suggested for workflow-ng - no success.
I tried enabled "weight" shipping method since we need something working... no success.
Is there any way I can "reinstall" or cleanup the database without breaking the site even further?
Thanks
Re: no success
It sounds like all your shipping quotes are broken then? I don't really see how there can be no debug info printed at all (you're doing this as admin and you have 'configure quotes' permission?). I suggest you truncate any cache_ tables in your database first. If that doesn't fix things, you can safely disable and *uninstall* workflow-ng and uc_fedex and any other shipping module you have installed, then reinstall workflow-ng (I'm using v1.6 under UC beta3) then reinstall uc_fedex. Use Firebug on the checkout page to see the AJAX calls being made by the shipping methods, to find out where the process is breaking down.
the horror the horror
OK, I tried all your suggestions. It's STILL hanging... when I check it out in firebug it's hanging here:
POST https://desertsuncoffee.com/cart/checkout/shipping/quote 500 (312ms)
No debug info is being shown (i guess because we're not getting any response from fedex?)
re: the horror the horror
Check to make sure SOAP is enabled in PHP. That worked for me once I got my authentication correct.
International Shipping?
I've got this working great for Domestic (US) shipping but it doesn't appear to be working for international shipping.
When I try to get a quote for london, I get:
# ERROR
# crss
# 521
# Destination postal code missing or invalid. {0}
# warning: Invalid argument supplied for foreach() in /home/xxx/public_html/sites/all/modules/ubercart/uc_fedex/uc_fedex.module on line 440.
When I try to ship to Victoria, BC, I got a similar error telling me that British Columbia was not valid.
How much testing have you done for international ordering?
Line 440 error
I often get an error when the response fails for whatever reason:
warning: Invalid argument supplied for foreach() in /home/xxx/public_html/sites/all/modules/ubercart/uc_fedex/uc_fedex.module on line 440.
I added the line:
if ($respone->Options)right before the foreach to ensure that it has a value.
lladnar1 wrote: I've got
I've got this working great for Domestic (US) shipping but it doesn't appear to be working for international shipping.
When I try to get a quote for london, I get:
# ERROR
# crss
# 521
# Destination postal code missing or invalid. {0}
# warning: Invalid argument supplied for foreach() in /home/xxx/public_html/sites/all/modules/ubercart/uc_fedex/uc_fedex.module on line 440.
When I try to ship to Victoria, BC, I got a similar error telling me that British Columbia was not valid.
How much testing have you done for international ordering?
I don't use FedEx for international shipping. As I said in the README, I've done only minimal testing for international shipments. I ran quotes for about a half dozen addresses in Canada, UK, France, and Spain. It worked with the addresses I have. Perhaps you're not entering things in a format I expect. Are you using the .cif files in your checkout? The zones and postal codes are passed to uc_fedex directly from the form. I don't do any post-processing like removing white space or anything like that...
If you could send me some example city/zone/postal code/country combinations that fail, I will see what's going wrong. Also, if you can send me some real tracking numbers for FedEx international shipping, I will make sure my Package Tracking module works with those (I haven't tested tracking with FedEx International because I don't ship that way, so I don't have any valid tracking numbers to test with.)
Quote:I often get an error
warning: Invalid argument supplied for foreach() in /home/xxx/public_html/sites/all/modules/ubercart/uc_fedex/uc_fedex.module on line 440.
I added the line:
if ($respone->Options)
right before the foreach to ensure that it has a value.
Yes, it looks like that part of the XML isn't part of the reply when you send an invalid field to the server. I'll put this fix in.
mtndan wrote: OK, I tried
OK, I tried all your suggestions. It's STILL hanging... when I check it out in firebug it's hanging here:
POST https://desertsuncoffee.com/cart/checkout/shipping/quote 500 (312ms)
No debug info is being shown (i guess because we're not getting any response from fedex?)
The debug info prints out using drupal_set_message, meaning it will show up in a message box at the top of the NEXT page you visit on your site. Since the shipping quotes are being done by an AJAX call, you're not actually going to a different page in response to the "Calculate Shipping" button push. Let it spin for a while, then click on any other link on your site - you should see the message box appear at the top of that new page. AS A MINIMUM you will see the request sent to the FedEx server - if you post or PM me that request (remove your private ID numbers) I can take a look to see if it is well-formed or missing something.
Also, you might want to check your theme page.tpl.php file to make sure it's displaying the $messages variable - not all themes are as complete as they should be, and if yours left out this detail you won't see any error messages at all (you can switch your admin theme to Garland to make sure you're seeing everything).
re:International Shipping
I tried the following:
1 Cook Street
Victoria, BC V8V 3W6 (tried it with and without the space)
I also tried:
10 Downing Street
London, Greater London SW1A 2AA (tried with and without the space)
I'm not using the shipping portion, only the quotes, so I don't have any tracking codes for international shipping.
Also, yes, I'm using the .cif country settings.
Re: re:International Shipping
Both of those addresses work for me. Do the products in your cart have a non-zero weight? The only thing I've found so far is that the quote doesn't return a value if the weight is zero.
Also, are you using the Testing or Production server? Account or List quote type?
I started getting the (Invalid Package weight entered) from fedx
Thanks to the development module. I printed out the inputs and outputs from the fedex call
array(1) {[0]=>
object(stdClass)#24 (4) {
["price"]=>
float(656.25)
["weight"]=>
float(882)
["shipweight"]=>
float(882)
["qty"]=>
int(1)
}
}
As you can see, there is a weight for the quote.
Apparently, Fedex is not checking and returning individual errors. If the weight exceeds the maximum, it returns that there is not a weight. It is just the wrong message. If I go in the shopping cart and change the qty from 75 to 10. it produces a quote.
Does anyone know the maximum fedex weight? I putting together a lightweight cubing algorithm as a fix.
Here is my example. Someone buys 40 balusters at 4 lbs each and it fails. In reality, they are shipped at 5 per box. I am thinking that we can add a parameter of max weight per box or modify products to have a max items per box. Either is a good solution, but I am going to put a fix in for max weight. If you order 200 items and they weight .25 lbs and the max weight is 25 lbs, it will not try to ship them in one box, but multiple boxes.
Hope this helps those fedexers out there.
David Strickland
Delante Solutions
Fix to be posted after testing.
I have found the fix and it seems to only pertain to shippers who have very heavy or large quantities. I added a parameter to the fedex shipping config for max weight per box, added an additional option for break by shipping weight, and modified the quote that in the case of the "break method" it would estimate the number of boxes based on the param and now wahla... it works without complaint. I will test it today and tomorrow. If it is good, I will post the file here. Thanks.
David Strickland
Delante Solutions
Here is the Patch (Break Package by Weight)
I have attached a patch that provides a weight parameter on the fedex config screen and a another radio button to use the parameter (break packages by weight).
On ironpickets.com, we set the max weight to 45 lbs for fedex. We are exclusively using fedex or ground shipping companies because of the weights. The existing module would assumes one package, but now it will use the following equation to determine the number of packages = (floor(total weight / max weight) + 1) iff the break by weight option is set and a weight is provided.
Let me know what you think.
David Strickland
Delante Solutions
mtndan@drupal.org wrote:Hi -
Just to follow up on this issue, so there's no confusion over the status of the FedEx module:
I worked with mtndan and we got him running again - it turned out to be a problem with his server configuration and not the FedEx module. We had to change three things: 1) new FedEx credentials, 2) PHP needed to be rebuilt with SOAP, 3) PHP needed to be rebuilt with OpenSSL.
Item 3) is not explicitly documented anywhere as a dependency for Ubercart or Drupal, but it is required by drupal_http_request() whenever an https protocol request is made. The FedEx, UPS, and USPS shipping quotes modules all use https to contact the courier's web site. To support this, PHP needs to be built with the --with-openssl flag
Hi TR, Any chance 0.4 is
Hi TR,
Any chance 0.4 is going to be posted soon? I want to fix the bug where the shipping type doesn't show up in the order review.
Thanks!
PerPieceDimensions
I noticed that beginning on line 584 of v0.3, the dimensions for a package are all explicitly set to 1 before getting the quote:
'PerPieceDimensions' => array('Length' => '1',
'Width' => '1',
'Height' => '1',
'Units' => 'IN',
),
Shouldn't it be checking some real dimensions entered for the product(s)? How inaccurate will this make the quote? Or are the dimensions just determined by the package type that you select?
Thanks.
Re: PerPieceDimensions
This is noted and discussed in the README.txt file that comes with the module. There's all sorts of other good stuff in there.
Basically, for most couriers, FedEx included, the weight is the number used to determine the shipping rate, with the assumption that heavier items come in larger packages. The only time you'll get into trouble is if you ship exceptionally light objects in large packages - then FedEx will charge a "dimensional rate" based on the package size instead of the weight. The package dimension in this module is set small so that you will always get the weight-based rate, not the dimensional weight. (BTW, this is exactly what FedEx's web site does when you get a "quick quote" - it uses a 1"x1"x1" box.)
If you think your shipments might be subject to the dimensional rate, you can easily modify the module for your particular situation. For example, you might want to pass FedEx the dimensions of the largest item in the order. A general solution is not practical, because it requires knowing all the different box sizes you might use and figuring out how large a box is required for an arbitrary mix of your products (along with packing material for the inside of the box). Anyone who has tried to pack a variety of different-sized objects into a box (books, for instance) knows that there are hundreds of ways to do it, some of which make better use of the space than others. Even if you wrote the code to calculate the optimal packing, there is no guarantee a human would do it that same way, therefore there's always going to be a disconnect between what the packaging code "thinks" can be done and what is actually done.
Fixed shipping type not showing up on review page
The 0.4 version seems to be taking longer than I expected to release so I went ahead and fixed the "Shipping Type not showing up on the review page" bug. I am attaching a patch and also the complete module. Please test this and let me know if there are any issues.
--
Cheers,
Jon Antoine
www.antoinesolutions.com
Showing FedEx image next to quote
I wanted the FedEx module to display the quote similar to the uc_ups logo with a logo so it can easily be differentiated from other carriers. Attached is the logo. To implement just drop the image in the uc_fedex directory and change line 459 to:
'option_label' => '<img class="fedex_logo" src="'. base_path() . drupal_get_path('module', 'uc_fedex') .'/uc_fedex_logo.gif" /> '. $method['fedex']['quote']['accessorials'][$service] . t(' Rate'),+1 Fedex Logo
+1 for the Fedex Logo. I added this modification to my site and it looks really nice. I extended it by removing the "FedEx " portion of every service. I have attached a patch for easy adoption and would love to see this committed by TR.
*edit
The first patch did not display consistently between the checkout and review pages, so I modified the patch by replacing the "FedEx" text of each service type with the logo. This allows the FedEx logo to be displayed on the review page as well.
Cheers,
Jon Antoine
www.antoinesolutions.com
+2 fedex logo but with this fix...
I love the fact that there is a FedEX logo now.. however, you gotta check your code! =D
I made a patch to the fedex module to fix the little error, you cannot put the logo in the services field, unless you like your order view to look like this:
<img class="fedex_logo" src="'. base_path() . drupal_get_path('module', 'uc_fedex') .'/uc_fedex_logo.gif" /> 2nd Day: 34.32Since its nice to not display the Fedex words twice, I added a substr around the original services function to get rid of the Fedex words on checkout. This allows the admin to see it print 'Fedex 2nd day' instead of raw HTML output.
Change line around #493:
'option_label' => $quotes[$key]['option_label'] = '<img class="fedex_logo" src="'. base_path() . drupal_get_path('module', 'uc_fedex') .'/uc_fedex_logo.gif" /> '. substr($method['fedex']['quote']['accessorials'][$service], 5),And no need to edit _uc_fedex_services()
Silly newbie question.....
Alright, forgive my newbieness ahead of time here, but I'm having a small snag with the module and was hoping someone might know something or could point me in the direction I have failed to look:
At the checkout, it gives me the following message when it calculates shipping:
There were problems getting a shipping quote. Please verify the delivery and product information and try again.
If this does not resolve the issue, please call in to complete your order.
I receive the following message on the error notices on the admin page:
* Error in processing FedEx Shipping Quote transaction.
* ERROR
* prof
* 1000
* Authentication Failed
I have SOAP enabled on PHP 5.2.6, and have followed all the checklist info in the README file.
I have also double checked my FedEx test credentials, and have even renewed them a few times to try different keys.
Store address is set as well.
What step am I missing here? Or is it the FedEx servers itself right now? I had trouble last week getting the dev keys because that portion of the site was apparently down until this morning or so.
Any advice is HIGHLY appreciated.
Re: Silly newbie question.....
The message means one of the four numbers you're sending as credentials is wrong. The fact you got a response back from the FedEx server means SOAP and everything else is set up properly on your end. Note that all four numbers are different for the test server - you don't use your normal FedEx account number for the test server, for instance.
FedEx Security Update
This module seems to be working fine for me. Thanx!
I was wondering if anybody got wind of the FedEx security update due to come out shortly. I received an email and can't seem to quote it here, so I attached it. I'm hoping this upgrade won't upset the smooth operation of the Drupal module.
Thanx again and keep up the great work.
--
Joe
Re: FedEx Security Update
I received the notice, but I have to do some research to see if it affects this module. Currently, the FedEx shipping quotes API does not require or use SSL, so at first blush it seems like it shouldn't be affected.
Patch needed when upgrading to Ubercart 1.4
After upgrading to ubercart 1.4 the fedex quote was no longer working on the shopping cart page (still works fine on the full checkout page, though). The following error was shown:
* Error in processing FedEx Shipping Quote transaction.* ERROR
* crs
* 522
* Destination country code missing or invalid
* Destination country code missing or invalid
The problem was that CountryCode was being passed to FedEx as null when only the postal code is passed in by the AJAX form. I can think of no easy way to determine the country code just based off the postal code so my patch makes the destination country code equal to the origin country code if it is unable to determine it. Better ideas welcome.
Post Security Update Authentication Failure
FedEx urgraded yesterday. I tested today and got the following. Prior to FedEx upgrade I was getting quotes fine. Anybody else seeing issues like this? Could just be a coincidence I suppose ???
*FaultCode:soapenv:Server
String:Internal system error. Please try again later.
* warning: Invalid argument supplied for foreach() in /var/www/drupal/sites/all/modules/ubercart/uc_fedex/uc_fedex.module on line 440.
Thanks for any insight. Ubercart rocks.
Re: Post Security Update Authentication Failure
The FedEx Testing server is currently not working, which is why you are receiving that error. (I called FedEx and verified that this is a problem with their server.) The Production server *is* working. The Testing server is really only useful for getting this module configured for the first time - after that you should use the highly-reliable Production server.
I also discussed the notification letter with FedEx. It should *not* affect this module.
List rates for International Shipping Methods
Forgive me if this sounds silly but what is the reason behind List Rates not being returned for International shipping methods through this module?
Patch for Fedex testing server upgrade
Following up on comments 36 and 37, it appears that as of 9/29/08, Fedex dropped support for their older v2 SOAP API on their testing server. Here's a patch (I just created it, and it appears to be working, but it hasn't gotten much testing) for uc_fedex.module that makes use of the newer v4 API. I'm also attaching the WSDL files from Fedex's developer site. The "RateService_v4.wsdl" file within this zip needs to go in the "wsdl-testing" folder within the "uc_fedex" module. You'll also need to get the production server version of this file and put it in the "wsdl-production" folder once you want to switch to using the Fedex production server. I'm not including that here, because I don't yet have a production account with Fedex. For anyone who tests this out, please reply to this comment to confirm that it's working, or to let me know of a bug. Thanks.
Above patch only for rate request
Oops. I forgot to mention. The above patch is only for rate request functionality. It doesn't update the API used for tracking related code.
dglazer wrote:Forgive me if
It has nothing to do with this module. FedEx does not publish list rates for international shipments, and does not return them through the Web Services API. They state that in their Web Services documentation and on their web site. When I wrote this module I tested to verify this was true, then added that informational statement to make people aware of the issue. I also added the quote markup feature to allow you to modify the quote before you present it to your customer, if you want to charge more or less than the account rate.
Re: Patch for Fedex testing server upgrade
Thank you for the patch. I will try to incorporate it into the next version of this module.
Can you cite a source for this information? That is not what the letter in #33 says at all. Also, I called FedEx Web Services Technical Support twice today, talked to two different people, and both tell me that the V2 API is fully supported and they don't intend to drop support for it. The issue with the testing server is what I said above: they are in the process of upgrading its software and it will be unstable for several days.
Re: Patch for Fedex testing server upgrade
Sorry. I didn't mean to imply that FedEx officially dropped support for v2 API from their testing server. It's just that it stopped working, but the v4 API does work, so I assumed that part of what it means to be a testing server is that FedEx doesn't feel a need to maintain old API compatibility on it. Perhaps I'm wrong, and in a few days, the v2 API will resume working on the testing server.
Re: FedEx Shipping Quotes
In the readme file for the FedEx module it states: "Tracking information may be obtained using the uc_fedex_tracking_request()
function. An example of how to use this function is in the code comments."
I don't see the example/comments however when I look at the code in the uc_fedex.module file. Is the example/comments in another file? .info or .install?
Does anyone have suggestions on how to get the tracking portion of this to work?
Thanks in advance.
-backdrifting
Re: Re: FedEx Shipping Quotes
There's a block of commented out code in the module starting with "Just an Example of how to use this information."
But a better way to do it is to use the separate module I wrote for FedEx, UPS, and USPS package tracking: http://www.ubercart.org/contrib/2852
Thanks!
Thanks. I'll try the separate module.
-backdrifting
How to use this module? Workflow?
I have a general question(s) about this module. I've installed and configured it and it's working with our FedEx developer API without issue (as far as I can tell). But here are my questions:
1) Once the customer orders our product and selects the FedEx shipping option, will FedEx get a copy of the order so they know to pick up the order at our HQ/Warehouse? Is this supposed to happen automatically via the API? Or do we need to do something else to configure the pick up?
2) Will our orders be reflected in our FedEx account? Is there any method of testing this before we "go live"? Can you test a real transaction with just the FedEx developer credentials?
I'm just trying to figure out the workflow here - the module will send all of the order info over to FedEx automatically right?
-backdrifting
FedEx quote/info not showing up in Ubercart admin ...
Also, I'm experiencing the same issue(s) that are described in this post:
http://www.ubercart.org/issue/5812/fedex_shipping_method_not_appearing_o...
The order is processing and getting the initial FedEx quote without issue, but then when we login to the admin side and view the order in Ubercart admin, the FedEx info does not show up. It's just got a colon and the $ amount. Can anyone suggest a fix for this?
Should I apply the patch in post #27?
-backdrifting
Patches?
Are the patches that appear in the comments added to the 0.3 release of FedEx? Or do they need to be applied separately? I'm looking specifically at the patch in post #27 - is that part of 0.3?
When is 0.4 being released?
-backdrifting
Tracking ...
Ok, so if I install that separate tracking module, it should hook into the FedEx module automatically?
-backdrifting
FedEx in the shipments and packages admin sections?
Another question(s) related to my earlier posts:
1) How does the FedEx module integrate with the "Shipments" and "Packages" sections of the Order admin?
When I go to order #26 for example (in our site) and load "shipments" for that order:
/admin/store/orders/26/shipments
I get a blank table with a line that states: No shipments have been made for this order.
So I click on Make a New Shipment
The only Shipping Method I get is to "Ship Manually" - I don't see any FedEx shipping options per the quotes that are working on the customer side, and the line item that shows up in the order. How do I actually tell Ubercart to ship the item? Or note it as shipped via FedEx?
Shouldn't the FedEx options be here? Why don't the FedEx shipping quotes and tracking # appear here?
... and on my Packages admin it's the same, there's no shipping ID or tracking ID displayed??
Help!
-backdrifting
patch worked ...
Ok, I successfully applied this patch (from post #27) and it's working - the specific shipping option now shows to the customer on their review order screen and also in the orders admin. No shipping info is showing up in shipments or packages however??
-backdrifting
backdrifting wrote:Ok, so if
Yes, please read the writeup at http://www.ubercart.org/contrib/2852
backdrifting wrote:I have a
Your questions here and in your following posts are really about how the Ubercart backend is structured to handle packaging and shipping - they have nothing to do with this FedEx module per se. I suggest you first read the Ubercart documentation to learn the difference between shipping quotes and shipping and to find out how to manage order fulfillment on the backend. This FedEx module provides shipping quotes only, just as if you visited www.fedex.com and got a rate quote directly from that site. Shipping and packaging is an entirely different set of Ubercart modules. Package Tracking is yet another module, but a contribution that is not part of the Ubercart distribution. If you install Package Tracking you will be given options at the shipping phase to select a carrier. Please read the Package Tracking documentation for more details.
Thansk ...
Ok, thanks for the suggestions.
-backdrifting
FedEx Commercial quote ...
I have the quotes working but the Commercial Ground option is not showing up in the quotes when they are returned for an order. I get the following quotes back:
Ground -- Residence Address: $14.11
Express Saver: $31.29
2nd Day: $35.29
Priority Overnight: $72.69
Standard Overnight: $82.09
First Overnight: $123.17
I have FedEx Ground -- Commercial Address selected in my quote configuration but it's not showing when I actually place an order - I'm using a commercial address. Why would it not show? Any suggestion on how to get this to work? Ground Residence Address is showing.
What does FedEx use to determine a commercial address? I'm thinking it's got something to do with how I'm entering the address?
Thanks in advance.
-backdrifting
Re: FedEx Commercial quote ...
Ah ha - I see this post here: http://www.ubercart.org/forum/support/3144/freight_quote
Does this apply to my issue as well?
-backdrifting
Version 0.4 BETA
After waiting a while for a new release, I couldn't wait any longer. Like all developers at some point, I am sure TR has probably been busy working on other project, so I have taken it upon myself to write the next release. This is a version 0.4 BETA and includes the following changes:
- Implemented a dimensional weight calculation based on the FedEx API Documentation
- Implemented the "Each product in its own package" number of packages option
- Implemented and improved the "Break package by weight" packaging method patch posted in comment #22
- Applied the "Shipping type not showing up on review page" patch from comment #27
- Applied the "Showing FedEx image next to quote" patch from comments #28, #29, and #30
- Applied the "Cart pane" patch from comment #35
- Applied the "FedEx testing server upgrade to v4 API" patch from comment #39 and updated the production files as well
- Added commercial quotes based on the company field
- Fixed a bug where retrieving account specific rates also retrieves list rates. The FedEx API Documentation says that list rates will not be included when account rates are requested, but they don't actually follow this 100% of the time. Now we validate what we have received from FedEx.
- Changed the security code credential to a password type
- Fixed a bug in the settings form validation function that required the security code to be entered every time you tried to save changes to the settings form.
- Added a cutoff time for today's shipments.
Please see the README.txt file for more specifics on new features. This new version cleanly updates v0.3 and brings a lot of wanted/needed functionality. I have not implemented tracking on my site yet so I have not had a chance to test this feature. Please test and report back any bugs you find or changes in functionality you would like to see.
Test this module in a development environment prior to going live. I am not responsible for any problems this module may cause.
With that said, enjoy!
Cheers,
Jon Antoine
www.antoinesolutions.com
Open Source Development Tutorials & Documentation
0.4 Beta & "Discount Account Rates"
I get a strange error using 0.3 that prevents uc_fedex from correctly providing quotes whenever "Discount Account Rates" is chosen instead of "List Rates". Rates and data are, indeed, returned by FedEx's server, but it seems that either uc_fedex or jquery is choking on the returned data. Here's the error message I get in Firebug's console:
<b>Fatal error</b>: Cannot use object of type stdClass as array in <b>/home/blah/blah/sites/all/modules/ubercart/shipping/uc_fedex/uc_fedex.module</b> on line <b>452</b><br />Section of code around L. 452 =
// Check to see if we're quoting ACCOUNT or LIST ratesif (variable_get('uc_fedex_quote_type', 'list') == 'list') { // LIST rate
// LIST quotes return both ACCOUNT rates (in RatedShipmentDetails[0])
// and LIST rates (in RatedShipmentDetails[1])
$ratedetail = $options->RatedShipmentDetails[1];
} else { // ACCOUNT rate
// ACCOUNT quotes return only ACCOUNT rates
$ratedetail = $options->RatedShipmentDetails[0];
}
Thus, it appears that $options->RatedShipmentDetails[0] = FAIL. Is anyone else experiencing this problem? Any ideas why it's behaving like this? Is this related to the fix proposed by Jon in his 0.4 Beta--
Any insights would be appreciated.
Thank you,
Stephen
Stephen, This was the same
Stephen,
This was the same error that I was receiving that lead to my fix. The 0.4 beta should fix that error.
Cheers,
Jon Antoine
www.antoinesolutions.com
Open Source Development Tutorials & Documentation
Jon, Thanks so much for the
Jon,
Thanks so much for the updated module, it is very much appreciated.
I am getting the following error:
*
Fault
Code:soapenv:Server
String:Schema validation failed for request.
* warning: Invalid argument supplied for foreach() in ../sites/all/modules/uc_fedex/uc_fedex.module on line 484.
Any ideas?
Thanks!
Hi Jimi089, It seems you're
Hi Jimi089,
It seems you're not receiving a properly configured response from FedEx. My guess is you probably don't have any shipping options selected that match what FedEx is offering for this particular shipment, but I'm not 100% sure. Can you send me the Request and Response output via my personal contact form? Be sure to remove your credentials for security reasons. Also send me the options you have selected for the FedEx settings page at admin/store/settings/quotes/methods/fedex. Again, don't send your FedEx credential information. Here is how to obtain the Request and Response.
1. In admin/store/settings/quotes/edit, make sure the "Display debug information to administrators" is checked
2. Fill the cart with the items to be shipped
3. On the cart/checkout page fill in the company, country, and zip code of the delivery address only
4. Tab off the zip code field to get quotes to automatically generate
5. Press F5 to refresh the page
6. Copy the output at the top of the page. It should look similar to the following.
* Transaction processed successfully.
* Request:
<?xml data here?>
*Response:
<?xml data here?>
7. Paste this information into a text file
8. Remove everything between the and tags
9. Send the file to me via my contact form
Don't forget to include your FedEx settings also.
Cheers,
Jon Antoine
www.antoinesolutions.com
Open Source Development Tutorials & Documentation
Version 0.4 BETA2
Well...
I found a few bugs that I have corrected in this new release and have detailed them below. I also added a new insurance option.
I haven't heard much from the community, so this release either works really well, or no one is using it
, hopefully the former! Maybe we could get TR to put this up as the most recent version. I was also hoping TR could create a project on d.o for this module so we could track bugs and submit patches more easily. If TR no longer want's to maintain this module, I could look into creating the project myself. Even better, perhaps if the Uberteam is reading this, we could get this included in Ubercart for the Drupal 6.x release...Ryan, Lyle?
UPDATES
- Currently the value of every package is sent to FedEx and you are automatically charged for insurance on all shipments. I added a checkbox on the admin settings form that allows you to specify whether or not to include insurance.
- When I originally wrote the code to calculate the dimensional weight, I was rounding the dimensions of every product and then calculating. This seemed to over calculate the dimensional weight, so now we do the calculation first, then round the total weight up to the next pound.
- Defined global variables for the domestic and international divisors so they can be easily updated when FedEx changes their calculations
Hope you all enjoy!
Cheers,
Jon Antoine
www.antoinesolutions.com
Open Source Development Tutorials & Documentation
Does the Fedex Module actually charge your account?
Under the configuration for the module, it lets you select between test and production mode, and the select box has this text by it: "Quotes and shipments requested in Testing mode will not be picked up or charged to your account."
Does that mean that in production mode when a user checks out their order, that the module will bill the Fedex account and submit the package as a shipment to Fedex?
Luke
Re: Does the Fedex Module actually charge your account?
No. This module does quotes only.