Jump to content



Latest News: (loading..)

- - - - -

Automated FedEx Labels


  • Please log in to reply
713 replies to this topic

#1   spoot

spoot
  • Members
  • 199 posts
  • Real Name:michael

Posted 07 July 2004 - 05:20 AM

The automated fedex labels contribution is an addition to the administrative pages that retrieves label data from FedEx.

To use this contribution, you must have a FedEx account number.

In order to get on FedEx's production server, you must contact FedEx directly. They will have you, uh, FedEx your printed labels to them. When they give you their OK, you can go live. These labels come directly from FedEx, so they should pass the test.

#2   SteveC

SteveC
  • Members
  • 2 posts
  • Real Name:Steve Catanzaro

Posted 09 July 2004 - 09:05 PM

I put the contribution on my test system and i am getting a cURL error :
------------------
This transaction could not be completed. Please note the error message below.

ERROR: cURL ERROR: 60: error setting certificate verify locations
unable to process ship_ground
-------------------
I've been using the fedex direct rates with out a problem, so I think cURL is operating correctly.

The error has to do with certificate read or access problems. I don't know if it's my machine or Fedex. On this machine I set the complete path and crt files world readable/writeable still get same error.

I searched the forums and all I came up with was payment module problems having to do with self certification.
Has any one had this problem Fedex or have a fix?

two more minor problems:
Can only ship ground or home delivery in contrib ship_fedex.php page.
     - wanted to test regular fedex shipping. need to modify page to allow reg fedex.
manifest picks up customer placing order as send to name rather than shipping name when using another address book name and address.


Running suse linux 9.0, apache 1.3,
php 4.3.3

All pathes up to date.
CURL:
enabled  
CURL Information  libcurl/7.10.5 OpenSSL/0.9.7b ipv6 zlib/1.1.4  

Any help or advice would be apperciated.

Thanks

#3   spoot

spoot
  • Members
  • 199 posts
  • Real Name:michael

Posted 09 July 2004 - 09:27 PM

Quote

------------------
This transaction could not be completed. Please note the error message below.

ERROR: cURL ERROR: 60: error setting certificate verify locations
unable to process ship_ground
-------------------

Check the variables at the top of the two fedexdc.php files.

$server = 'test'; // which fedex server to use: test or production
$request_referer = 'localhost'; // base url for site, e.g.: 'yoursite.com'

They should say something like that. You probably have to change the request_referer variable to an appropriate server name for your system. (This was the case for me when I had a similar cURL error.)

I'll try to add some administrative features in a later release, though for some reason I found they were hard to access with fedexdc.php - I forget why though.

Quote

Can only ship ground or home delivery in contrib ship_fedex.php page.

That's because I'd commented all the other options out of ship_fedex.php, & forgot to uncomment them. The options start at line 472; leave as many or as few in as you like.

Quote

manifest picks up customer placing order as send to name rather than shipping name when using another address book name and address.

That's an oversight - I never messed with the manifest & address book entries. I'll try to make an update soon.

I hope this helps, let me know how it goes -

Michael

#4   rkoechel2004

rkoechel2004
  • Members
  • 126 posts
  • Real Name:Ryan
  • Gender:Male
  • Location:Madison, WI

Posted 12 July 2004 - 06:02 PM

I'm getting two error messages when using this contrib. any ideas on them?

when opening
catalog/track_fedex.php:

Warning: fopen(images/fedex/post.txt): failed to open stream: No such file or directory in /home/u2/fontanasports/html/catalog/includes/fedexdc.php on line 309

Warning: fwrite(): supplied argument is not a valid stream resource in /home/u2/fontanasports/html/catalog/includes/fedexdc.php on line 310
ERROR :FedEx Return Error 500139 : No scan record for this shipment has been received by our system yet. Please try again later or contact Customer Service at 1.800.Go.FedEx® 800.463.3339.

when opening
catalog/admin/track_fedex.php:

Warning: main(DIR_WS_MODULES_SHIPPINGfedexdc.php): failed to open stream: No such file or directory in /home/u2/fontanasports/html/catalog/admin/track_fedex.php on line 11

Warning: main(): Failed opening 'DIR_WS_MODULES_SHIPPINGfedexdc.php' for inclusion (include_path='.:') in /home/u2/fontanasports/html/catalog/admin/track_fedex.php on line 11

Fatal error: Cannot instantiate non-existent class: fedexdc in /home/u2/fontanasports/html/catalog/admin/track_fedex.php on line 15


any ideas would be appreciated

Ryan
rkoechel2004

#5   spoot

spoot
  • Members
  • 199 posts
  • Real Name:michael

