Zen Cart Logo
Forums / Addon Shipping Modules / Print USPS Delivery Confirmation Label in Admin

Print USPS Delivery Confirmation Label in Admin

Locked

Views: 7,222

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
9 Jan 2008, 2:10 AM
#1
compwhizmm avatar

compwhizmm

New Zenner

Join Date:
Oct 2007
Location:
USA
Posts:
31
Plugin Contributions:
0

Print USPS Delivery Confirmation Label in Admin

Hi,

I'm working on some code that allows me to print first class and priority delivery confirmation labels with the address and delivery confirmation label from the zen cart admin using the usps api. These labels do not have the postage printed on them, but it can be easily printed using dymo stamps (free w dymo label printer) or endicia instapostage ($10/month). One advantage of using this over the other contribution is you don't leave the admin page and you can print first class labels.

I will attach the code I have so far.

I would like others to look at it and see if they could use or if they could improve it in any way.

These are the things I would like to add to it:

  1. Ability to save label
  2. Ability to save tracking number
  3. Print Multiple Labels
  4. Print international labels.

More information about the api can be found here: http://www.usps.com/webtools/_pdf/Delivery-Confirmation.pdf
or
http://www.usps.com/webtools/htm/Delivery-Confirmation.htm

This is set to only prints sample labels now and you will need a usps account number and you will need to be approved. More information about this can be found in the above links.

How to Install: (not on a live store)

In admin/orders.php

After this line (approx 394)

   <tr>
           <td class="main"><strong><?php echo ENTRY_PAYMENT_METHOD; ?></strong></td>
           <td class="main"><?php echo $order->info['payment_method']; ?></td>
        </tr>

Add this:

<tr>
           <td class="main"><strong>Delivery Confirmation Label</strong></td>
           <td class="main">
		<?
$address = $order->delivery; ?>
<form action="uspslabel.php" method="post">
<input type="hidden" name="name" value="<? echo $address['name']; ?>">
<input type="hidden" name="address" value="<? echo $address['street_address']; ?>">
<input type="hidden" name="city" value="<? echo $address['city']; ?>">
<input type="hidden" name="state" value="<? echo $address['state']; ?>">
<input type="hidden" name="zip" value="<? echo $address['postcode']; ?>">
<input type="hidden" name="orderid" value="<? echo $oID; ?>">
<input type="hidden" name="email" value="<? echo $order->customer['email_address']; ?>">
<input type="submit" value="Generate Delivery confirm label (US ONLY)">
</form>
</td>
        </tr>

Edit the attached uspslabel.php.txt file and enter in your information where all the capitol letters appear. Remove the .txt ending.

Then, upload the uspslabel.php file to the /admin directory.

If you are interested, please look this over and provide feedback. If anyone can help improve this script please post here.

This is very basic, so please excuse the roughness of the code.

14 Jan 2008, 11:45 PM
#2
dogtags avatar

dogtags

Totally Zenned

Join Date:
Nov 2003
Posts:
876
Plugin Contributions:
1

Re: Print USPS Delivery Confirmation Label in Admin

  1. Will this produce the XML file for Endicia?

  2. Can you exclude specified orders from the file?

Many thanks :smile:

22 May 2008, 11:01 AM
#3
orangecity avatar

orangecity

New Zenner

Join Date:
May 2008
Posts:
1
Plugin Contributions:
0

Re: Print USPS Delivery Confirmation Label in Admin

Hi there,

This post has been really useful, i have used the code so many times now it is so good. :smile:

27 May 2008, 1:47 AM
#4
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Re: Print USPS Delivery Confirmation Label in Admin

Was the code for this ever completed?

Thanks.

27 May 2008, 2:04 PM
#5
randolph_hoppe avatar

randolph_hoppe

Zen Follower

Join Date:
Jan 2004
Posts:
129
Plugin Contributions:
1

Re: Print USPS Delivery Confirmation Label in Admin

This certainly does seem like a nice solution. Has there been any progress towards making it something that is recommended for a live store?

17 Oct 2008, 12:15 AM
#6
elliot613 avatar

elliot613

New Zenner

Join Date:
Jul 2008
Posts:
6
Plugin Contributions:
0

Re: Print USPS Delivery Confirmation Label in Admin

i cant get this to work.

could someone who has this working provide more detailed information.

  1. where would you go to print the shipping label?
  2. do you need any other modules installed such as the usps shipping module.
  3. if you have super orders installed and the order tracking module would it still work? if yes, which php file do you have to edit.
  4. does it email the customer the tracking number or do you have to manually do it?

i see that so many zencart users are frustrated that they cannot print usps labels for first class with delivery confirmation. This is by far the cheapest method to ship pckgs.

please someone help and advise.