Magento – Order Tracking not showing up in shipment email

emailmagento-1.6shipping

Our site is sending shipment emails, but the email contains no tracking info. I've created a new template based off of the default one and added {{block type='core/template' area='frontend' template='email/order/shipment/track.phtml' shipment=$shipment order=$order}} but that part of the email is empty. When I click "Track Shipment" in the admin panel, it brings up the tracking number and a link to UPS,

We have a UPS API integrated to create shipments directly from Magento. It appears that the shipment email is being sent before the tracking number comes back. There is also a green status message that says "The shipment has been created." before any of the information like weight and dimensions are entered.

Looks like I get to dig through some code and move some things around.

What could I be missing?
Any help would be great here.

Best Answer

Possibly a little late for this, but....

There's a thread on the Magento forums here: http://www.magentocommerce.com/boards/viewthread/9594/

If you look at the code for Mage_Sales_Model_Order_Shipment_Api, the confirmation email is being sent out as part of the create() function. Then, the tracking details are added later with a call to addTrack(), but by that time, the email is already sent.

The suggested solution is to edit the source and move the call to $shipment->sendEmail(), but I suspect that that isn't the most elegant solution - I suspect you'd be better off extending the class instead, and doing it that way.

Related Topic