How can I Hide Edit button in Sales Order section in magento
-
21-10-2020 - |
Решение
You will need to use event adminhtml_widget_container_html_before
<global>
<events>
<!-- another events may be here -->
<adminhtml_widget_container_html_before>
<observers>
<remove_edit_button>
<class>your_module/observer</class>
<method>removeEditButton</method>
</remove_edit_button>
</observers>
</adminhtml_widget_container_html_before>
<!-- another events may be here -->
</events>
</global>
Now in your observer file create function as below
public function removeEditButton($observer)
{
$container = $observer->getBlock();
if (null !== $container && $container->getType() == 'adminhtml/sales_order_view') {
$container->removeButton('order_edit');
}
return $this;
}
Не связан с magento.stackexchange