Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Add a UPS "track it" button to customer email

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 06-10-2005, 12:27 PM
 
Allan Martel Allan Martel is offline
 

Advanced Member
  
Join Date: Mar 2004
Posts: 72
 

Default Add a UPS "track it" button to customer email

Hello all,

Here is a simple little Template Mod I did to add a "Track it!" button to the email order receipt that redirects to the UPS tracking website instead of just printing the tracking number.
This allows the customer to click the button in the email and automatically go to the UPS tracking page instead of having to login and bring up their order.


simply replace /mail/html/order_customer_complete.tpl with the following:

Code:
{* $Id: order_customer_complete.tpl,v 1.5 2004/06/21 12:13:27 max Exp $ *} {config_load file="$skin_config"} {include file="mail/html/mail_header.tpl"} {$lng.lbl_dear} {$customer.title} {$customer.firstname} {$customer.lastname}, {$lng.eml_order_complete} This is confirmation that the products you ordered have been shipped to you! Shipping usually takes 3-5 days depending on your location. Your UPS tracking number is {$order.tracking} Please allow up to 24 hours for the UPS tracking system to update this information. <HR size="1" noshade> <FORM name="noname" method="POST" action="http://wwwapps.ups.com/tracking/tracking.cgi" > <INPUT name="accept_UPS_license_agreement" type="hidden" value="yes" > <INPUT name="nonUPS_title" type="hidden" value > <INPUT name="nonUPS_header" type="hidden" value > <INPUT name="nonUPS_body" type="hidden" value > <INPUT name="nonUPS_footer" type="hidden" value > <INPUT name="tracknum" type="hidden" value="{$order.tracking}"> <INPUT type="submit" value="{$lng.lbl_track_it}"> {$lng.txt_ups_redirection} </FORM> <HR size="1" noshade> <TR> <TD colspan="3">{include file="mail/html/order_data.tpl"}</TD> </TR> </TABLE> {include file="mail/html/signature.tpl"}

If desired, you can also change (Line 39)

Code:
<TD colspan="3">{include file="mail/html/order_data.tpl"}</TD>

to

Code:
<TD colspan="3">{include file="mail/html/order_invoice.tpl"}</TD>

This will include a copy of the full invoice instead of the default order data (I personally like that better)

This was done in 4.0.11, hope someone finds this usefull!

Allan
__________________
____________
____________

X-Cart v 4.0.14
X-Cart v 4.0.11
____________
____________
Reply With Quote
  #2  
Old 06-10-2005, 12:55 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Very nicely done!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 07-16-2005, 04:58 PM
  JJH1947's Avatar 
JJH1947 JJH1947 is offline
 

Advanced Member
  
Join Date: Feb 2004
Location: Whitefish, Montana
Posts: 41
 

Default Display UPS tracking information with one click

We want our customers to be able to display UPS tracking information with one click. The preceding code in this thread takes customers to the UPS web site with one click. The code below actually displays the specific UPS tracking information with one click, as well as displaying the UPS web site link.

We have added this code to mail/html/order_customer_processed.tpl and to /mail/html/order_invoice.tpl, which is included in
/mail/html/order_notification_admin.tpl, so that the customer and the administrator both can access the UPS details with equal ease (and, of course, the administrator also can track the order from the Admin Orders module).

Here is the code:
Code:
{if $order.tracking} <tr> <td>{$lng.lbl_tracking_number}:</td> <td width=10></td> <td><tt><span class="normaljump">{$order.tracking}</span></tt>Click number to track.</td> </tr> <tr> <td>{$lng.lbl_ups_link}:</td> <td width=10></td> <td><tt><span class="normaljump">http://www.ups.com/WebTracking/track?loc=en_US</span></tt> </td> </tr> {/if}

The <span class="normaljump">...</span> statements cause the jumps to display in blue in our emails.

Enjoy!

John Hughes
__________________
X-Cart v. 3.5.4 [Linux]
PHP 4.3.9
MySQL 4.1.12
Perl 5.008005
Apache/2.0.52 [CentOS]

http://www.bitsbytescomputer.com
\"Trustworthy tools for biblical studies.\"
Reply With Quote
  #4  
Old 11-29-2006, 01:07 PM
 
ryan c. ryan c. is offline
 

Advanced Member
  
Join Date: Sep 2002
Posts: 58
 

Default Re: Add a UPS "track it" button to customer email

THis looks great. IS there anyway you can make it work with USPS?

http://www.usps.com/shipping/trackandconfirm.htm

?

Thanks!!
__________________
Version 4.1.8
Reply With Quote
  #5  
Old 11-29-2006, 03:24 PM
  JJH1947's Avatar 
JJH1947 JJH1947 is offline
 

Advanced Member
  
Join Date: Feb 2004
Location: Whitefish, Montana
Posts: 41
 

Default Re: Add a UPS "track it" button to customer email

Ryan,

This will work

<a href="http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=nnnnn "> </a>

but you will have to write a PHP script to automatically place the real tracking number where you see the nnnnn above.

