Magento: rewriting templates

I changed the template file to:

app / design / adminhtml / default / default / template / sale / order / shipment / create / tracking.phtml

However, I would like to save this file with these new changes to a new file and leave the tracking.phtml file in standard 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 a class that I think I need to change, and I tried to create a constructor in it and use several different methods like Mage :: settheme and $ this-> setTemplate, but none of them matter.

Any help would be very convenient.

+4
source share
1 answer

Look in the file 'app / design / adminhtml / default / default / layout / sales.xml', tracking.phtml is used several times. If this is a change for the module, then create the layout file "yourmodule.xml" and include it from your configuration file. Otherwise, name it "local.xml". This content should be updated 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> 
+6
source

All Articles