Php Can';t是否重命名Magento中的保存按钮标签?
我正在尝试将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
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'));
}