John
__________________
X-Cart v. 3.5.4 [Linux]
PHP 4.3.9
MySQL 4.1.12
Perl 5.008005
Apache/2.0.52 [CentOS]

http://www.bitsbytescomputer.com
\"Trustworthy tools for biblical studies.\"
Reply With Quote
  #6  
Old 11-29-2006, 05:30 PM
 
ryan c. ryan c. is offline
 

Advanced Member
  
Join Date: Sep 2002
Posts: 58
 

Default Re: Add a UPS "track it" button to customer email

Thanks! All I did was add <a href="http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum={$order.tracking }"><b>{$order.tracking}</b> to the email it it worked like a charm!
__________________
Version 4.1.8
Reply With Quote
  #7  
Old 01-11-2007, 07:37 AM
 
ryan c. ryan c. is offline
 

Advanced Member
  
Join Date: Sep 2002
Posts: 58
 

Default Re: Add a UPS "track it" button to customer email

For anyone who uses more than one shipper you can use google to track shipments as well.

http://www.google.com/search?q={$order.tracking}
__________________
Version 4.1.8
Reply With Quote
  #8  
Old 01-16-2007, 12:18 PM
 
Lingerieblowout Lingerieblowout is offline
 

X-Adept
  
Join Date: Sep 2003
Location: Annapolis, MD
Posts: 415
 

Default Re: Add a UPS "track it" button to customer email

Holly Crap didnt know that existed !!!!! Works Great !

Quote:
Originally Posted by ryan c.
For anyone who uses more than one shipper you can use google to track shipments as well.

http://www.google.com/search?q={$order.tracking}
__________________
http://www.lingerieblowout.com
Version 4.1.10

http://www.topnichewebsites.com
Version 4.4.5

Michael
Reply With Quote
  #9  
Old 05-22-2007, 07:27 PM
 
Seacat Seacat is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 29
 

Default Re: Add a UPS "track it" button to customer email

Here's what I'm using on a 4.1.6 cart:

{* $Id: order_customer_complete.tpl,v 1.10 2006/03/31 05:51:43 svowl Exp $ *}
{config_load file="$skin_config"}
{include file="mail/html/mail_header.tpl"}

<p />{$lng.eml_dear|substitute:"customer":"`$customer. title` `$customer.firstname` `$customer.lastname`"},

<p />{$lng.eml_order_complete}


<hr size="1" noshade="noshade" />
<p />
<table cellpadding="2" cellspacing="1" width="100%">
<tr>
<td width="20%"><b>{$lng.lbl_order_id}:</b></td>
<td width="10">&nbsp;</td>
<td width="80%"><tt><b>#{$order.orderid}</b></tt></td>
</tr>
<tr>
<td><b>{$lng.lbl_order_date}:</b></td>
<td width="10">&nbsp;</td>
<td><tt><b>{$order.date|date_format:$config.Appear ance.datetime_format}</b></tt></td>
</tr>
{if $order.tracking}
<tr>
<td><b>{$lng.lbl_tracking_number}:</b></td>
<td width="10">&nbsp;</td>
<td><tt>{$order.tracking}</tt></td>
</tr>
<tr>
<td><a href="http://wwwapps.ups.com/WebTracking/processRequest?HTMLVersion=5.0&Requester=NES&Agree ToTermsAndConditions=yes&loc=en_US&tracknum={$orde r.tracking}">Click here</a> to track if UPS has received your shipment.</td>
<td width=10></td>
<td>You can also copy and paste your tracking number into the <a href="http://www.ups.com/WebTracking/track?loc=en_US">UPS Tracking Tool</a> if you prefer.</td>
</tr>
{/if}
<tr>
<td colspan="3">{include file="mail/html/order_invoice.tpl"}</td>
</tr>
</table>

{include file="mail/html/signature.tpl}

We only use UPS so this one works well for us. Makes a clickable link to the tracking status of that number directly and also gives the option of using the tool. Further, this brings the invoice into the "order completed" mail sent to the customer.

Looks like the preview shows a space in the middle of {$order.tracking} it shouldn't be there.
__________________
Seacat
X-Cart Gold v4.1.6 [linux]
PHP 5.2.2
My SQL 5.0.24
DSEFU Mod
Cartlab CSS Skin
Several other mods
Self-Defense Weapons
Reply With Quote
  #10  
Old 06-12-2007, 12:59 AM
 
dub713 dub713 is offline
 

Advanced Member
  
Join Date: May 2007
Posts: 56
 

Default Re: Add a UPS "track it" button to customer email

anyone have a simple method to display a UPS tracking link/button in the order complete mail if its shipped via UPS, OR a DHL tracking link/button if its shipped via DHL? but not both at the same time.

i would assume a simple IF statment would do the trick, but i'm not sure of how to implement that.

thanks,
__________________
X-Cart version 4.1.7 - PHP 5.2. - MySQL server 5.0.41-community-nt - MySQL client 5.0.22 - Web server Apache/2.2.4 (Win32) - PHP/5.2.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:19 PM.

   

 
X-Cart forums © 2001-2020