Jump to content
Sign in to follow this  
spoot

Automated FedEx Labels

Recommended Posts

We're not using the FedEx shipping module. My client wants to have flat shipping rates. I do have the FedEx module installed, but not enabled.

 

I was getting broken images before, then I realized that my "images" folder wasn't chmod 777. Once I changed that to 777, double checked fedex was 777, I get the "Meter logon" error.

 

I didn't think I had to have the FedEx shipping module enabled, just installed.

 

Thanks!

 

You need to enable FedEx and do the test order to get a meter number. Then don't remove FedEx...just disable it by setting it to False. The ship label contribution piggybacks the FedEx ship module for the config info.

Share this post


Link to post
Share on other sites
Michael (spoot) - any chance you can help us out with this?  I didn't write the module, so I have no idea as to how to get it fixed (nor am I that proficient with PHP), so I would appreciate if someone could get these fixed. 

 

It seems odd that someone would post an enhancement to an already great time saving contribution, but then not have time to correct a few small bugs.

 

John -

 

I'm also busy, with a move and many other things. If these bugs were small, I may have time to look at them in the next week or so, but they don't sound small to me.

 

Also: everyone here does this in their spare time, and as I'm sure you know, sometimes there's not much spare time to go around. There's nothing odd about a person posting a substantial & valuable update to an open-source application, then getting swamped by other projects.

 

Can we get these two issues corrected ASAP?

Please try to avoid showing impatience with the people who are providing this software, and enhancements to this software, at no cost to you. The best option, if you're in need of an immediate fix, is to hire a freelance PHP coder.

 

Michael

Share this post


Link to post
Share on other sites
Please try to avoid showing impatience with the people who are providing this software, and enhancements to this software, at no cost to you. The best option, if you're in need of an immediate fix, is to hire a freelance PHP coder.

 

Don't get me wrong - I love all of the add-ons and the core product itself. I'm just a little frustrated. If it were my contrib, I'd want it to work properly, otherwize it would "bug" the heck out of me knowing there are issues, and that it may be preventing others from using it.

 

I guess I'll take a look at the code and see if I can figure it out, then post it here.


John Skurka

Share this post


Link to post
Share on other sites

I seem to be having a new problem. Everything was working fine until today when I tried to cancel a package (which I have done before successfully) it says "ERROR: FedEx Return Error 1F25 : Ship date must be 8 digits CCYYMMDD format."

 

How can I fix this?

 

Thank you for your help!


Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites
Don't get me wrong - I love all of the add-ons and the core product itself.  I'm just a little frustrated.  If it were my contrib, I'd want it to work properly, otherwize it would "bug" the heck out of me knowing there are issues, and that it may be preventing others from using it.

 

I guess I'll take a look at the code and see if I can figure it out, then post it here.

 

That's the spirit.

 

It's true that it's annoying to know that your project has bugs; and because of that, they'll eventually be fixed. But you've got to prioritize, & I prioritize this particular project well below a stable income and about 14 other things in my life.

 

But it'll get done, esp. if everyone dives into the code. If you can't fix it, you may be able to find the place(s) in the code where things are going awry - that'd speed things along, I'm sure.

 

Sorry about the lecture.

 

Michael

Share this post


Link to post
Share on other sites
Can we get these two issues corrected ASAP?

 

Hi, I've posted the bug fixes and added small enhancements in v1.06. Thanks for the patience.

 

Michael: No lecture....just a timely reminder. :) People don't realise the amount of work to contribute..and answering PMs etc. But anyway, I managed to steal some time to update ... before I disappear again. :P Have you tried using the newer fedexdc.php from vermonster? I wonder if it is worth the effort to update to the latest version.


- The Jackal

Share this post


Link to post
Share on other sites

Would some of you guys mind trying to cancel a shipment?

 

I think this bug affects everyone, I'm guessing it is a new required field for canceling because I cannot find it in the cancel array and my FedEx labels install canceled packages perfectly until recently


Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites

Hi all,

 

Has anyone gotten the cancel shipment error figured out? The error is:

 

ERROR: FedEx Return Error 1F25 : Ship date must be 8 digits CCYYMMDD format.

 

I tried the debug mode when I click on the cancel shipment button, but that error just keeps popping up instead.

 

Thanks!

 

Chris B.

Share this post


Link to post
Share on other sites
Hi all,

 

Has anyone gotten the cancel shipment error figured out? The error is:

 

ERROR: FedEx Return Error 1F25 : Ship date must be 8 digits CCYYMMDD format.

 

