Change Tracking Information from Shipment # to Order #

shipment-trackingshippingtemplate

I'm trying to change the pop-up window when customers track their orders, the pop-up currently shows:

"Shipment #" I would like to change this to the actual order number.

I have tried the following:

 <h2 class="sub-title"><?php echo $this->__('Order #'),$_order->getRealOrderId();?></h2>

But it doesn't load.

The original file is located in:

default/template/shipping/tracking/popup.phtml

How can I display the Order # instead of the Shipment # on this pop up?

Best Answer

Take a look at app/design/frontend/base/default/layout/shipping.xml to find the block for this template.

<reference name="content">
        <block type="shipping/tracking_popup" name="shipping.tracking.popup" template="shipping/tracking/popup.phtml" />
</reference>

Now if you take a look at Mage_Shipping_Block_Tracking_Popup you will notice that you can not get the order object directly.

So in your template file try this before your code above

 $_order = Mage::getModel('sales/order')->load($this->getOrderId());
Related Topic