Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automated FedEx Labels


spoot

Recommended Posts

If anyone can get this signature on delivery working I will gladly pay for our time to develop it and contribute it back to the community. I am in desperate need of this

 

thanks

Link to comment
Share on other sites

  • Replies 713
  • Created
  • Last Reply

Top Posters In This Topic

Has anyone gotten anywhere with the signature required option?

 

Rich -

 

Try updating ship_fedex.php, shortly after line 123, in the $shipData array. What you need to add, I believe, is tag 1208, the "No Indirect Delivery Flag."

 

Try changing:

 

0=>  $transaction_code // transaction code
,16=>   $delivery_state // delivery state

 

...to:

 

0=>  $transaction_code // transaction code
,1208=> 'Y' // signature required?
,16=>   $delivery_state // delivery state

 

This is untested, please post back here if it works...

 

- Michael

Link to comment
Share on other sites

Trying to install this contibution for the first time on a fresh install of osC. I recieve this error and not able to lauch osC admin. I'm able to login to my phpMyAdmin fine. Would appreciate some help, thanks.

 

Warning: mysql_connect(): Access denied for user: 'pearlsea_pearl@localhost' (Using password: YES) in /home/compumod/public_html/admin/includes/functions/database.php on line 19

Unable to connect to database server!

Link to comment
Share on other sites

Trying to install this contibution for the first time on a fresh install of osC. I recieve this error and not able to lauch osC admin. I'm able to login to my phpMyAdmin fine. Would appreciate some help, thanks.

 

Warning: mysql_connect(): Access denied for user: 'pearlsea_pearl@localhost' (Using password: YES) in /home/compumod/public_html/admin/includes/functions/database.php on line 19

Unable to connect to database server!

 

 

Did you install the latest version (1.07) of the contribution?

 

You'll have to either reinstall oscommerce, or correct the entries for DB_SERVER_USERNAME and, possibly, DB_SERVER_PASSWORD (and check the rest of the database variables while you're at it).

 

Michael

Link to comment
Share on other sites

guess nobodys figured out how to get the signature required thing working...

 

I am going to a web dev. company tomorrow and going to see how much $$ they want to do it for me, if they can do it i'll post it back here what they did.

Link to comment
Share on other sites

Hello,

Great contrib!  This is working well on my site with only following issue.  The Address Line2 is not showing up on the generated label.  Does anyone know what might be causing this.  Thanks in advance.

 

You will need to make a few changes to get Address2 working.

 

catalog\admin\ship_fedex.php

 

find:

