Jump to content
Sign in to follow this  
spoot

Automated FedEx Labels

Recommended Posts

...but that did not work either

What did not work? Did the test script write correctly to the file?


- The Jackal

Share this post


Link to post
Share on other sites
What did not work? Did the test script write correctly to the file?

Yes the test script worked just fine, but the error still appears. Do you have any ideas about the first problem?


Anyone can buy a camera... it's what you do with it that counts!

Sticky Pod

www.stickypod.com

Share this post


Link to post
Share on other sites

1062 - Duplicate entry '4e8c19bf29495b57871fadf54fa7e68e' for key 1

insert into sessions values ('4e8c19bf29495b57871fadf54fa7e68eoID=4509', '1193437119', 'language|s:7:\"english\";languages_id|s:1:\"1\";selected_box|s:13:\"configuration\";')

[TEP STOP]
Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

 

I figured out the error above. It has to do with the back button on the track_fedex.php file in /catalog/admin/

This error only occurs when you click the back button on the track fedex page. If you click your back button on your browser, this error will not appear.

 

To fix it so the back button works, just look for the follwing code in catalog/admin/track_fedex.php

<?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action'))) . 'oID=' . $order . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?>

 

Replace with

<a href="orders.php?oID=<?php echo $oID; ?>"><img src="includes/languages/english/images/buttons/button_back.gif" border="0" alt="IMAGE_ORDERS_BACK" title=" IMAGE_ORDERS_BACK "></a>

 

This will take you back to your orders page, which is what it should do, and will not create the duplicate entry.

 

I hope this helps because this was an annoying error that will print on the bottom of your invoices and packing slips. It will show up on all screens and cannot be removed unless you close your OSC admin browser page and reopen it.

 

Tom


Anyone can buy a camera... it's what you do with it that counts!

Sticky Pod

www.stickypod.com

Share this post


Link to post
Share on other sites
Warning: fopen(/admin/images/fedex/post.txt): failed to open stream: No such file or directory in /xxxxxx/xxxxxxx/public_html/osc/includes/fedexdc.php on line 310

Warning: fwrite(): supplied argument is not a valid stream resource in /xxxxxx/xxxxxx/public_html/osc/includes/fedexdc.php on line 312

 

I think I finally figured out this error. From the fedexdc.php file located in /catalog(/admin)/includes, I noticed a note right above line 309 that talks about using the post.txt file for testing purposes. Now that I'm on the production servers, and I have updated my files to production status, the function above is no longer needed. I removed it and it works great.

 

If I'm wrong about this, please reply with the answer.

If I'm right about this, please update the instructions to include this info.

 

I believe it fails because the $server variable defined at the top of the file is set to 'production'. In any case, just remove or comment out these lines in both of the fedexdc.php files in /catalog/includes and /catalog/admin/includes:

			   // write to file for testing
							$fp = fopen(DIR_FS_ADMIN . 'images/fedex/post.txt', 'w');
							fwrite($fp, ($this->sBuf));

 

Good luck,

Tom


Anyone can buy a camera... it's what you do with it that counts!

Sticky Pod

www.stickypod.com

Share this post


Link to post
Share on other sites

We're beginning to use this contributionin our store pretty successfully. One problem is that we do not have doctab information present for the thermal labels. The doc-tab would contain the actual FedEx cost for the shipment. Is there any other way to retrieve this information during the transaction? Is it even returned when the query is made to FedEx's servers?

 

Thanks for any help you can point me towards.

 

-kevin

Share this post


Link to post
Share on other sites

Where is the second label?

 

If I have two packages the first displays with no errors, but there is no link or hint of where to print the second label. The first label displays "1 of 2" in the bottom right corner.

 

Debugging Displays the following. Also I am using fedex auto labels version 2.0a.

 

