I have altered a template fi开发者_StackOverflowle in:
app/design/adminhtml/default/default/template/sales/order/shipment/create/tracking.phtml
However i'd like to save this file with these new changes into a new file and leave tracking.phtml in its stock standard form and somehow redirect the block to the location of the new file and use it instead.
Mage_Adminhtml_Block_Sales_Order_Shipment_Create_Tracking is the class I think i have to change and i've tried creating a constructor in it and using a few different methods such as Mage::settheme and $this->setTemplate but none of them make a difference.
Any help would be greatly appricated
Look in the file 'app/design/adminhtml/default/default/layout/sales.xml', tracking.phtml is used several times. If this change is for a module then create a layout file 'yourmodule.xml' and enable it from your config file. Otherwise name it 'local.xml'. It's contents will have to be an update something like this:
<?xml version="1.0"?>
<layout>
<adminhtml_sales_order_shipment_new>
<reference name="shipment_tracking">
<action method="setTemplate">
<template>your/new/tracking.phtml</template>
</action>
</reference>
</adminhtml_sales_order_shipment_new>
</layout>
精彩评论