Link to carrier at shipment email

by Pantelis   Last Updated September 18, 2018 11:09 AM

i try to add to the shipping number (in shipment email) link to carrier tracking page.

Something i make wrong to track.phtml i think....

any suggestion?

 * Magento
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to so we can send you a copy immediately.
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to for more information.
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2006-2017 X.commerce, Inc. and affiliates (
 * @license  Academic Free License (AFL 3.0)
<?php $_shipment=$this->getShipment() ?>
<?php $_order=$this->getOrder() ?>
<?php if ($_shipment && $_order && $_shipment->getAllTracks()): ?>
<table cellspacing="0" cellpadding="0" border="0" width="650" style="border:1px solid #EAEAEA;">
            <th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Shipped By') ?></th>
            <th align="center" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Tracking Number') ?></th>
    <?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 $this->escapeHtml($_item->getTitle()) ?></td>
            <?php if ($_item->escapeHtml(getCarrierCode())=='elta'): ?>
<td align="center" valign="top" style="padding:3px 9px"><a href="<?php echo $_item->escapeHtml($_item->getNumber()) ?>"><?php echo $_item->escapeHtml($_item->getNumber()) ?></a></td>
<?php else: ?>
            <td align="center" valign="top" style="padding:3px 9px"><?php echo $this->escapeHtml($_item->getNumber()) ?></td>
            <?php endif; ?>
    <?php endforeach ?>

Related Questions

Customize information in sales order email

Updated April 14, 2016 08:03 AM

Magento 1.9 check if order got shipment

Updated September 01, 2017 15:09 PM

Custom shipping email for store pickup

Updated October 03, 2018 14:09 PM