Posted 12 July 2004 - 06:28 PM

Ryan -

On line 11 of admin/track_fedex.php, change:


include(DIR_WS_MODULES_SHIPPING . 'fedexdc.php');


to


include(DIR_WS_INCLUDES . 'fedexdc.php');


I've posted a new version that includes this fix.

Michael

#6   rkoechel2004

rkoechel2004
  • Members
  • 126 posts
  • Real Name:Ryan
  • Gender:Male
  • Location:Madison, WI

Posted 12 July 2004 - 11:18 PM

Problem fixed

Thanks
rkoechel2004

#7   rkoechel2004

rkoechel2004
  • Members
  • 126 posts
  • Real Name:Ryan
  • Gender:Male
  • Location:Madison, WI

Posted 12 July 2004 - 11:25 PM

Michael-

One other thing.  When a customer tries to track the status, they get an

Warning: fopen(images/fedex/post.txt): failed to open stream: No such file or directory in /home/u2/fontanasports/html/catalog/includes/fedexdc.php on line 309

Warning: fwrite(): supplied argument is not a valid stream resource in /home/u2/fontanasports/html/catalog/includes/fedexdc.php on line 310
ERROR :FedEx Return Error 500139 : No scan record for this shipment has been received by our system yet. Please try again later or contact Customer Service at 1.800.Go.FedEx® 800.463.3339.


*******
This is because its calling on /images/fedex/post.txt, when in fact this file is located in /admin/images/fedex/post.txt .

Ryan
rkoechel2004

#8   spoot

spoot
  • Members
  • 199 posts
  • Real Name:michael

Posted 12 July 2004 - 11:56 PM

Oh, heck. Try replacing fedexdc.php line 309. It's currently:

$fp = fopen('images/fedex/post.txt', 'w');

Change to:

$fp = fopen('../images/fedex/post.txt', 'w');

There's no catalog/images/fedex directory, so I don't know why this would work... but it works on my test server.

If you change that line & it still gives an error, make a catalog/images/fedex directory & chmod it to 777.

#9   Merlintx1969

Merlintx1969
  • Members
  • 100 posts
  • Real Name:Tony Corbett

Posted 28 July 2004 - 01:54 AM

When using this module and requesting a courier, will fedex get the information that I am requesting or do I still need to call?

#10   spoot

spoot
  • Members
  • 199 posts
  • Real Name:michael

Posted 28 July 2004 - 03:54 AM

Quote

When you use this module will it automaitcally let fedex know you requested a courier or do I need to do it manually
and does the billing go in when I print the label or when fedex picks em up?

and does cancel ship actually connect with fedex and cancell it there?

When you request a shipment, it's sending the request directly to FedEx. You tell them the date you want the pickup, and they should arrive on that date. (If they don't, it's their fault, not the module's.)

Cancel shipment connects directly to FedEx and cancels the shipment request for that package. (If there are multiple packages going out on that same day, FedEx should still show up to pickup the non-cancelled packages.)

#11   WholesaleMN

WholesaleMN
  • Members
  • 190 posts
  • Real Name:Charles Speckman
  • Location:Minnesota, USA

Posted 03 August 2004 - 03:32 AM

How well does this work if you already have a daily pickup.  Also do you have some screen shots of how this works?  Let me know.  I may need some assistence installing.  :)
Best of luck!
Charles

Installed Contributions:
MS2
USPS
UPS
PayPal IPN
2CheckOut
Some other too that I am trying to figure out!
-To all OSC programmers: Thank you for all your hard work put into this application!

#12   rivrgroup

rivrgroup
  • Members
  • 3 posts
  • Real Name:Gio

Posted 10 August 2004 - 10:23 AM

Does anyone know were i can change the code that would send notifaction to the customer and change the status to shipped instead of delivered? Is this possible


Date Added Customer Notified Status Comments
08/10/2004 06:00:52  Pending  
08/10/2004 06:04:12  Delivered Scheduled shipment, tracking number

#13   spoot

spoot
  • Members
  • 199 posts
  • Real Name:michael

Posted 12 August 2004 - 12:29 PM

WholesaleMN, on Aug 3 2004, 03:32 AM, said:

How well does this work if you already have a daily pickup.  Also do you have some screen shots of how this works?  Let me know.  I may need some assistence installing.  :)
I started putting together a set of screen shots, but haven't finished it up just yet.

If you already have a daily pickup, you'll still get most of the benefits of this program: the labels labels and manifest created without having to reenter customer or order information anywhere, tracking data stored with the order, maybe some other stuff.

#14   spoot

spoot
  • Members
  • 199 posts
  • Real Name:michael

