如何添加新的按钮顺序查看在Magento管理面板? [英] How to add new button to order view in Magento admin panel?

查看:227
本文介绍了如何添加新的按钮顺序查看在Magento管理面板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何添加自定义按钮顺序查看页面近后退和编辑?

How to add custom button to order view page near "Back" and "Edit"?

推荐答案

config.xml文件:

<global>
    <blocks>
         <adminhtml>
            <rewrite>
                <sales_order_view>Namespace_Module_Block_Adminhtml_Sales_Order_View</sales_order_view>
            </rewrite>
        </adminhtml>
    </blocks>
 </global>

命名空间/模块/座/ Adminhtml /销售/订单/ View.php:

class Namespace_Module_Block_Adminhtml_Sales_Order_View extends Mage_Adminhtml_Block_Sales_Order_View {
    public function  __construct() {

        parent::__construct();

        $this->_addButton('button_id', array(
            'label'     => Mage::helper('xxx')->__('Some action'),
            'onclick'   => 'jsfunction(this.id)',
            'class'     => 'go'
        ), 0, 100, 'header', 'header');
    }
}

这篇关于如何添加新的按钮顺序查看在Magento管理面板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