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
  #31  
Old 08-30-2008, 11:52 AM
 
stanlee stanlee is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 53
 

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

Quote:
Originally Posted by MoonDog
for X-Cart v4.1.8
try this, replace your skin1/mail/html/order_customer_complete.tpl with the one below:
Code:
{* $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} <br> This is confirmation that the products you ordered have been shipped to you! <br> Shipping usually takes 3-5 days depending on your location. <br> {if $order.tracking} Your {$order.shipping_vendor} tracking number is {$order.tracking} <br> Please allow up to 24 hours for the {$order.shipping_vendor} tracking system to update this information. {/if} <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>#{$order.orderid}</tt></td> </tr> <tr> <td><b>{$lng.lbl_order_date}:</b></td> <td width="10">&nbsp;</td> <td><tt>{$order.date|date_format:$config.Appearance.datetime_format}</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> <td><b>Track your order:</b></td> <td width="10">&nbsp;</td> {assign var="postal_service" value=$order.shipping_vendor|truncate:3:"":true} <td><tt> {if $postal_service eq "UPS"} {include file="modules/Order_Tracking/ups.tpl"} {elseif $postal_service eq "DHL"} {include file="modules/Order_Tracking/dhl.tpl"} {elseif $postal_service eq "USP"} {include file="modules/Order_Tracking/usps.tpl"} {elseif $postal_service eq "Fed"} {include file="modules/Order_Tracking/fedex.tpl"} {else $order.tracking} {/if} {/if} </tt></td></tr> <tr> <td colspan="3">{include file="mail/html/order_data.tpl"}</td> </tr> </table> {include file="mail/html/signature.tpl"}

- MoonDog -

Great mod, thank you for posting it, saved me a lot of time and frustration.
I use x-cart version 4.1.10, so I changed $order.shipping_vendor to $order.shipping.
Now it works fine.
__________________
xcart gold 4.1.11
Dedicated server Intel i5-2400 CPU, 8GB RAM
CentOS 5, Plesk Panel v10.4
mods: MAP Pricing, Advanced Speedbar,
Tabbed Product Menu, Multiple Manufacturers,
Customer Reviews Search, Edit & Delete,
Pre-login Shipping Estimate, FREEOVERX. X-AOM
Reply With Quote
  #32  
Old 09-21-2008, 11:31 PM
 
floyd_2 floyd_2 is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 69
 

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

Hi guys,
in Australia, I mostly use TNT as my carrier. However, I can't quite get my head around how to populate their tracking form with my TNT tracking numbers. I can get the Track It radio button to head over to TNT's website (www.tnt.com.au), but I just can't seem to get it to populate the consignment input box with the tracking number. If anyone has gone down this path already, I'd be really interested to read about it.

Thanks

Dean
__________________
X-Cart Gold v4.1.8
Reply With Quote
  #33  
Old 09-25-2008, 03:33 AM
 
floyd_2 floyd_2 is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 69
 

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

Hi guys,
it's me once again. I managed to work out how to populate the shipping form on the newly released Australian TNT web site, and it works like a charm. It was the new asp form on TNT Australia's site that was tricking me.

In modules/Order_Tracking, create a TNT template called tnt.tpl like this:

HTML Code:
{* $Id: tnt.tpl,v 1.1 2008/09/26 14:07:32 twice Exp $ *} <form id="Tracking" name="Tracking" action="http://www.tntexpress.com.au/InterAction/ASPs/CnmHxAS.asp?{$order.tracking}" method="post" target="_blank"> <input type="submit" value="{$lng.lbl_track_it|strip_tags:false|escape}" /> <br /> {$lng.txt_tnt_redirection} </form>

Don't forget to create a new label, in Languages, called txt_tnt_redirection. Populate that label with:

Code:
You will be redirected to the TNT Delivery service site, by clicking this button.


This allows your customers to click Track It! and it will take them to the results page for the TNT Domestic Consignment Tracker for that consignment.

I have done the same with Couriers Please (slightly different code but same results), and also embedded a Track It! button in the Order Completion emails for good measure.

For anyone who may be interested, the Couriers Please tracking template looks like this:

HTML Code:
{* $Id: couriers_please.tpl,v 1.1 2008/09/25 14:07:32 twice Exp $ *} <form name="barcode" action="http://www.couriersplease.com.au/track.php?printable=true&couponid={$order.tracking}" method="post" target="_blank"> <input type="submit" value="{$lng.lbl_track_it|strip_tags:false|escape}" /> <br /> {$lng.txt_cplease_redirection} </form>

Dean
__________________
X-Cart Gold v4.1.8
Reply With Quote
  #34  
Old 10-01-2013, 09:13 AM
 
fiberglass.supply fiberglass.supply is offline
 

Senior Member
  
Join Date: Dec 2012
Location: Florida
Posts: 171
 

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

Would like code to make this work with fedex
Reply With Quote
  #35  
Old 10-01-2013, 11:55 AM
 
fiberglass.supply fiberglass.supply is offline
 

Senior Member
  
Join Date: Dec 2012
Location: Florida
Posts: 171
 

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

For fedex here is the code


<p><a href="http://www.fedex.com/fedextrack/?tracknumbers={$order.tracking}">Track My Order</a></p>

Add to email template in commonfiles/mail/html/order_customer_complete.tpl

Might be somewhere else depending on your template and config but its definatly in order_customer_complete.tpl

You are all welcome.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:00 AM.

   

 
X-Cart forums © 2001-2020