Ever needed more than just a tracking number on the shipment emails that get sent out? It’s fairly easy to put a link in the app/design/frontend/default/default/template/email/order/shipment/track.phtml file. The tracking links obviously will change from courier to courier but for this site the only delivery method was APC.

<?php $oShippingAddress = $_order->getShippingAddress(); ?>
<?php $sPostcode = $oShippingAddress->getPostcode(); ?>
<?php $i=0; foreach ($_shipment->getAllTracks() as $_item): $i++ ?>
    <tr <?php echo $i%2?'bgcolor="#F6F6F6"':'' ?>>
        <td align="left" valign="top" style="padding:3px 9px">
        	<?php echo $_item->getTitle() ?>
        </td>
        <td align="center" valign="top" style="padding:3px 9px">
        	<?php $sShippingType 	= $_item->getTitle(); ?>
        	<?php echo $_item->getNumber() ?>
        	<?php if( stripos($sShippingType, 'apc') !== false) : ?>
        		<a href="http://www.apc-overnight.com/apc/quickpod.php?txtpostcode=<?php echo $sPostcode; ?>&txtconno=<?php echo $_item->getNumber(); ?>&Track=Track&type=1">Track my order</a>
        	<?php endif; ?>
        </td>
    </tr>
<?php endforeach ?>