Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

FedEx - Web Services v9


greasemonkey

Recommended Posts

getting this error now:

 

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from '/home/content/52/9564952/html/wp-content/plugins/wp-online-store/home/content/52/9564952/html/wp-content/plugins/wp-online-store/includes/wsdl/RateService_v9.wsdl' : failed to load external entity "/home/content/52/9564952/html/wp-content/plugins/wp-online-store/home/content/52/9564952/html/wp-content/plugins/wp-online-store/includes/wsdl/RateService_v9.wsdl" in /home/content/52/9564952/html/wp-content/plugins/wp-online-store/includes/modules/shipping/fedexwebservices.php:70 Stack trace: #0 /home/content/52/9564952/html/wp-content/plugins/wp-online-store/includes/modules/shipping/fedexwebservices.php(70): SoapClient->SoapClient('/home/content/5...', Array) #1 /home/content/52/9564952/html/wp-content/plugins/wp-online-store/includes/classes/shipping.php(158): fedexwebservices->quote('') #2 /home/content/52/9564952/html/wp-content/plugins/wp-online-store/checkout_shipping.php(180): shipping->quote() #3 /home/content/52/9564952/h in /home/content/52/9564952/html/wp-content/plugins/wp-online-store/includes/modules/shipping/fedexwebservices.php on line70

Link to comment
Share on other sites

Got everything working properly now with no errors, but it's still pulling inflated prices.

 

are you quoting ground or express rates? domestic? intl? Which rates are off? details would help

Try enabling ready to ship even if you are not using the feature

And just to check, you do have a rate agreement with fedex right?

-Dave

Link to comment
Share on other sites

  • 2 weeks later...

I have been trying for the last few days to update the webservices module with the "Additional discounts by weight or item count" modification found in the old 2.07 real time quotes module... i'm at a loss, my brain now hurts,no matter what I try I cannot seem to make it work and I'v ereached my frustration point.

 

Would anyone here have the skillset to move this feature from the old module to the new one? it "should" not be difficult as the code essentially exists in 2.07 and just needs to be merged into Webservices, which I dont seem to be able to accomplish (arghh).... feel welcome to contact me directly if you can assist.

 

Dave

-Dave

Link to comment
Share on other sites

  • 3 weeks later...

Just posting an update March 23rd 2013... FedEx has confirmed their webservices are down... They suggested to me at 2:20 PM EST that it would take 20 minutes to fix. It is still not fixed (3:12 PM EST).

 

If your store is down the only way to get back up is to disable the FedEx Shipping Module from your admin (hopefully you have more than one shipping method...).

 

I will post again when I see its fixed.

Link to comment
Share on other sites

Just posting an update March 23rd 2013... FedEx has confirmed their webservices are down... They suggested to me at 2:20 PM EST that it would take 20 minutes to fix. It is still not fixed (3:12 PM EST).

 

If your store is down the only way to get back up is to disable the FedEx Shipping Module from your admin (hopefully you have more than one shipping method...).

 

I will post again when I see its fixed.

 

False alarm... It's now fixed as of 3:17 PM EST... lol...

 

 

 

Link to comment
Share on other sites

False alarm... It's now fixed as of 3:17 PM EST... lol...

 

Does anyone know of a mod in checkout_shipping.php that would allow the page to work properly, showing the other shipping methods when a problem occurs with web services? In other words, instead of a blank page, it just leaves Fed-Ex off if the server does not respond within a given time?

Link to comment
Share on other sites

@@Roaddoctor - or anyone else...

 

Did the FedEx webservices problem yesterday crash your entire site? Or just the checkout_shipping page?

 

I was looking into the error... Keep in mind I'm not a coder... to see why my site crashed at checkout_shipping and didn't just give a error message.

 

