I want to add a custom tab to the order page in the admin of magento. Is there a way to do this with a simple override?
Assuming you know how to do a module, here are the steps you need to perform:
layout update: in your admin's xml layout file you want to "listening" to the admin's order view rendering handle and add your tab:
the_name_of_your_tab the_block_alias_of_your_module/path_to_your_tab_file
the tab file: I generally try to respect Magento's folder structure, so this file would be in app/code/local-or-community/YourNamespace/YourModule/Block/Adminhtml/Order/View/Tab/File.php and will have at least:
setTemplate('yourmodule/order/view/tab/file.phtml');
}
public function getTabLabel() {
return $this->__('Tab label');
}
public function getTabTitle() {
return $this->__('Tab title');
}
public function canShowTab() {
return true;
}
public function isHidden() {
return false;
}
public function getOrder(){
return Mage::registry('current_order');
}
The .phtml file, which has to respect the path you specified in the block's __construct(), and should hace something like:
__('a title'); ?>
the content you want to show
Hope That Helps