Magento – variable for shipping tracking no in email

shipment-tracking

I want to add the tracking no to an email, just the number not url.

what is the tracking # variable ?

update

I have modifed the code in track.phtml to this

?>
<?php $_shipment=$this->getShipment() ?>
<?php $_order=$this->getOrder() ?>
<?php if ($_shipment && $_order && $_shipment->getAllTracks()): ?>
<?php $i=0; foreach ($_shipment->getAllTracks() as $_item): $i++ ?>
<?php echo $this->escapeHtml($_item->getNumber()) ?>
<?php endforeach ?>
<?php endif; ?>

but I don't want to have all tracking #, I only want the last added one

how can I do that ?

Best Answer

You should include the tracking details using the following code:

{{block type='core/template' area='frontend' template='email/order/shipment/track.phtml' 
shipment=$shipment order=$order}}

Let me know if it works