X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Add a UPS "track it" button to customer email (https://forum.x-cart.com/showthread.php?t=14498)

Allan Martel 06-10-2005 12:27 PM

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

balinor 06-10-2005 12:55 PM

Very nicely done! =D>

JJH1947 07-16-2005 04:58 PM

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

ryan c. 11-29-2006 01:07 PM

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!! :)

JJH1947 11-29-2006 03:24 PM

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

ryan c. 11-29-2006 05:30 PM

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!

ryan c. 01-11-2007 07:37 AM

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}

Lingerieblowout 01-16-2007 12:18 PM

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}


Seacat 05-22-2007 07:27 PM

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.

dub713 06-12-2007 12:59 AM

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,


All times are GMT -8. The time now is 05:56 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.