Posted 12 August 2004 - 12:37 PM

rivrgroup, on Aug 10 2004, 10:23 AM, said:

Does anyone know were i can change the code that would send notifaction to the customer and change the status to shipped instead of delivered? Is this possible


Date Added Customer Notified Status Comments
08/10/2004 06:00:52  Pending   
08/10/2004 06:04:12  Delivered Scheduled shipment, tracking number
I believe all you need to do is:

- Add a "Shipped" option to the orders_status table with, say, an orders_status_id of 4.

- Change line 333 in ship_fedex.php:

[CODE[// ...mark the order record "delivered"...
$update_status = array ('orders_status' => 3);[/CODE]

Here, you'd want to change 'orders_status' => 3 to 'orders_status' => 4.

I may be missing something, but I think that's all you'll need to do. This seems like a useful feature.

Michael

#15   SteveC

SteveC
  • Members
  • 2 posts
  • Real Name:Steve Catanzaro

Posted 25 August 2004 - 03:52 PM

I’ve finally had time to look at this mod again and fix the error message:

ERROR: cURL ERROR: 60: error setting certificate verify locations

My research indicates using libcurl 7.xx or higher requires peer certificate verification when using ssl by default.  It seems SuSe 9.1 openssl  does not load the Certificate Authorities  and adjust the ca-path  automatically. I don’t have the time to look into setting the paths, but I have found a fix.

In fedexdc.php around line 293 in function _sendCurl() add:

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false):

This turns off the peer verification – not the most secure way of fixing the problem, but it works

#16   HTMLguru2

HTMLguru2
  • Members
  • 45 posts
  • Real Name:Jeff Hoffman

Posted 30 August 2004 - 01:39 PM

Michael,

Works great. Couple of questions though. We have a Zebra thermal printer (supplied by FedEx) that we want to use. I see how to change the paper/printer/size variables in the string but I haven't figured out how to take the raw printer data coming back from FedEx and push it to ,in our case, LPT1 on the client interface. If we try to save this "ZPL2" file format it strips out the special characters and is then unusable.

Have you had any luck with thermal printer integration?

Jeff

#17   spoot

spoot
  • Members
  • 199 posts
  • Real Name:michael

Posted 02 September 2004 - 03:10 PM

HTMLguru2, on Aug 30 2004, 01:39 PM, said:

Have you had any luck with thermal printer integration?
Jeff -

I haven't tried anything but plain paper labels. To try a different label, though, edit lines 139 and/or 140 in ship_fedex.php:

,1369 => 1 // printer type (1 is laser)
,1370 => 5 // label media (5 is plain paper)

The options for each are:

1369:
1 = laser printer
2 = eltron orion (epl2)
3 = eltron eclipse (epl2)
4 = zebra zpl
5 = unimark

1370:
3 = Format 354 with doc tab information at bottom of label (4x6 ¾ thermal label)
4 = Format 435 without doc tab information (4x6 thermal label)
5 = Plain paper (PNG) - Supported for FedEx Ground and Express Shipping.
6 = Format 354 with doc tab information at top of label (4x6 ¾ thermal label)

Let me know how it goes -

Michael

#18   HTMLguru2

HTMLguru2
  • Members
  • 45 posts
  • Real Name:Jeff Hoffman

Posted 02 September 2004 - 04:01 PM

Michael,

I saw the output string vaviables. Unfortunatly it's not that easy. When you select to receive the label data from FedEx for a thermal printer. The data you receive is raw data (not an image) that needs to be decoded by the thermal printer itself. The issue then is how to get the data string coming back from FedEx to go directly into the thermal printer.

FedEx has a ActiveX controller that is prompt when you use the web service (fedex.com) to print thermal labels. I'm trying to use that controller with the admin' browsers interface of OSC.

Jeff

#19   spoot

spoot
  • Members
  • 199 posts
  • Real Name:michael

Posted 02 September 2004 - 04:15 PM

Oh, right - we have to decode the PNG, so of course we have to decode whatever else we might be getting for the other formats. Damn. If I find any other options I'll let you know.

#20   spoot

spoot
  • Members
  • 199 posts
  • Real Name:michael

Posted 02 September 2004 - 08:29 PM

HTMLguru2, on Sep 2 2004, 04:01 PM, said:

The data you receive is raw data (not an image) that needs to be decoded by the thermal printer itself.
Jeff -

According to Jay Powers (the guy who made the fedexdc class this module uses):

Jeff Powers said:

Other than PNG the label data returned from FedEx is plain text.  You just need to pipe it to a printer that accepts the chosen format.

Could this be true? Or is he talking crazy talk?

Let me know what you find out -

Michael