I tried the debug mode when I click on the cancel shipment button, but that error just keeps popping up instead.

 

Thanks!

 

Chris B.

 

 

I found a fix to this cancel error I think. It actually has to do with the wrong code being sent to fedex for some reason the 023 cancel code is not sent, it is the 19 code.

 

My fix, change:

////
// cancel a scheduled shipment

 if($action=='cancel') {
 
	 if (!$order) {
   echo ERROR_NO_ORDER_SPECIFIED;
   }
	 elseif ($order) {

   require(DIR_WS_INCLUDES . 'fedexdc.php');
   $transaction_code = 023;
   
// get required config variables
   $fedex_vars = array (
   10=>'MODULE_SHIPPING_FEDEX1_ACCOUNT',
   498=>'MODULE_SHIPPING_FEDEX1_METER'
   );

// determine if we're using test or production gateway
	 $value_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_FEDEX1_SERVER'");
	 $value = tep_db_fetch_array($value_query);
	 $fedex_gateway = $value['configuration_value'];
  	 
	 $i = 0;
	 $fedex_keys = array_keys($fedex_vars);
   
	 foreach($fedex_vars as $var) {
   $value_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = '" . $var . "'");
   $value = tep_db_fetch_array($value_query);
   $value = $value['configuration_value'];
 
   $fedex_vars[$fedex_keys[$i]] = $value;

   $i++;
	 }   	 
  	 
// create new FedExDC object
	 $fed = new FedExDC($shipVars[0][10],$shipVars[1][498]);
   
// get the tracking number from the order record
	 $fedex_tracking_query = tep_db_query("select fedex_tracking from " . TABLE_ORDERS . " where orders_id = '" . $order . "'");
	 $r = tep_db_fetch_array($fedex_tracking_query);
	 $fedex_tracking = $r['fedex_tracking'];
	 
// get the shipment type from the shipping manifest
	 $ship_type_query = tep_db_query("select shipping_type from " . TABLE_SHIPPING_MANIFEST . " where orders_id = '" . $order . "'");
	 $ship_type = tep_db_fetch_array($ship_type_query);
	 if (($ship_type['shipping_type'] == 90) or ($ship_type['shipping_type'] == 92)) {
   $ship_type = 'FDXG';
   }
	 else {
   $ship_type = 'FDXE';
   }
   
// simple array with transaction code, tracking number, carrier code
	 $cancelData = array (
   0 => $transaction_code,
   1 => ORDER_NUMBER . $order, // order number, optional
   29 => $fedex_tracking,
   3025 => $ship_type
   );
   
	 $cancelData = $fedex_keys+$cancelData;
   
// remove shipment data from the shipping manifest
	 $delete_manifest_query = tep_db_query("delete from " . TABLE_SHIPPING_MANIFEST . " where orders_id = '" . $order . "'");
	 if ($delete_manifest_query) {
   }
	 elseif (!$delete_manifest_query) {
   echo COULD_NOT_DELETE_ENTRIES;
   }

TO:

 

// cancel a scheduled shipment

 if($action=='cancel') {

	 if (!$order) {
   echo ERROR_NO_ORDER_SPECIFIED;
   }
	 elseif ($order) {

   require(DIR_WS_INCLUDES . 'fedexdc.php');
   $transaction_code = 023;


// determine if we're using test or production gateway
	 $value_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_FEDEX1_SERVER'");
	 $value = tep_db_fetch_array($value_query);
	 $fedex_gateway = $value['configuration_value'];

	 $i = 0;
	 $fedex_keys = array_keys($fedex_vars);

	 foreach($fedex_vars as $var) {
   $value_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = '" . $var . "'");
   $value = tep_db_fetch_array($value_query);
   $value = $value['configuration_value'];

   $fedex_vars[$fedex_keys[$i]] = $value;

   $i++;
	 }

// create new FedExDC object
	 $fed = new FedExDC($shipVars[0][10],$shipVars[1][498]);

// get the tracking number from the order record
	 $fedex_tracking_query = tep_db_query("select fedex_tracking from " . TABLE_ORDERS . " where orders_id = '" . $order . "'");
	 $r = tep_db_fetch_array($fedex_tracking_query);
	 $fedex_tracking = $r['fedex_tracking'];

// get the shipment type from the shipping manifest
	 $ship_type_query = tep_db_query("select shipping_type from " . TABLE_SHIPPING_MANIFEST . " where orders_id = '" . $order . "'");
	 $ship_type = tep_db_fetch_array($ship_type_query);
	 if (($ship_type['shipping_type'] == 90) or ($ship_type['shipping_type'] == 92)) {
   $ship_type = 'FDXG';
   }
	 else {
   $ship_type = 'FDXE';
   }

// simple array with transaction code, tracking number, carrier code
	 $cancelData = array (
   0 => '023',
   1 => ORDER_NUMBER . $order, // order number, optional
   10=> MODULE_SHIPPING_FEDEX1_ACCOUNT,
   29 => $fedex_tracking,
   498=> MODULE_SHIPPING_FEDEX1_METER,
   3025 => $ship_type
   );


// remove shipment data from the shipping manifest
	 $delete_manifest_query = tep_db_query("delete from " . TABLE_SHIPPING_MANIFEST . " where orders_id = '" . $order . "'");
	 if ($delete_manifest_query) {
   }
	 elseif (!$delete_manifest_query) {
   echo COULD_NOT_DELETE_ENTRIES;
   }

 

 

Just moved around some code and hardcoded the cancel code for canceling


Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites
Hi all,

 

Has anyone gotten the cancel shipment error figured out? The error is:

 

ERROR: FedEx Return Error 1F25 : Ship date must be 8 digits CCYYMMDD format.

 

I tried the debug mode when I click on the cancel shipment button, but that error just keeps popping up instead.

 

Thanks!

 

Chris B.

 

Sup Everybody,

I believe I found a simpler solution than homewetbar, regarding this issue. Been playing around with it for a coupel of hours. Here it is. Thanks.

 

In /admin/ship_fedex.php

 

Around line 392 change:

$transaction_code = 023;

to

$transaction_code = "023";

 

Around line 420 change:

$fed = new FedExDC($shipVars[0][10],$shipVars[1][498]);

to

$fed = new FedExDC($fedex_vars[10],$fedex_vars[498]);

Share this post


Link to post
Share on other sites
You need to enable FedEx and do the test order to get a meter number.  Then don't remove FedEx...just disable it by setting it to False.  The ship label contribution piggybacks the FedEx ship module for the config info.

 

Thanks, cdi, I've got this problem worked out. Am on FedEx test server and going through the process of certification.

 

 

Again, thanks for your help on this one.

 

Chris B.

Share this post


Link to post
Share on other sites
Sup Everybody,

I believe I found a simpler solution than homewetbar, regarding this issue. Been playing around with it for a coupel of hours. Here it is. Thanks.

 

In /admin/ship_fedex.php

 

Around line 392 change:

$transaction_code = 023;

to

$transaction_code = "023";

 

Around line 420 change:

$fed = new FedExDC($shipVars[0][10],$shipVars[1][498]);

to

$fed = new FedExDC($fedex_vars[10],$fedex_vars[498]);

 

That works! However :-" the order status is updated to "Processing" not "Cancelled"...

To change status to "Cancelled":

 

In /admin/ship_fedex.php

 

Around line 468 change:

// ...mark the order record "pending"...

$update_status = array ('orders_status' => 2);

tep_db_perform(TABLE_ORDERS, $update_status, 'update', "orders_id = '" . $order . "'");

 

to

 

// ...mark the order record "cancelled"...

$update_status = array ('orders_status' => 6);

tep_db_perform(TABLE_ORDERS, $update_status, 'update', "orders_id = '" . $order . "'");

 

Notice that it says "mark the order record 'pending'" - order status 2 = processing

 

Around line 472 change:

// ...add a comment to the order history to show what we've done...

$fedex_comments = ORDER_HISTORY_CANCELLED . $trackNum;

 

tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . $order . "', 2, now(), '', '" . $fedex_comments . "')");

 

to

 

// ...add a comment to the order history to show what we've done...

$fedex_comments = ORDER_HISTORY_CANCELLED . $trackNum;

 

tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . $order . "', 6, now(), '', '" . $fedex_comments . "')");

 

(Yay! I can finally contribute to this contribution! :D )

 

Chris B.

Share this post


Link to post
Share on other sites
(Yay! I can finally contribute to this contribution!  :D )

 

Chris B.

 

Chris -

 

Right on. It's great to see all these updates, & especially to see the "cancel" bug fixed - that's been a pain in the butt.

 

If/when you add your contribution, be sure to consolidate (if necessary) releases 1.06 and 1.07 - I believe ship_fedex.php was altered separately by both.

 

Alright great work thanks everyone!

 

Michael

Share this post


Link to post
Share on other sites

Has anyone gotten the request courier function to work in fedex labels?

Share this post


Link to post
Share on other sites

To those that have struggled to figure out how to get your FedEx Thermal Labels to print out locally to your Eltron / Zebra printer from your server..... here's something I found that works great.

 

Been struggling with this for weeks, emailed FedEx, emailed others, scoured google - with no luck.

 

Here's the short story, if you need details, post and I'll reply.

 

A. Create a unique email address dedicated to just labels (will make sense later)

 

1. Send your data to Fedex

2. Save the returned shipping label to a file on the server as XXX.prn (XXX being whatever you wanna call it - I use the tracking number)

3. create an email, and attach the newly created XXX.prn file. Send this email to the unique email address you created in step A.

 

B. go get this sofware: http://www.mail-print.com/

It's a cool little app that runs in the background (windows) that checks a email address at a interval you declare, or you can manually check for mail. It checks the mailbox you setup in step A for email, and if there's an attachment it will send that directly to your thermal printer. Friggn sweet.

 

Setup The MailPrint Software

1. click New

2. Enter your Mail Sever, Account Name etc

3. Print Settings: Select your Eltron / Zebra Printer

4. Content: select Print attachments only.

5. click OK.

 

You can adjust other options by clicking on..... options button.

 

The downside... the software has a 30 day free trial, but after that it's $99 bucks. Is exactly what I needed, was about to give up.

 

Hope this helps! :lol:

Share this post


Link to post
Share on other sites

Sounds like a PITA when I can just use the free FedEx half sheet laser labels in the meantime.

 

I've got a question about the FedEx rate module...how can I disable international rates? I already commented out all the lines for the methods but it gives me a rates not returned error. I just wanna hide FedEx altogether for all non-USA orders - kinda like you can do with USPS choice or UPS by zone.

Edited by cdi-buy.com

Share this post


Link to post
Share on other sites
Has anyone gotten the request courier function to work in fedex labels?

 

 

You really don't need that if you are shipping regularly, just call your fedex rep and tell them you want daily shipment pickup and you're done (P.S. fedex charges a fee, $12 I believe per week regardless of how many times they come or how many packages you ship)


Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites
Sounds like a PITA when I can just use the free FedEx half sheet laser labels in the meantime.

 

I've got a question about the FedEx rate module...how can I disable international rates?  I already commented out all the lines for the methods but it gives me a rates not returned error.  I just wanna hide FedEx altogether for all non-USA orders - kinda like you can do with USPS choice or UPS by zone.

 

 

Took me about 1/2 hr to write the code. Was easy. send email with attachment, read email, print email.

 

So, you're printing the laser labels and shrinkng them?

Share this post


Link to post
Share on other sites

You can't use laser labels on a thermal. They're 2 completely different types of labels. Even the barcodes themselves are different.

 

I print a laser label (half sheet size) on their free half sheet size label sticky paper. It has a non-sticky receipt area below the label itself which is perforated...so when the two buttons are printed out, they go on the tear-off receipt portion and get tossed in the trash since this system doesn't print a receipt.

Share this post


Link to post
Share on other sites
Does anyone know how to add "Signature Confirmation" as an option? I think it's something we can add to the ship_fedex.php file around line 490 or so where it builds the arrays for shipping options. If not, where does it go? Thanks in advance.

 

Has anyone gotten anywhere with the signature required option? I have to get it working before i sumit my samples so i can get on the production server.

 

Cheers to anyone that has added the option of signature required and if you coupld please post what you did to get it working that'd be great.

Share this post


Link to post
Share on other sites
I wish signature was an option as well.  I have no idea how it would be coded though.

 

 

I've been trying to even find anything about it on the fedex site and cant find a thing :( I know it can be done, its in the sample labels in that massive PDF file.

 

This contrib is great so far but i cant even use it unless its got signature required.

Share this post


Link to post
Share on other sites

alright...

 

this is in the fedexdc.php file right at the end... theres gotta be a way to get this working...

 

        /**
       * Signature Proof of Delivery
       *
       * @param    $aData array values to send to FedEx
       * @return   string
       * @access   private
       */
       function sig_proof_delivery ($aData) {
               $this->image_key = 1471;
               $this->setData(5001, $aData);
               if ($aRet = $this->transaction()) {
                   return $aRet;
               } else {
                   $this->setError('unable to process sig_proof_delivery');
                   return false;
               }
       }

 

I've tried adding ,5001 => 'Y' to the $shipData array but nothing.. :(

 

i'm no programmer so kinda lacking the skills to do this but trying real hard.

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  

×