Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

FedEx Shipping Module


battend1

Recommended Posts

I have been wondering the same thing myself, Darren. There is a FedEx contribution ("Fedex Zone Shipping Calculations," http://www.oscommerce.com/community/contributions,490), but it doesn't connect to the FedEx site to calculate fees:

 

This will calculate Fedex Express shipping based on the zone rates that Fedex publishes on their site.

 

This does NOT use any Fedex api, cgi or gateway. It is completely self-contained.

 

I'm more of a designer by nature and am just in the very early stages of attempting to understand PHP and other programming, so I have the faintest idea of even knowing where or how to begin to write a module that is actually based on FedEx APIs or other FedEx scripts.

 

Has anyone implemented the FedEx contribution currently posted? Does it seem to calculate properly? And, what about keeping current on any FedEx rate changes that occur?

 

I believe that the UPS and USPS modules that come standard with osC use UPS and USPS APIs/scripts to calculate their respective rates. Could a FedEx module based upon actual FedEx APIs be altered from the UPS or USPS module without much difficulty?

 

-john

Link to comment
Share on other sites

There used to be a FEDEX module that used the site to calculate shipping fees. However, about 6 months ago, FEDEX changed their website and eliminated the API's that made OSC capable of connecting and calculating shipping.

 

The new system recommended by Fedex required to much setup as well as new server configurations so the module was dropped until further notice.

Link to comment
Share on other sites

There used to be a FEDEX module that used the site to calculate shipping fees. However, about 6 months ago, FEDEX changed their website and eliminated the API's that made OSC capable of connecting and calculating shipping.  

 

The new system recommended by Fedex required to much setup as well as new server configurations so the module was dropped until further notice.

 

The Fedex contribution that is available does not connect with FedEx, and uses a static page of rates that needs to be updated manually whenever FedEx changes their rates. And it's only for US domestic, does not do International. If its true that the Live FedEx module that was being developed has been dropped, then it looks like we'll have to drop OSCommerce and pay the big bucks for Miva shopping cart.

 

- Cisco Serret

www.picassoamerica.com

Link to comment
Share on other sites

The fedex zones module works but not very well. I get errors for certain zip codes and if someone in my area tries to order. On top of it Ive posted a few requests for help and havent gotten any support for it. We're currently looking into switching all of our stores to another cart as well.

Link to comment
Share on other sites

more info... geez this should be easy enough...I wish someone would just do it since Ive done all the leg work. Fedex said on the phone that it shouldnt be a problem.

 

<!-- Start RateFinder Area -->

<script language="javascript">

//-------------------------------------------------------------------

// Function to determine if Ground is supported by selected Country.

// If yes, do nothing.

// If no, disable the Ground radio option.

//-------------------------------------------------------------------

function checkCompanyType()

{

//alert("Debug: checkCompanyType");

var obj = document.shipInfoForm;



//var msg = " does not supported FedEx Ground.";



// TO FIX:

// Get list from backup instead of hardcode.

//

// List of countries that supported Ground.

var ctrySupportGroundArr = new Array();

ctrySupportGroundArr[0] = 'CA';

ctrySupportGroundArr[1] = 'PR';

ctrySupportGroundArr[2] = 'US';



// Check Origin Country.

var idx = obj.origCountry.selectedIndex;

var rs = obj.origCountry.options[idx].value;

var foundItOrig = false;

for (var i = 0; i < ctrySupportGroundArr.length; i++) {

if (rs.toUpperCase() == ctrySupportGroundArr[i]) {

foundItOrig = true;

break;

}

}



// If Origin Country is one of the countries that supported Ground,

// then check the Destination Country.

var foundItDest = false;

if (foundItOrig == true) {

idx = obj.destCountry.selectedIndex;

rs = obj.destCountry.options[idx].value;

for (var i = 0; i < ctrySupportGroundArr.length; i++) {

if (rs.toUpperCase() == ctrySupportGroundArr[i]) {

foundItDest = true;

break;

}

}

}



// If one or both the countries that does NOT supported Ground,

// then user cannot select "Ground" on Type of Service.

if ( (foundItOrig == false) || (foundItDest == false) ) {

// Select Express for user.

obj.companyType[0].checked = true;



return;

}

}



//-------------------------------------------------------------------

// Function to determine if Home Delivery is supported by selected Country.

// If yes, do nothing.

// If no, disable the Ground radio option.

//-------------------------------------------------------------------

function checkShipToResidence()

{

//alert("Debug: checkShipToResidence");

var obj = document.shipInfoForm;



//var msg = " does not supported Shipping to Residence.";



// List of countries that supported Home Delivery.

var ctrySupportHome = new Array();

ctrySupportHome[0] = 'US';

ctrySupportHome[1] = 'CA';



// Check Origin Country.

var idxOrig = obj.origCountry.selectedIndex;

var rsOrig = obj.origCountry.options[idxOrig].value;

var foundItOrig = false;

for (var i = 0; i < ctrySupportHome.length; i++) {

if (rsOrig.toUpperCase() == ctrySupportHome[i]) {

foundItOrig = true;

break;

}

}



// If Origin Country is one of the countries that supported Home Delivery,

// then check the Destination Country.

var foundItDest = false;

if (foundItOrig == true) {

var idxDest = obj.destCountry.selectedIndex;

var rsDest = obj.destCountry.options[idxDest].value;

for (var i = 0; i < ctrySupportHome.length; i++) {

if (rsDest.toUpperCase() == ctrySupportHome[i]) {

foundItDest = true;

break;

}

}

}





// If one or both the countries that does NOT supported Home Delivery,

// then user cannot select "Yes" on Shipping to Residence.

if ( (foundItOrig == false) || (foundItDest == false) ) {

// Select No for user.

obj.shipToResidence[1].checked = true;



return;

}

}



</script>

<form name="shipInfoForm" action="http://www.fedex.com/ratefinder/staticInfo" method=post>

<table border=0 cellspacing=0 cellpadding=0 width=438>

<tr>

<td valign="top" align=left width="145">

<b>Ship From</b><br>

<select name="origCountry">

<option value="US" selected>U.S.A.

<option value="AL">Albania

<option value="AS">American Samoa

<option value="AD">Andorra

<option value="AO">Angola

<option value="AI">Anguilla

<option value="AG">Antigua/Barbuda

<option value="AR">Argentina

<option value="AM">Armenia

<option value="AW">Aruba

<option value="AU">Australia

<option value="AT">Austria

<option value="AZ">Azerbaijan

<option value="BS">Bahamas

<option value="BH">Bahrain

<option value="BD">Bangladesh

<option value="BB">Barbados

<option value="BY">Belarus

<option value="BE">Belgium

<option value="BZ">Belize

<option value="BJ">Benin

<option value="BM">Bermuda

<option value="BT">Bhutan

<option value="BO">Bolivia

<option value="BA">Bosnia-Herzegovina

<option value="BW">Botswana

<option value="BR">Brazil

<option value="VG">British Virgin Islands

<option value="BN">Brunei

<option value="BG">Bulgaria

<option value="BF">Burkina Faso

<option value="BI">Burundi

<option value="KH">Cambodia

<option value="CM">Cameroon

<option value="CA">Canada

<option value="CV">Cape Verde

<option value="KY">Cayman Islands

<option value="TD">Chad

<option value="CL">Chile

<option value="CN">China

<option value="CO">Colombia

<option value="CG">Congo Brazzaville

<option value="CD">Congo Democratic Rep. of

<option value="CK">Cook Islands

<option value="CR">Costa Rica

<option value="HR">Croatia

<option value="CY">Cyprus

<option value="CZ">Czech Republic

<option value="DK">Denmark

<option value="DJ">Djibouti

<option value="DM">Dominica

<option value="DO">Dominican Republic

<option value="EC">Ecuador

<option value="EG">Egypt

<option value="SV">El Salvador

<option value="GQ">Equatorial Guinea

<option value="ER">Eritrea

<option value="EE">Estonia

<option value="ET">Ethiopia

<option value="FO">Faeroe Islands

<option value="FJ">Fiji

<option value="FI">Finland

<option value="FR">France

<option value="GF">French Guiana

<option value="PF">French Polynesia

<option value="GA">Gabon

<option value="GM">Gambia

<option value="GE">Georgia

<option value="DE">Germany

<option value="GH">Ghana

<option value="GI">Gibraltar

<option value="GR">Greece

<option value="GL">Greenland

<option value="GD">Grenada

<option value="GP">Guadeloupe

<option value="GU">Guam

<option value="GT">Guatemala

<option value="GN">Guinea

<option value="GY">Guyana

<option value="HT">Haiti

<option value="HN">Honduras

<option value="HK">Hong Kong

<option value="HU">Hungary

<option value="IS">Iceland

<option value="IN">India

<option value="ID">Indonesia

<option value="IE">Ireland

<option value="IL">Israel

<option value="IT">Italy/Vatican City

<option value="CI">Ivory Coast

<option value="JM">Jamaica

<option value="JP">Japan

<option value="JO">Jordan

<option value="KZ">Kazakhstan

<option value="KE">Kenya

<option value="KW">Kuwait

<option value="KG">Kyrgyzstan

<option value="LA">Laos

<option value="LV">Latvia

<option value="LB">Lebanon

<option value="LS">Lesotho

<option value="LR">Liberia

<option value="LI">Liechtenstein

<option value="LT">Lithuania

<option value="LU">Luxembourg

<option value="MO">Macau

<option value="MK">Macedonia

<option value="MW">Malawi

<option value="MY">Malaysia

<option value="MV">Maldives

<option value="ML">Mali

<option value="MT">Malta

<option value="MH">Marshall Islands

<option value="MQ">Martinique

<option value="MR">Mauritania

<option value="MU">Mauritius

<option value="MX">Mexico

<option value="FM">Micronesia

<option value="MD">Moldova

<option value="MC">Monaco

<option value="MN">Mongolia

<option value="MS">Montserrat

<option value="MA">Morocco

<option value="MZ">Mozambique

<option value="NA">Namibia

<option value="NP">Nepal

<option value="NL">Netherlands

<option value="AN">Netherlands Antilles

<option value="NC">New Caledonia

<option value="NZ">New Zealand

<option value="NI">Nicaragua

<option value="NE">Niger

<option value="NG">Nigeria

<option value="NO">Norway

<option value="OM">Oman

<option value="PK">Pakistan

<option value="PW">Palau

<option value="PS">Palestine Autonomous

<option value="PA">Panama

<option value="PG">Papua New Guinea

<option value="PY">Paraguay

<option value="PE">Peru

<option value="PH">Philippines

<option value="PL">Poland

<option value="PT">Portugal

<option value="PR">Puerto Rico

<option value="QA">Qatar

<option value="RE">Reunion

<option value="RO">Romania

<option value="RU">Russian Federation

<option value="RW">Rwanda

<option value="MP">Saipan

<option value="SA">Saudi Arabia

<option value="SN">Senegal

<option value="SC">Seychelles

<option value="SG">Singapore

<option value="SK">Slovak Republic

<option value="SI">Slovenia

<option value="ZA">South Africa

<option value="KR">South Korea

<option value="ES">Spain

<option value="LK">Sri Lanka

<option value="KN">St. Kitts/Nevis

<option value="LC">St. Lucia

<option value="VC">St. Vincent

<option value="SR">Suriname

<option value="SZ">Swaziland

<option value="SE">Sweden

<option value="CH">Switzerland

<option value="SY">Syria

<option value="TW">Taiwan

<option value="TZ">Tanzania

<option value="TH">Thailand

<option value="TG">Togo

<option value="TT">Trinidad/Tobago

<option value="TN">Tunisia

<option value="TR">Turkey

<option value="TM">Turkmenistan

<option value="TC">Turks & Caicos Islands

<option value="VI">U.S. Virgin Islands

<option value="UG">Uganda

<option value="UA">Ukraine

<option value="AE">United Arab Emirates

<option value="GB">United Kingdom

<option value="UY">Uruguay

<option value="US" selected>U.S.A.

<option value="UZ">Uzbekistan

<option value="VU">Vanuatu

<option value="VE">Venezuela

<option value="VN">Vietnam

<option value="WF">Wallis & Futuna

<option value="YE">Yemen

<option value="YU">Yugoslavia

<option value="ZM">Zambia

<option value="ZW">Zimbabwe

</select><br>

<b>Zip/Postal Code</b><br>

<input type="text" name="origZip" maxlength="8" size="8" value='' ><br>

</td>

<td width="3">     </td>

<td valign="top" align=left width="145">

<b>Ship To</b><br>

<select name="destCountry">

<option value="US" selected>U.S.A.

<option value="AL">Albania

<option value="AS">American Samoa

<option value="AD">Andorra

<option value="AO">Angola

<option value="AI">Anguilla

<option value="AG">Antigua/Barbuda

<option value="AR">Argentina

<option value="AM">Armenia

<option value="AW">Aruba

<option value="AU">Australia

<option value="AT">Austria

<option value="AZ">Azerbaijan

<option value="BS">Bahamas

<option value="BH">Bahrain

<option value="BD">Bangladesh

<option value="BB">Barbados

<option value="BY">Belarus

<option value="BE">Belgium

<option value="BZ">Belize

<option value="BJ">Benin

<option value="BM">Bermuda

<option value="BT">Bhutan

<option value="BO">Bolivia

<option value="BA">Bosnia-Herzegovina

<option value="BW">Botswana

<option value="BR">Brazil

<option value="VG">British Virgin Islands

<option value="BN">Brunei

<option value="BG">Bulgaria

<option value="BF">Burkina Faso

<option value="BI">Burundi

<option value="KH">Cambodia

<option value="CM">Cameroon

<option value="CA">Canada

<option value="CV">Cape Verde

<option value="KY">Cayman Islands

<option value="TD">Chad

<option value="CL">Chile

<option value="CN">China

<option value="CO">Colombia

<option value="CG">Congo Brazzaville

<option value="CD">Congo Democratic Rep. of

<option value="CK">Cook Islands

<option value="CR">Costa Rica

<option value="HR">Croatia

<option value="CY">Cyprus

<option value="CZ">Czech Republic

<option value="DK">Denmark

<option value="DJ">Djibouti

<option value="DM">Dominica

<option value="DO">Dominican Republic

<option value="EC">Ecuador

<option value="EG">Egypt

<option value="SV">El Salvador

<option value="GQ">Equatorial Guinea

<option value="ER">Eritrea

<option value="EE">Estonia

<option value="ET">Ethiopia

<option value="FO">Faeroe Islands

<option value="FJ">Fiji

<option value="FI">Finland

<option value="FR">France

<option value="GF">French Guiana

<option value="PF">French Polynesia

<option value="GA">Gabon

<option value="GM">Gambia

<option value="GE">Georgia

<option value="DE">Germany

<option value="GH">Ghana

<option value="GI">Gibraltar

<option value="GR">Greece

<option value="GL">Greenland

<option value="GD">Grenada

<option value="GP">Guadeloupe

<option value="GU">Guam

<option value="GT">Guatemala

<option value="GN">Guinea

<option value="GY">Guyana

<option value="HT">Haiti

<option value="HN">Honduras

<option value="HK">Hong Kong

<option value="HU">Hungary

<option value="IS">Iceland

<option value="IN">India

<option value="ID">Indonesia

<option value="IE">Ireland

<option value="IL">Israel

<option value="IT">Italy/Vatican City

<option value="CI">Ivory Coast

<option value="JM">Jamaica

<option value="JP">Japan

<option value="JO">Jordan

<option value="KZ">Kazakhstan

<option value="KE">Kenya

<option value="KW">Kuwait

<option value="KG">Kyrgyzstan

<option value="LA">Laos

<option value="LV">Latvia

<option value="LB">Lebanon

<option value="LS">Lesotho

<option value="LR">Liberia

<option value="LI">Liechtenstein

<option value="LT">Lithuania

<option value="LU">Luxembourg

<option value="MO">Macau

<option value="MK">Macedonia

<option value="MW">Malawi

<option value="MY">Malaysia

<option value="MV">Maldives

<option value="ML">Mali

<option value="MT">Malta

<option value="MH">Marshall Islands

<option value="MQ">Martinique

<option value="MR">Mauritania

<option value="MU">Mauritius

<option value="MX">Mexico

<option value="FM">Micronesia

<option value="MD">Moldova

<option value="MC">Monaco

<option value="MN">Mongolia

<option value="MS">Montserrat

<option value="MA">Morocco

<option value="MZ">Mozambique

<option value="NA">Namibia

<option value="NP">Nepal

<option value="NL">Netherlands

<option value="AN">Netherlands Antilles

<option value="NC">New Caledonia

<option value="NZ">New Zealand

<option value="NI">Nicaragua

<option value="NE">Niger

<option value="NG">Nigeria

<option value="NO">Norway

<option value="OM">Oman

<option value="PK">Pakistan

<option value="PW">Palau

<option value="PS">Palestine Autonomous

<option value="PA">Panama

<option value="PG">Papua New Guinea

<option value="PY">Paraguay

<option value="PE">Peru

<option value="PH">Philippines

<option value="PL">Poland

<option value="PT">Portugal

<option value="PR">Puerto Rico

<option value="QA">Qatar

<option value="RE">Reunion

<option value="RO">Romania

<option value="RU">Russian Federation

<option value="RW">Rwanda

<option value="MP">Saipan

<option value="SA">Saudi Arabia

<option value="SN">Senegal

<option value="SC">Seychelles

<option value="SG">Singapore

<option value="SK">Slovak Republic

<option value="SI">Slovenia

<option value="ZA">South Africa

<option value="KR">South Korea

<option value="ES">Spain

<option value="LK">Sri Lanka

<option value="KN">St. Kitts/Nevis

<option value="LC">St. Lucia

<option value="VC">St. Vincent

<option value="SR">Suriname

<option value="SZ">Swaziland

<option value="SE">Sweden

<option value="CH">Switzerland

<option value="SY">Syria

<option value="TW">Taiwan

<option value="TZ">Tanzania

<option value="TH">Thailand

<option value="TG">Togo

<option value="TT">Trinidad/Tobago

<option value="TN">Tunisia

<option value="TR">Turkey

<option value="TM">Turkmenistan

<option value="TC">Turks & Caicos Islands

<option value="VI">U.S. Virgin Islands

<option value="UG">Uganda

<option value="UA">Ukraine

<option value="AE">United Arab Emirates

<option value="GB">United Kingdom

<option value="UY">Uruguay

<option value="US" selected>U.S.A.

<option value="UZ">Uzbekistan

<option value="VU">Vanuatu

<option value="VE">Venezuela

<option value="VN">Vietnam

<option value="WF">Wallis & Futuna

<option value="YE">Yemen

<option value="YU">Yugoslavia

<option value="ZM">Zambia

<option value="ZW">Zimbabwe

</select><br>

<b>Zip/Postal Code</b><br>

<input type="text" name="destZip" size="8" maxlength="8" value="" >

<br>

</td>

</table>

<p>

<b>Shipping to Residence</b><br>

<input type=radio name="shipToResidence" value="true" onclick="checkShipToResidence();">Yes

<input type=radio name="shipToResidence" value="false" checked>No

</p>

<b>Choose type of Service</b>

<br><br>

<table border="0" cellpadding="0" cellspacing="0">

<tr><td nowrap>

<input type=radio name="companyType" value="Express" checked>FedEx Express  </td>

<td>For reliable, time-definite service within the US and to more than 210 countries around the world.</td>

</tr>

<tr><td nowrap>

<input type=radio name="companyType" value="Ground" onclick="checkCompanyType();">FedEx Ground  </td>

<td>For reliable, day-definite delivery to business addresses in the US, Canada and Puerto Rico and to every residential address in the US via FedEx Home Delivery.</td>

</tr>

</tr></table>

<br>

<input type=submit NAME="submitShipInfo" VALUE="Continue">

</form>

<!-- End RateFinder Area -->

Link to comment
Share on other sites

more info... geez this should be easy enough

 

Yea simple stuff *cough*. Actually our company has been talking to some FedEx reps to see if they can get one of their API programmers to do the module for OSCommerce. The way I see it - they really should be motivated to provide the module, cause if there was a live FedEx module for OSCommerce, then ALOT of online stores would start offering FedEx shipping - which means $$$ for FedEx. If FedEx is slow on this and a competitor - say DHL, steps up to the plate and provides a DHL module, then DHL is gonna be making the $$$, not to mention gaining the good will of many online stores. I called the FedEx API dept. directly yesterday and talked to a programmer, and he said "We only provide the api, we don't write code for open source shopping carts."

 

But we'll see... he may be getting a call from someone up the chain of command at FedEx! And if not, then I may be tackling the module, but I won't have time for a few weeks.

Link to comment
Share on other sites

  • 1 month later...

Guys, go to the contributions section of the OSC web site and under shipping modules, you will see a real time Fedex shipping module using the Fedex API. Many people are using this module including myself.

Steve

Link to comment
Share on other sites

Guys, go to the contributions section of the OSC web site and under shipping modules, you will see a real time Fedex shipping module using the Fedex API. Many people are using this module including myself.
I followed the included instruction to install that add-on FedEx module. But got this error during the shopping cart check-out process. "An error occured with the fedex shipping calculations.

Fedex may not deliver to your country, or your postal code may be wrong." Any clues?

 

Which FedEx test gateway are you connecting to? I am using the gateway mentioned in the instruction, gateway.fedex.com/GatewayDC

 

Thanks

-Tuan

Link to comment
Share on other sites

Try searching the various comments in this thread. Most likely, you'll find your answer there.

 

http://www.oscommerce.com/forums/viewtopic.php?t=41799

 

If you follow all of that and still don't have an answer, send me an email directly. But, it does work so you are almost certain to find your answer there. Typical problems include not following all of the setup instructions, not having CURL secure on your server, a bad install of OSC, etc.

Steve

Link to comment
Share on other sites

  • 1 year later...
Any updates on this?

Thanks

-Tuan

 

I downloaded the Fedex Real Time Quotes but i hit some problem.

 

The error msg is below

No meter number was obtained, check configuration. Error 9928 : Unable to register account on FSS.

 

By the way, I'm from Singapore, I tyring to setup the OSC for my friend.

 

I have email to fedex, fedex first reply that the fedex account was not in the test server, and fedex will add the test account into the test server.

 

But is still not solve the issue, I think the real issue is I can't get the meter number?

 

Later, I received another email from fedex will confirm that the API is only support for US and Canada.

 

Anyone can help? Thanks in advance.

Link to comment
Share on other sites

:roll: Am i just totally missing it, but is there an FedEx shipping module available that uses the FedEx APIs?  I've looked all over this site and on Altavista and can't find anything.  Any Ideas?

 

This thread is overflowing with misinformation. I hope no one is spending too much time reinventing the wheel here. Have you tried searching for "fedex" at http://oscommerce.com/community/contributions?

 

There are two that use the API: FedEx Realtime Quotes, and FedEx Automated Labels, which uses FedEx Realtime Quotes during the install.

 

http://www.oscommerce.com/community/contributions,1462

http://www.oscommerce.com/community/contributions,2244

 

Both of these contributions make extensive use of the FedEx API. Both talk directly to FedEx's servers, and both are currently working.

 

There are separate support threads for both contributions elsewhere in these pages.

 

I hope this helps,

 

Michael

Link to comment
Share on other sites

All of a sudden I am getting the following error when entering the checkout_shipping.php page. I have not edited the fedex1.php shipping module file, so I don't know why all of a sudden the error is being generated. Any help would be greatly appreciated. Thanks!

 

Fatal error: Call to undefined function: curl_init() in /home/username/public_html/store/includes/modules/shipping/fedex1.php on line 231

 

 

-Aaron

Link to comment
Share on other sites

I was able to answer my own post....

 

I checked this with our server tech and sure enough several PHP modules were missing from the latest security update to the web server. Once re-configured everything went back to normal. If you have this problem, try contacting your host and making sure they enable cURL.

 

-Aaron

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