Array
(
[0] => 21
[2399] => 0
[16] => CA
[13] => 111 Some St.
[1273] => 01
[1274] => 90
[18] => 1112223333
[15] => Some City
[23] => 1
[117] => US
[17] => 11111
[50] => US
[11] => 
[12] => Some Customer
[1333] => 1
[1415] => .00
[1368] => 2
[1369] => 1
[1370] => 5
[3002] => 246169
[25] => 246169
[3001] => 
[38] => 
[24] => 20071203
[1119] => N
[2975] => Y
[1266] => N
[1200] => N
[44] => 
[46] => 
[47] => 
[48] => 
[49] => 
[57] => 
[58] => 
[59] => 
[3008] => N
[440] => Y
[10] => 400539480
[498] => 8125717
[75] => LBS
[4] => MySite.com
[5] => 111 MyStore Address
[6] => NONE
[7] => My City
[8] => ID
[9] => 11122
[183] => 1112223333
[68] => USD
[116] => 2
[1117] => 1
[1400] => 14.6
[1401] => 7.2
)

Manifest data, package number 1:

Array
(
[delivery_id] => 
[orders_id] => 246169
[delivery_name] => Some Customer
[delivery_company] => 
[delivery_address_1] => 111 Some St.
[delivery_address_2] => 
[delivery_city] => Some City
[delivery_state] => CA
[delivery_postcode] => 11111
[delivery_phone] => 1112223333
[package_weight] => 
[package_value] => 
[oversized] => 
[pickup_date] => 20071203
[saturday_delivery] => 
[hold_at_location] => 
[hal_address] => 
[hal_city] => 
[hal_state] => 
[hal_postcode] => 
[hal_phone] => 
[dim_height] => 
[dim_width] => 
[dim_length] => 
[shipping_type] => 90
[residential] => Y
[autopod] => 
[cod] => 
[multiple] => 1
[tracking_num] => master_trackNum
)

Shipment request data, package number 2:

Array
(
[0] => 21
[2399] => 0
[16] => CA
[13] => 111 Some St.
[1273] => 01
[1274] => 90
[18] => 1112223333
[15] => Some City
[23] => 1
[117] => US
[17] => 11111
[50] => US
[11] => 
[12] => Some Customer
[1333] => 1
[1415] => .00
[1368] => 2
[1369] => 1
[1370] => 5
[3002] => 246169
[25] => 246169
[3001] => 
[38] => 
[24] => 20071203
[1119] => N
[2975] => Y
[1266] => N
[1200] => N
[44] => 
[46] => 
[47] => 
[48] => 
[49] => 
[57] => 
[58] => 
[59] => 
[3008] => N
[440] => Y
[10] => 400539480
[498] => 8125717
[75] => LBS
[4] => MySite.com
[5] => 111 MyStore Address
[6] => NONE
[7] => My City
[8] => ID
[9] => 11122
[183] => 1112223333
[68] => USD
[116] => 2
[1117] => 2
[1400] => 14.6
[1401] => 7.4
[1123] => master_trackNum
)

Manifest data, package number 2:

Array
(
[delivery_id] => 
[orders_id] => 246169
[delivery_name] => Some Customer
[delivery_company] => 
[delivery_address_1] => 111 Some St.
[delivery_address_2] => 
[delivery_city] => Some City
[delivery_state] => CA
[delivery_postcode] => 11111
[delivery_phone] => 1112223333
[package_weight] => 
[package_value] => 
[oversized] => 
[pickup_date] => 20071203
[saturday_delivery] => 
[hold_at_location] => 
[hal_address] => 
[hal_city] => 
[hal_state] => 
[hal_postcode] => 
[hal_phone] => 
[dim_height] => 
[dim_width] => 
[dim_length] => 
[shipping_type] => 90
[residential] => Y
[autopod] => 
[cod] => 
[multiple] => 2
[tracking_num] => trackNum
)

Edited by zelf

Share this post


Link to post
Share on other sites

Using a zebra LP2844ps label and am getting the following from fedex:

 

FedEx Web Integrated Solutions Customer,

The FedEx Ground Label Certification Team has received and evaluated your Ground barcode labels. Upon inspection, the following corrections will need to be made in order to complete the Ground barcode certification.

Corrections Needed:

1) 1. The labels are 4x6 thermal label with scaling issues on the linear barcode and 2D barcode.

The linear barcode measures in hgt 1.1" and 2.4" in width. The hgt must be atleast 1.4" and the width btw 2.78"-3.35" (17-20mil).

2. The 2D will not scan due to the scaling issues, too small.

Once the above issues are addressed, please submit more labels for evaluation.

 

 

Any ideas????

 

Also line 1369 is:

 

,1369 => 1 // printer type (1 is laser)

 

Is that correct for a thermal label printer????

Share this post


Link to post
Share on other sites
Hi,

I've been using the Automated FedEx Labels and recently got a Zebra Thermal printer from FedEx and was wondering if anyone would be willing to code a contribution which allows me to print the labels through my oscommerce admin area like the "Automated FedEx Labels" system.

 

Please send me your bids by either replying, sending me a PM or e-mailing me at sigel@sigeltek.com, I also have aim: sigeltekinn

 

Hope to hear from somene soon!

Thank You,

 

- Sigel

 

Looking for the same type of help, did you find a solution

Share this post


Link to post
Share on other sites
I have uploaded v2.0 here. The new contribution now supports Thermal Labels printing. Although it is a full package, for existing 1.x users, upgrading is very easy:

 

Code Changes

=========

1. Rename your existing admin/fedex_popup.php to admin/fedex_popup_laser.php

2. Copy new admin/fedex_popup.php

3. Changes the differences between the new admin/ship_fedex.php and your copy.

Thermal Printer Setup

==============

- For Thermal Printer setup, I recommend you get the latest driver from FedEx for Zebra LP2844ps. USB is always recommended instead of Serial.

- The Margins in the Browser Page Setup must be change to all zeros before printing.

- Networked Printing on windows has also been tested working. (Thermal is set up on one computer can be printed by another computer remotely)

 

Please post any problems to this forum.

 

The Jackal

Share this post


Link to post
Share on other sites
I have uploaded v2.0 here. The new contribution now supports Thermal Labels printing. Although it is a full package, for existing 1.x users, upgrading is very easy:

 

Code Changes

=========

1. Rename your existing admin/fedex_popup.php to admin/fedex_popup_laser.php

2. Copy new admin/fedex_popup.php

3. Changes the differences between the new admin/ship_fedex.php and your copy.

Thermal Printer Setup

==============

- For Thermal Printer setup, I recommend you get the latest driver from FedEx for Zebra LP2844ps. USB is always recommended instead of Serial.

- The Margins in the Browser Page Setup must be change to all zeros before printing.

- Networked Printing on windows has also been tested working. (Thermal is set up on one computer can be printed by another computer remotely)

 

Please post any problems to this forum.

 

The Jackal

 

We use FedEx almost exclusively to ship and this contribution will save us a lot of work. I’ve had problems getting approval to move to the production server from FedEx. They claim the barcode is not within their dimensions. We had trouble making the barcode bigger to pass certification, Adjusted the var resolution from 96 to 128, now having problems getting the print to center on the label, FedEx hasn’t been much help. Can’t find a way to change the margins to zero? Although the labels print just fine using the FedEx manager software, also works just fine on sending the label to my inkjet printer? Trying to use Zebra thermal printer LP2844ps that was furnished by FedEx. Can anyone help Please!!!

Share this post


Link to post
Share on other sites
We use FedEx almost exclusively to ship and this contribution will save us a lot of work. I’ve had problems getting approval to move to the production server from FedEx. They claim the barcode is not within their dimensions. We had trouble making the barcode bigger to pass certification, Adjusted the var resolution from 96 to 128, now having problems getting the print to center on the label, FedEx hasn’t been much help. Can’t find a way to change the margins to zero? Although the labels print just fine using the FedEx manager software, also works just fine on sending the label to my inkjet printer? Trying to use Zebra thermal printer LP2844ps that was furnished by FedEx. Can anyone help Please!!!

Essentially, the label is just a .png. Try changing the browser settings such as margins, scaling etc until it works. If you still can't get it right, try another browser. It prints perfectly on mine. I use firefox.


