Edit: Additionally to the code below, I have also tried to do exactly what this tutorial tells: http://www.magentothemess.com/archives/1267 Magento still wants to call a block, which name begins with "Mage_" :(
Original Post
I've tried so many tutorials, but Magento is still saying the same:
Invalid Blocktype: Mage_AdminModifications_Block_Adminhtml_Sales_Order_View_Tab_Custom.php
What I've done?
code/local/MyNamespace/AdminModifications/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<MyNamespace_AdminModifications>
<version>1.0</version>
</MyNamespace_AdminModifications>
</modules>
<global>
<blocks>
<MyNamespace_AdminModifications>
<class>MyNamespace_AdminModifications_Block</class>
</MyNamespace_AdminModifications>
</blocks>
<models>
<MyNamespace_AdminModifications>
<class>MyNamespace_AdminModifications_Model</class>
</MyNamespace_AdminModifications>
</models>
</global>
<adminhtml>
<layout>
<updates>
<MyNamespace_AdminModifications>
<file>adminmodifications.xml</file>
</MyNamespace_AdminModifications>
</updates>
</layout>
</adminhtml>
</config>
design/adminhtml/default/default/layout/adminmodifications.xml
<?xml version="1.0"?>
<layout>
<adminhtml_sales_order_view>
<reference name="sales_order_tabs">
<action method="addTab">
<name>order_custom</name>
<block>AdminModifications/adminhtml_sales_order_view_tab_custom</block>
</action>
</reference>
</adminhtml_sales_order_view>
</layout>
code/local/MyNamespace/AdminModifications/Block/Adminhtml/Sales/Order/View/Tab/Custom.php
<?php
class MyNamespace_AdminModifications_Block_Adminhtml_Sales_Order_View_Tab_Custom
extends Mage_Adminhtml_Block_Template
implements Mage_Adminhtml_Block_Widget_Tab_Interface
{
protected $_chat = null;
protected function _construct()
{
parent::_construct();
$this->setTemplate('custom/tab.phtml');
}
public function getTabLabel() {
return $this->__('Custom Tab');
}
public function getTabTitle() {
return $this->__('Custom Overview');
}
public function canShowTab() {
return true;
}
public function isHidden() {
return false;
}
public function getOrder(){
return Mage::registry('current_order');
}
design/adminhtml/default/default/template/custom/tab.phtml (jus copied from somewhere for testing)
<?php
/**
* Custom tab template
*/
?>
<div class="input-field">
<label for="custom_field">Custom Field</label>
<input type="text" class="input-text" name="custom_field" id="custom_field" />
</div>
Where is my mistake hidden?