Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/236.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Can';t是否重命名Magento中的保存按钮标签?_Php_Magento 1.9 - Fatal编程技术网

Php Can';t是否重命名Magento中的保存按钮标签?

Php Can';t是否重命名Magento中的保存按钮标签?,php,magento-1.9,Php,Magento 1.9,我正在尝试将magento中的“保存”按钮重命名为“提交” 使用此代码 public function __construct() { $this->_objectId = 'item_id'; $this->_blockGroup = 'countingstars'; $this->_controller = 'adminhtml_item'; $this->_updateButton('save

我正在尝试将magento中的“保存”按钮重命名为“提交”

使用此代码

public function __construct()
    {
        $this->_objectId = 'item_id';
        $this->_blockGroup = 'countingstars';
        $this->_controller = 'adminhtml_item';

        $this->_updateButton('save', 'label', Mage::helper('countingstars')->__('Submit'));

        parent::__construct();
        $this->_removeButton('delete');
    }

但是我不能让它工作。

最终使它工作了,\u updateButton()应该放在\u构造()之后。因此,代码应该如下所示:

public function __construct()
    {
        $this->_objectId = 'item_id';
        $this->_blockGroup = 'countingstars';
        $this->_controller = 'adminhtml_item';

        parent::__construct();
        $this->_removeButton('delete');
$this->_updateButton('save', 'label', Mage::helper('countingstars')->__('Submit'));
    }