- The Jackal

Share this post


Link to post
Share on other sites

ERROR: cURL ERROR: 28: connect() timed out!

unable to process ship_ground

 

I am getting this problem with automatic fedex label generator addon.

I have rechecked refreal var in 2 fedexdc.php files, yet getting this error.

we are using godaddy hosting, i found somewhere that this cUrl error could be because godaddy uses some proxy.

 

can someone pls help me out.

 

Rahul

Share this post


Link to post
Share on other sites

I'm getting the broken image display. I'm using FedEx Labels 2.0a.

 

Everything seems to be working except that the label print page has the broken image display. The *.png file is not being written to /catalog/admin/images/fedex/ though the post.txt file is.

 

Not getting any errors of any sort and once clicking the Back button from the label page, the [F cancel shipment] button is active and appears to work.

 

It's evident that permissions and paths are correct or I wouldn't be getting the post.txt file. I saw several fixes for the missing image but my code is correct for all those suggestions.

 

Any ideas?

Share this post


Link to post
Share on other sites

We recently just added the Google Checkout Contribution and it required modifying the code of this fedex labels contribution to make it notify google checkout that the order had shipped and to send the tracking info to google. Below is all of the code we used to do this, in case anyone else adds the google contrib, the code below will save you a lot of trouble.

 

Simply make the one change below in:

admin/ship_fedex.php

 

FIND:
// update the order record