There is code to handle errors here for zones and other things:

    if ($this->tax_class > 0) {
       $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }
   } else {
//      $message = 'Error in processing transaction.<br /><br />';
       $message = '<strong>Please enter a ZIP Code to obtain your shipping quote.</strong><br />Or possibly:<br />If no rate is shown, the heavy weight of the item(s) in your Shopping Cart suggests a <strong>Request for Freight Quote</strong>, rather than FedEx Ground service, is recommended.';
     foreach ($response -> Notifications as $notification) {
       if(is_array($response -> Notifications)) {
         $message .= $notification->Severity;
         $message .= ': ';
         $message .= $notification->Message . '<br />';
       } else {
         $message .= $notification->Message . '<br />';
       }
     }
     $this->quotes = array('module' => $this->title,
                           'error'  => $message);

 

And also here for PO Boxes:

 

// po box hack by JD, improved by John W
    if (preg_match('/^P\.?\s?O\.?\s+?BOX/i', $order->delivery['street_address']) || (preg_match('/^P\.?\s?O\.?\s+?BOX/i', $order->delivery['suburb']))) {
       $this->quotes = array('module' => $this->title,
                             'error' => '<font size=+1 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

 

But nothing here (earlier in the file) for "HighestSeverity" failures & errors:

 

   if ($response->HighestSeverity != 'FAILURE' && $response->HighestSeverity != 'ERROR' && is_array($response->RateReplyDetails) || is_object($response->RateReplyDetails)) {
     if (is_object($response->RateReplyDetails)) {
       $response->RateReplyDetails = get_object_vars($response->RateReplyDetails);
     }

 

Just not sure how to include the "HighestSeverity" errors in the $message

 

Scott

Link to comment
Share on other sites

Just looking more into this... The failure was here with the response from the fedex;

 

    $response = $client->getRates($request);

 

And was returned as a SoapFault....

 

Maybe we could hack up something like this to work?

 

     if ($response->SoapFault != 'ERROR' && $response->HighestSeverity != 'FAILURE' && $response->HighestSeverity != 'ERROR' && is_array($response->RateReplyDetails) || is_object($response->RateReplyDetails)) {
     if (is_object($response->RateReplyDetails)) {
       $response->RateReplyDetails = get_object_vars($response->RateReplyDetails);
     }

 

 

Scott

Link to comment
Share on other sites

The only thing I've figured out so far is how to reproduce the error...

 

Just change the gateway url (to anything) in the wsdl file - this will simulate "no reply" from the server.

 

We needs some sort of if statement...but its beyond my skill...

 

if ($client = "SoapFault") {

echo "SoapFault: ";

 

Is the best I could do...

 

Link to comment
Share on other sites

Hi,

 

I just installed the module and all is working well. I have a couple questions:

 

1) how is the home delivery option calculated? I set it to 3 in the admin, but how does the module "know" when it is a home address? It would be great if it were automatic, but that does not seem to be the case.

2) is there a way to show ETA? If I keep all the options the users might not know the difference between all the options.

 

Thanks

Link to comment
Share on other sites

@@sackling

 

1. For Ground service, in most shops if there is a Company Name in the company_name field they should get Ground rates, else Home rates. I don't think it matters on the express side, never tested that. (I only use ground, sorry) It works this way on my 2.2rc2a shop.

2. You would have to code that in, but it is possible. On Ground it states how many expected days, again I haven't paid much attention on the express side.

-Dave

Link to comment
Share on other sites

The only thing I've figured out so far is how to reproduce the error...

 

Just change the gateway url (to anything) in the wsdl file - this will simulate "no reply" from the server.

 

We needs some sort of if statement...but its beyond my skill...

 

if ($client = "SoapFault") {

echo "SoapFault: ";

 

Is the best I could do...

 

It would be preferred to disable the module wqhen the FedEx server is, for whatever reacxhable, not accessible. If someone could produce some code, it wopuld help out more than a few. Thanx.

Link to comment
Share on other sites

Thanks for clearing that up roaddoctor, makes sense.

 

So now everything is working. This addon has none of the label printing/ tracking capabilities of the older fedex module does it?

 

and if not, is there one that is best to install that works with oscommerce 2.3?

 

or should I start hacking away at: http://addons.oscommerce.com/info/2244 to try and get it to work?

Link to comment
Share on other sites

@@imagixx

@@greasemonkey

 

This is just to test - don't update your live servers

 

How about:

 

Find

$response = $client->getRates($request);

 

replace with

try {
$response = $client->getRates($request);

 

find

return $this->quotes;

 

replace with

} catch (Exception $e) {
 $this->quotes = array('module' => $this->title,
					 'error' => 'Sorry, the FedEx.com server is currently not responding, please try again later.');
}
return $this->quotes;

 

Have not had a chance to test this yet - feedback appreciated

-Dave

Link to comment
Share on other sites

Just noticed an error in 9.4.3.1

 

find

   $request['RequestedShipment']['TotalInsuredValue']=array('Ammount'=> $this->insurance, 'Currency' => $_SESSION['currency']);

 

replace with

   $request['RequestedShipment']['TotalInsuredValue']=array('Amount'=> $this->insurance, 'Currency' => $_SESSION['currency']);

 

noticed the extra "m" in amount

 

I'm slowly working on an update using V10 of the wsdl and incorporating full Address Verification. Hopefully soon

-Dave

Link to comment
Share on other sites

Did you run the SQL file on your database? The error says the database field is missing

 

the sql file only add products_ship_sep not have products_ready_to_ship field added

 

<?php

require('includes/application_top.php');

$result = tep_db_query("ALTER TABLE products ADD products_ship_sep BOOL NOT NULL DEFAULT 0")

or die("Invalid database modifying: " . mysql_error());

if($result)

echo "Your database was successly modified.";

?>

Link to comment
Share on other sites

We're sorry, but an error occured while calculating the FedEx Freight shipping prices.

FedEx Freight returned an error or invalid response.

http://www.fedexfreight.fedex.com/XMLRating.jsp?as_shipterms=prepaid&as_shzip=60611&as_shcntry=US&as_cnzip=32008&as_cncntry=US&as_iamthe=shipper&as_acctnbr=510087941&as_class1=055&as_weight1=22&as_pcs1=1&as_descr1=dsfdsfsdf&as_nmfc1=dsfdsfdsf&as_haz1=1&as_freezable1=1

 

Can anyone tell me why this error coming?

 

Thanks in advance

Link to comment
Share on other sites

@@arundiundi

I've never used the Freight section... but do you have a FREIGHT rate agreement with FedEx? Freight is a separate agreement than ground or express.

 

It also looks like your rating as Class 55, With only weight of 22 lbs, as yes hazmat, and as requires freeze protection. That's going to be an expensive quote for 22 lbs....

Edited by Roaddoctor

-Dave

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