Want to add tracking information to an existing Magento shipment? Here is the code you can use:
$shipment = $order->getShipmentsCollection()->getFirstItem();
$trackingNumber = '12345678';
$track = Mage::getModel('sales/order_shipment_track')
->setData('carrier_code', 'carrier code')
Adding tracking information to shipment
You want or need help implementing this solution? Maybe you did not find what you were looking for? Contact me and I will assist you with whatever Magento problem troubles you!