Create: app/code/local/Itflex/CustomSalestab/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Itflex_CustomSalestab>
<version>1.0.1</version>
</Itflex_CustomSalestab>
</modules>
<global>
<blocks>
<customsalestab>
<class>Itflex_CustomSalestab_Block</class>
</customsalestab>
</blocks>
</global>
<adminhtml>
<layout>
<updates>
<customsalestab>
<file>itflex_customsalestab.xml</file>
</customsalestab>
</updates>
</layout>
</adminhtml>
</config>
Create: app/code/local/Itflex/CustomSalestab/Block/Adminhtml/Order/View/Tab/Customtab.php
<?php
class Itflex_CustomSalestab_Block_Adminhtml_Order_View_Tab_Customtab
extends Mage_Adminhtml_Block_Template
implements Mage_Adminhtml_Block_Widget_Tab_Interface
{
public function _constuct()
{
parent::_construct();
$this->setTemplate('itflex/customsalestab/order/view/tab/customtab.phtml');
}
public function getTabLabel() {
return $this->__('Custom Tab');
}
public function getTabTitle() {
return $this->__('Custom Tab');
}
public function canShowTab() {
return true;
}
public function isHidden() {
return false;
}
public function getOrder(){
return Mage::registry('current_order');
}
}
?>
Create: app/design/adminhtml/default/default/template/itflex/customsalestab/order/view/tab/customtab.phtml
<?php echo 'add your html/php code here'; ?>
Create: app/design/adminhtml/default/default/layout/itflex_customsalestab.xml
<?xml version="1.0"?>
<layout>
<adminhtml_sales_order_view>
<reference name="sales_order_tabs">
<action method="addTab">
<name>order_view_tab_order</name>
<block>customsalestab/adminhtml_order_view_tab_customtab</block>
</action>
</reference>
</adminhtml_sales_order_view>
</layout>
Create: app/etc/modules/Itflex_CustomSalestab.xml
<?xml version="1.0"?>
<config>
<modules>
<Itflex_CustomSalestab>
<active>true</active>
<codePool>local</codePool>
</Itflex_CustomSalestab>
</modules>
</config>
<?xml version="1.0"?>
<config>
<modules>
<Itflex_CustomSalestab>
<version>1.0.1</version>
</Itflex_CustomSalestab>
</modules>
<global>
<blocks>
<customsalestab>
<class>Itflex_CustomSalestab_Block</class>
</customsalestab>
</blocks>
</global>
<adminhtml>
<layout>
<updates>
<customsalestab>
<file>itflex_customsalestab.xml</file>
</customsalestab>
</updates>
</layout>
</adminhtml>
</config>
Create: app/code/local/Itflex/CustomSalestab/Block/Adminhtml/Order/View/Tab/Customtab.php
<?php
class Itflex_CustomSalestab_Block_Adminhtml_Order_View_Tab_Customtab
extends Mage_Adminhtml_Block_Template
implements Mage_Adminhtml_Block_Widget_Tab_Interface
{
public function _constuct()
{
parent::_construct();
$this->setTemplate('itflex/customsalestab/order/view/tab/customtab.phtml');
}
public function getTabLabel() {
return $this->__('Custom Tab');
}
public function getTabTitle() {
return $this->__('Custom Tab');
}
public function canShowTab() {
return true;
}
public function isHidden() {
return false;
}
public function getOrder(){
return Mage::registry('current_order');
}
}
?>
Create: app/design/adminhtml/default/default/template/itflex/customsalestab/order/view/tab/customtab.phtml
<?php echo 'add your html/php code here'; ?>
Create: app/design/adminhtml/default/default/layout/itflex_customsalestab.xml
<?xml version="1.0"?>
<layout>
<adminhtml_sales_order_view>
<reference name="sales_order_tabs">
<action method="addTab">
<name>order_view_tab_order</name>
<block>customsalestab/adminhtml_order_view_tab_customtab</block>
</action>
</reference>
</adminhtml_sales_order_view>
</layout>
Create: app/etc/modules/Itflex_CustomSalestab.xml
<?xml version="1.0"?>
<config>
<modules>
<Itflex_CustomSalestab>
<active>true</active>
<codePool>local</codePool>
</Itflex_CustomSalestab>
</modules>
</config>
No comments:
Post a Comment