如何在管理订单视图信息选项卡中创建新部分?

时间:2013-03-15 13:31:38

标签: magento magento-1.7

我正在尝试在我的管理面板“Sales-> Order-> View”信息标签中创建一个新块。

在我的扩展程序的阻止文件夹中,我有一个名为Adminhtml的文件夹,我的文件名为:Company.php

class Namespace_Modulename_Block_Adminhtml_Company extends Mage_Adminhtml_Block_Sales_Order_Abstract
{
 }

在我的扩展模块中,我已将此代码放在etc.xml

下的config.xml中
 <adminhtml>
    <layout>
        <updates>
            <modulename>
                <file>module.xml</file>
            </modulename>
        </updates>
    </layout>
</adminhtml>

然后我的adminhtml布局文件为:

<?xml version="1.0"?>
  <layout version="0.1.0">
   <modulename_adminhtml_company_index>
    <reference name="order_info">
        <block type="modulename/adminhtml_company" name="modulename" template="company.phtml" />
    </reference>
   </modulename_adminhtml_company_index>
  </layout>

但是什么也没发生,

1 个答案:

答案 0 :(得分:2)

如果这是你想要完成的事情

enter image description here

看看@ Magento custom "order" attribute / admin input and display

如果您要创建新标签,请查看@ http://fishpig.co.uk/magento/tutorials/custom-tabs-magento-product-admin/

相关问题