$fedex_vars = array (

10=>'MODULE_SHIPPING_FEDEX1_ACCOUNT', // 0

498=>'MODULE_SHIPPING_FEDEX1_METER', // 1

75=>'MODULE_SHIPPING_FEDEX1_WEIGHT', // 2

4=>'STORE_NAME', // 3

5=>'MODULE_SHIPPING_FEDEX1_ADDRESS_1',// 4

 

7=>'MODULE_SHIPPING_FEDEX1_CITY', // 6

8=>'MODULE_SHIPPING_FEDEX1_STATE',

 

Change to:

 

$fedex_vars = array (

10=>'MODULE_SHIPPING_FEDEX1_ACCOUNT', // 0

498=>'MODULE_SHIPPING_FEDEX1_METER', // 1

75=>'MODULE_SHIPPING_FEDEX1_WEIGHT', // 2

4=>'STORE_NAME', // 3

5=>'MODULE_SHIPPING_FEDEX1_ADDRESS_1',// 4

6=>'MODULE_SHIPPING_FEDEX1_ADDRESS_2',// 5

7=>'MODULE_SHIPPING_FEDEX1_CITY', // 6

8=>'MODULE_SHIPPING_FEDEX1_STATE',

 

Find:

// start the array for fedex

$shipData = array(

0=> $transaction_code // transaction code

,16=> $delivery_state // delivery state

,13=> $order_info['delivery_street_address'] // delivery address

,1273=> $HTTP_POST_VARS['packaging_type'] // packaging type (01 is customer packaging)

,1274=> $HTTP_POST_VARS['service_type'] //

,18=> $delivery_phone // customer's phone number

 

Change to:

 

// start the array for fedex

$shipData = array(

0=> $transaction_code // transaction code

,16=> $delivery_state // delivery state

,13=> $order_info['delivery_street_address'] // delivery address

,14=> $order_info['delivery_street_address_2'] // delivery address 2

,1273=> $HTTP_POST_VARS['packaging_type'] // packaging type (01 is customer packaging)

,1274=> $HTTP_POST_VARS['service_type'] //

,18=> $delivery_phone // customer's phone number

 

 

Then find:

 

 

// data for shipping_manifest

$manifest_data = array (

delivery_id => '',

orders_id => $order,

delivery_name => $order_info['delivery_name'],

delivery_company => $order_info['delivery_company'],

delivery_address_1 => $order_info['delivery_street_address'],

delivery_city => $order_info['delivery_city'],

delivery_state => $delivery_state,

 

Change to:

 

 

// data for shipping_manifest

$manifest_data = array (

delivery_id => '',

orders_id => $order,

delivery_name => $order_info['delivery_name'],

delivery_company => $order_info['delivery_company'],

delivery_address_1 => $order_info['delivery_street_address'],

delivery_address_2 => $order_info['delivery_street_address_2'],

delivery_city => $order_info['delivery_city'],

delivery_state => $delivery_state,

 

 

That should do it.

If you choose not to decide you still have made a choice, I will choose a purpose clear, I will choose Free Will. --Neal Peart - Rush

Link to comment
Share on other sites

Spoot and the rest who've worked on this - Fantastic Contrib.

 

I've got, what I think to be a pretty easy question. Is there any way to get this contrib. to pull shipping rates from a table rather than Fedex's Realtime Server? Fedex decided to give us a discount on shipping rates and we don't really want our customers to get the discount. I believe that I read somewhere that this uses our account number to pull the shipping rates off Fedex. If there isn't a way to get the rates to come from a "static" table is there a way to have it connect to Fedex and get rates without using our account number.

 

Thanx everyone.

:thumbsup:

Link to comment
Share on other sites

You will need to make a few changes to get Address2 working.

 

catalog\admin\ship_fedex.php

 

 

STUFF DELETED

 

  delivery_address_2 => $order_info['delivery_street_address_2'],

  delivery_city => $order_info['delivery_city'],

  delivery_state => $delivery_state,

That should do it.

 

Thanks. This worked great. The only change I had to make was instead of calling:

 

$order_info['delivery_street_address_2']

 

I called

 

$order_info['delivery_suburb']

 

Thanks again for the quick and in-depth response.

Link to comment
Share on other sites

For each order that I try to ship, I get this error message:

(this URL)

mydomain.com/admin/ship_fedex.php?cPath=&cID=&oID=11&action=ship

-------------------------------------------------------

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

 

ERROR: cURL ERROR: 6: Couldn't resolve host 'FEDEX_URI'

unable to process ship_ground

-------------------------------------------------------

 

I have gotten it to go to the screen where I can input how much weight per box (only twice), but haven't been able to get past that screen. It has been several days since I've made it to the individual box weight screen.

 

The following is my admin/includes/fedexdc.php (part of the file). I have the test server enabled, have a meter number from the test server, and have pulled rates from the test server.

 

// check for test or production gateway
if ($server == 'test') {
define('FEDEX_URI', 'https://gatewaybeta.fedex.com/GatewayDC', true);
define('FEDEX_HOST', 'gatewaybeta.fedex.com', true);
}
elseif ($server == 'production') {
define('FEDEX_URI', 'https://gateway.fedex.com/GatewayDC', true);
define('FEDEX_HOST', 'gateway.fedex.com/GatewayDC', true);
}

define('REQUEST_REFERER', $request_referer, true);
define('REQUEST_TIMEOUT', 10, true);
define('REQUEST_TYPE', 'CURL', true);

 

On the first two orders that i have gotten to the box weight screen, it doesn't show the button to ship anymore. Thanks for any help that anyone can give me!

Link to comment
Share on other sites

The current version calculates shipping properly when your tare weight is more than the percentage weight but messes up the weight when the percentage weight is more than the tare.

 

Here is my crude, but effective solution if anyone else would like to fix this:

 

Change:

$order_weight = $order_weight + SHIPPING_BOX_WEIGHT;

 

TO:

            // Find out which weighs more tare or percentage shipping rate and display that rate
           // Change the 1.17 to reflect your percentage, Example 12% would be 1.12

      	 $order_weight_tar = $order_weight + SHIPPING_BOX_WEIGHT;
      	 $order_weight_percent = ($order_weight * 1.17);

      	 if ($order_weight_percent < $order_weight_tar) {
      	 $order_weight = $order_weight_tar;
      	 } else {
      	 $order_weight = $order_weight_percent;
      	 }

 

Just change the 1.17 to whatever your percent is, Example 12% would be 1.12

and it's fixed!

: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

Link to comment
Share on other sites

One more modification I came up with. I found that often times the shipping name and purchase name can differ, which can be a problem so I added a couple of lines that display the sold to name, ship to name, and shipping method choosen in the fedex module before shipment so you know in advance who its going to and if they chose FedEx to ship it or not without looking at a packingslip or going fully into the order.

 

Just Find:

<?php echo $order_item_html;?>
         </tr>

 

And change it to the following:

</tr>

<tr>

<td colspan="3" class="main" align="left">

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

<tr>

<td class="main" align="left">

<b>Sold To:</b><br>

<?php echo $order_info['customers_name']; ?><br> </td>

<td class="main" align="left">

<b>Shipping To:</b><br>

<?php echo $order_info['delivery_name']; ?><br> </td>

</tr>

</table>

</td>

</tr>

<tr>

<td colspan="3" class="main" align="left"><b>Shipping Method:</b><br><?php echo $shipping_method ?><br> </td>

</tr>

<?php echo $order_item_html;?>

[code]

 

Then you're done, one additional step which makes it easier to read is to align the products sold to the left just find:

$order_item_html = '';

 

and change a few likes below it on the <td statements to align="left" instead of align="center".

 

: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

Link to comment
Share on other sites

For each order that I try to ship, I get this error message:

(this URL)

mydomain.com/admin/ship_fedex.php?cPath=&cID=&oID=11&action=ship

-------------------------------------------------------

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

 

ERROR: cURL ERROR: 6: Couldn't resolve host 'FEDEX_URI'

unable to process ship_ground

-------------------------------------------------------

 

I figured it out! I just put the word test in top part of the file instead of the actually virtual server domain name.

Link to comment
Share on other sites

Anyone know if there's a support thread for the realtime quotes? I'm trying to get Zones enabled in the module but I'm not quite there. I have the drop-down menu for zones installed but each time I enable a zone restriction, FedEx is disabled altogether. I can't figure out why.

 

If anyone here wants to look at my code and see what I missed I'd be glad to post it.

Link to comment
Share on other sites

When having to specify Ste B (Suite B) or Apt 10, does Fedex require this to be on a 2nd line, or can you just place a comma after the street name (eg 13 Elm St, Apt 10)? Should I get rid of the "suberb" and replace it with Address 2?

 

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...
When having to specify Ste B (Suite B) or Apt 10, does Fedex require this to be on a 2nd line, or can you just place a comma after the street name (eg 13 Elm St, Apt 10)?  Should I get rid of the "suburb" and replace it with Address 2?

 

Thanks!

 

That's what I've done - change "suburb" to "address 2." Obviously there are ways to avoid this, but "suburb" needs to go away and "address 2" is useful, so it's a good move. It should be that way in the initial install.

 

Are there countries that use "suburb" as a standard address line? I dunno.

Link to comment
Share on other sites

That's what I've done - change "suburb" to "address 2." Obviously there are ways to avoid this, but "suburb" needs to go away and "address 2" is useful, so it's a good move. It should be that way in the initial install.

 

Are there countries that use "suburb" as a standard address line? I dunno.

 

That was the reason in my orginal post about the second address line I posted it to match the Second Address line Contrib.

 

Overseas you will need the suburb field for some addresses.

If you choose not to decide you still have made a choice, I will choose a purpose clear, I will choose Free Will. --Neal Peart - Rush

Link to comment
Share on other sites

I'm having a problem with viewing the labels. It appears everything goes through to fedex but fedex_popup shows a broken image.

 

In the admin/images/fedex directory, I can see the files being created, but are 0 bytes.

-rw-r--r--  1 nobody nobody    0 Jun 23 11:15 481601410000300.png

 

the permissions on the directory are 777.

drwxrwxrwx  2 nobody nobody  4096 Jun 23 11:15 fedex

 

apache runs as nobody:nobody

 

I tested PHP's ability to create a png image, it seems to work.

 

thanks in advance for any help.

Link to comment
Share on other sites

Dropoff Type Problem.

 

I've installed all the mods including 1.07. I set the Dropoff Type to "4" (Drop at BSC) in the user module settings, but then when I go to the label setup screen for a particular shipment it has Dropoff Type as "Regular Pickup" (setting "1") as the default. It is not reading the user preference as I set up in the module.

 

Any ideas?

 

Thanks for your help.

 

Charlie

Link to comment
Share on other sites

I'm having a problem with viewing the labels.  It appears everything goes through to fedex but fedex_popup shows a broken image. 

 

In the admin/images/fedex directory, I can see the files being created, but are 0 bytes.

-rw-r--r--  1 nobody nobody    0 Jun 23 11:15 481601410000300.png

 

the permissions on the directory are 777. 

drwxrwxrwx  2 nobody nobody  4096 Jun 23 11:15 fedex

 

apache runs as nobody:nobody

 

I tested PHP's ability to create a png image, it seems to work. 

 

thanks in advance for any help.

 

i talked to the fedex support team ( i asked the automated attendant for ship manager API support 877-339-2774). i was told that a file size of 0 is expected from the test server.

Link to comment
Share on other sites

i talked to the fedex support team ( i asked the automated attendant for ship manager API support 877-339-2774).  i was told that a file size of 0 is expected from the test server.

 

 

Hi, but that doesn't explain why the label is not showing up, it is suppose

to generate a image with data on it. For some reason, you have to have this

image working to make labels to get certified. I know that fedex dont send a

image, it just sends back data to help the script generate the image.

 

Any idea? :huh:

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