ADD BELOW:
//----------------------------
// ** Google Checkout email customer tracking and update google **
$testGoogle = substr($order_info['payment_method'], 0, 6);
if($testGoogle == 'Google') {

 define('GC_STATE_NEW', 100);
 define('GC_STATE_PROCESSING', 101);
 define('GC_STATE_SHIPPED', 3);
 define('GC_STATE_REFUNDED', 103);
 define('GC_STATE_SHIPPED_REFUNDED', 104);
 define('GC_STATE_CANCELED', 105);
	  require_once('../' . DIR_WS_LANGUAGES . $language . '/modules/payment/googlecheckout.php');
	  $payment_value= MODULE_PAYMENT_GOOGLECHECKOUT_TEXT_TITLE;
	  $num_rows = tep_db_num_rows(tep_db_query("select google_order_number from google_orders where orders_id= ". $order));

  global $db,$messageStack, $orders_statuses;

  define('API_CALLBACK_ERROR_LOG',
				   DIR_FS_DOCUMENT_ROOT. "/googlecheckout/logs/response_error.log");
  define('API_CALLBACK_MESSAGE_LOG',
				   DIR_FS_DOCUMENT_ROOT . "/googlecheckout/logs/response_message.log");

  include_once(DIR_FS_DOCUMENT_ROOT.'/includes/modules/payment/googlecheckout.php');
  include_once(DIR_FS_DOCUMENT_ROOT.'/googlecheckout/library/googlerequest.php');

  $googlepayment = new googlecheckout();

  $Grequest = new GoogleRequest($googlepayment->merchantid,
								$googlepayment->merchantkey,
								MODULE_PAYMENT_GOOGLECHECKOUT_MODE==
								  'https://sandbox.google.com/checkout/'
								  ?"sandbox":"production",
								DEFAULT_CURRENCY);
  $Grequest->SetLogFiles(API_CALLBACK_ERROR_LOG, API_CALLBACK_MESSAGE_LOG);


  $google_answer = tep_db_fetch_array(tep_db_query("SELECT go.google_order_number, go.order_amount, o.customers_email_address, gc.buyer_id, o.customers_id
								  FROM " . $googlepayment->table_order . " go
								  inner join " . TABLE_ORDERS . " o on go.orders_id = o.orders_id
								  inner join " . $googlepayment->table_name . " gc on gc.customers_id = o.customers_id
								  WHERE go.orders_id = '" . $order ."'
								  group by o.customers_id order by o.orders_id desc"));

  $google_order = $google_answer['google_order_number'];
  $amount = $google_answer['order_amount'];

// If status update is from Google Processing or Google Refunded -> Google Shipped on the Admin UI
// this invokes the deliver-order and archive-order commands
// 2->Google Processing or Google Refunded, 3-> Google Shipped (refunded)
  // Add tracking Data
	$carrier = 'FedEx';
	$tracking_no = $trackNum;
	$comments = GOOGLECHECKOUT_STATE_STRING_TRACKING ."\n" .
				GOOGLECHECKOUT_STATE_STRING_TRACKING_CARRIER . $carrier ."\n" .
				GOOGLECHECKOUT_STATE_STRING_TRACKING_NUMBER . $tracking_no . "";


  list($curl_status,) = $Grequest->SendDeliverOrder($google_order, $carrier,
						  $tracking_no, ($cust_notify==1)?"true":"false");
  if($curl_status != 200) {
	$messageStack->add_session(GOOGLECHECKOUT_ERR_SEND_DELIVER_ORDER, 'error');
  } else {
	$messageStack->add_session(GOOGLECHECKOUT_SUCCESS_SEND_DELIVER_ORDER, 'success');
  }
  list($curl_status,) = $Grequest->SendArchiveOrder($google_order);
  if($curl_status != 200) {
	$messageStack->add_session(GOOGLECHECKOUT_ERR_SEND_ARCHIVE_ORDER, 'error');
  } else {
	$messageStack->add_session(GOOGLECHECKOUT_SUCCESS_SEND_ARCHIVE_ORDER, 'success');
  }
//	Is the order is not archive, I do it
  if($check_status['orders_status'] != GC_STATE_SHIPPED
	 && $check_status['orders_status'] != GC_STATE_SHIPPED_REFUNDED){
	list($curl_status,) = $Grequest->SendArchiveOrder($google_order);
	if($curl_status != 200) {
	  $messageStack->add_session(GOOGLECHECKOUT_ERR_SEND_ARCHIVE_ORDER, 'error');
	} else {
	  $messageStack->add_session(GOOGLECHECKOUT_SUCCESS_SEND_ARCHIVE_ORDER, 'success');
	}
  }
 }
// ** END GOOGLE CHECKOUT **

 

I hope someone else finds use for this code, enjoy! :thumbsup:


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

I am very curious how others are using this contribution. Namely, if you have a large number of orders, how do you print labels for all of them in a timely and efficient manner? My store receives anywhere in the neighborhood of 30 to 50 orders a day. As far as I can tell, there's no batch printing capability within this contribution. So aside from manually going through each order and printing individual labels, what other options are there? If you receive a high volume of orders, how do you handle such a load with this contribution?

 

Is there anyone out there who has coded a batch capability into this contribution?

 

Thanks!


Brian (Schadeboy) Schade

CIO and Webmaster

Twilight Teez, LLC

 

"Camping is nature's way of promoting the hotel industry."

-Dave Barry

Share this post


Link to post
Share on other sites
Where is the second label?

 

If I have two packages the first displays with no errors, but there is no link or hint of where to print the second label. The first label displays "1 of 2" in the bottom right corner.

 

Debugging Displays the following. Also I am using fedex auto labels version 2.0a.

 

I have the exact same problem. Any solution?

Share this post


Link to post
Share on other sites

I have spent quite a bit of time here today and it just isn't sinking in. I called fedex about certifying my labels but they didn't seem to know what I was talking about. My test labels work and I tried production labels too, and they seem to work. I have a meter Id from 2 years ago from Fedex real time quotes. What do I need to do?

 

lildog

Share this post


Link to post
Share on other sites

This is happening to me as well....did anyone know the cause of this, and i have my own server and did not used to have this issue.

 

please help.

 

Thanks

 

 

 

 

ERROR: cURL ERROR: 28: connect() timed out!

unable to process ship_ground

 

I am getting this problem with automatic fedex label generator addon.

I have rechecked refreal var in 2 fedexdc.php files, yet getting this error.

we are using godaddy hosting, i found somewhere that this cUrl error could be because godaddy uses some proxy.

 

can someone pls help me out.

 

Rahul

Share this post


Link to post
Share on other sites
This is happening to me as well....did anyone know the cause of this, and i have my own server and did not used to have this issue.

 

please help.

 

Thanks

 

fedex direct 2.07 has the godaddy curl fix in the fedex1.php file..


-Dave

Share this post


Link to post
Share on other sites

I had this problem also and called FedEx. Their customer rep told me the I had a bad internet connection and I was loosing connectivity but didn't know it. I told him that is funny why is the streaming music site music site I am listening to still streaming. That is amazing. So after no help from the super customer rep at FedEx I changed my timeout setting to 60 seconds if I remember right. I think it was set at 15 seconds. That fixed the problem.

Share this post


Link to post
Share on other sites

Anyone here has success using this mod for fedex international? The interface seem so simple for a international shipping which require you to declare customs and commercial invoice....

 

How do i do that?

 

 

Thanks

Share this post


Link to post
Share on other sites
Anyone here has success using this mod for fedex international? The interface seem so simple for a international shipping which require you to declare customs and commercial invoice....

 

How do i do that?

 

 

Thanks

 

This would be a rather advanced upgrade to the system, although a much-needed one. But it is much more difficult than you think. FedEx requires a lot of parts when shipping international, where you have to list each item you are shipping and you have to enter the weight for each one, value, country of manufacture, lots of factors. Thus the osc contrib would have to recognize your product, how many of them, and all the attributes required by Fedex, pass them as a FedEx API code per attribute, then finally hand it over to FedEx for label processing. Because of the significant number of variables involved with shipping internationally, this can be very tedious to program. It is definitely possible though -- in fact, not even hard, just extremely tedious -- I just haven't had to the patience to do something this big.

Share this post


Link to post
Share on other sites

Hello,

 

I just installed Fedex Labels and when I attempt to print a label I get the following error:

 

 

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

 

ERROR: cURL ERROR: 77: error setting certificate verify locations: CAfile: /usr/local/share/curl/curl-ca-bundle.crt CApath: none

unable to process ship_ground

 

 

I have been get Fedex live quotes OK for a while now, so comms to Fedex seem OK.

I have called Fedex, they said basically I shouldn't have to do anything. I did the Fedex Production Access confirmation online anyway (thought it might help)

I have read about the $request_referer =, and I have tried just about everything from localhost to sitename to host ip. no good.

I am hosted on register.com, which works well with everything else on my site (www.kettleofnuts.com)

 

Also, the tracking feature: entered a tracking number and hit submit, throws me back to my website home page.

 

Anyone able to help?

Share this post


Link to post
Share on other sites
Hello,

 

I just installed Fedex Labels and when I attempt to print a label I get the following error:

 

 

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

 

ERROR: cURL ERROR: 77: error setting certificate verify locations: CAfile: /usr/local/share/curl/curl-ca-bundle.crt CApath: none

unable to process ship_ground

 

 

I have been get Fedex live quotes OK for a while now, so comms to Fedex seem OK.

I have called Fedex, they said basically I shouldn't have to do anything. I did the Fedex Production Access confirmation online anyway (thought it might help)

I have read about the $request_referer =, and I have tried just about everything from localhost to sitename to host ip. no good.

I am hosted on register.com, which works well with everything else on my site (www.kettleofnuts.com)

 

Also, the tracking feature: entered a tracking number and hit submit, throws me back to my website home page.

 

Anyone able to help?

 

 

first, register.com hosting is a ripoff with insufficient services on the server to run more complicated scripts for fully dynamic sites (i mean, their domain registration is $35 a year....cmon!)

 

anyway, register.com's hosting may not have curl installed fully

you could be missing the ca-certificates package on your server, or its simply not provided by register.com's hosting

 

u may try to ask register.com to add that to your server or activate it for u, but if ur on shared hosting, i dont see much luck (unless u have a dedicated server and u can do it urself, which may take a lot of more expertise as you will need to know how to access linux shell, or navigate through whm/cpanel)

 

i highly recommend u try a better, less expensive host

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  

×