There is an extension which I want to add a little more features on. To achieve that I need to modify two .phtml files in
app/design/adminhtml/default/default/template/Orderpreparation/Packing/Index.phtml app/design/adminhtml/default/default/template/Orderpreparation/Packing/Products.phtml
I found that Index.phtml is mentioned in
app/design/adminhtml/default/default/layout/orderpreparation.xml
<?xml version="1.0"?>
<layout version="0.1.0">
<adminhtml_orderpreparation_packing_index>
<reference name="head">
...
</reference>
<reference name="content">
...
<block type="Orderpreparation/Packing_Index" name="onepagepreparation" as="onepagepreparation" template="Orderpreparation/Packing/Index.phtml">
</block>
</reference>
</adminhtml_orderpreparation_packing_index>
</layout>
On the packing page in the admin, selecting an option in a dropdown list with trigger Products.phtml to be loaded via AJAX and I can't find anywhere of triggering the Products.phtml.
If I want to override Index.phtml should I just create an xml file in layout folder as below:
app/design/adminhtml/default/default/layout/my_own_xml_to_override_index.xml
<?xml version="1.0"?>
<layout version="0.1.0">
<adminhtml_orderpreparation_packing_index>
<reference name="content">
<block type="Orderpreparation/Packing_Index" name="onepagepreparation" as="onepagepreparation" template="MyOwnFiles/Packing/Index.phtml">
</block>
</reference>
</adminhtml_orderpreparation_packing_index>
</layout>
Do I have do anything else to make sure Index.phtml will be override by my own phtml?
No idea how to I setup to override the Products.phtml?
Do I need to create a new extension in this case?
I created my own extension and below is the config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Company_ErpFlyerReminder>
<version>1.0.0</version>
</Company_ErpFlyerReminder>
</modules>
<adminhtml>
<layout>
<updates>
<flyerreminder>
<file>packingflyerreminder.xml</file>
</flyerreminder>
</updates>
</layout>
</adminhtml>
<frontend>
<layout>
<updates>
<flyerreminder>
<file>flyerreminder.xml</file>
</flyerreminder>
</updates>
</layout>
</frontend>
<global>
<blocks>
<flyerreminder>
<class>Company_ErpFlyerReminder_Block</class>
</flyerreminder>
<adminhtml>
<rewrite>
<packing_index>Company_ErpFlyerReminder_Block_Packing_Index</packing_index>
</rewrite>
</adminhtml>
</blocks>
</global>
</config>
app/etc/modules/Company_ErpFlyerReminder.xml
<?xml version="1.0"?>
<config>
<modules>
<Company_ErpFlyerReminder>
<active>true</active>
<codePool>local</codePool>
<depends>
<MDN_Orderpreparation/>
</depends>
</Company_ErpFlyerReminder>
</modules>
</config>
app/code/local/Company/ErpFlyerReminder/Block/Packing/Index.php
<?php
class Rycomau_ErpFlyerReminder_Block_Packing_Index extends MDN_OrderPreparation_Block_Packing_Index
{
}