user - How to make admin that can't delete products in Magento? -
As the title says, I am not ready to make administrators who can not delete the product but add that product Can update
Mage_Adminhtml_Block_Catalog_Product_Edit overwrite and create a custom module with ACL then create a custom role and assign it to these users
See /app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php
Protected Functions _prepareLayout () {..... If ($ this-> getProduct () - & gt; Haydel Qualified () & amp; amp; ltd; ACL & gt;) {$ this- & gt; Set Chalk ('delete_button', $ this- & gt; getLayout () - & gt; createBlock ('adminhtml / widget_button') - & gt; setdata (array ('label' = & gt; mega :: helper ('catalog ') -> __ (' Delete '),' onclick '= & Gt; confirmSetLocation (\'. Mage :: helper ('catalog') - & gt; __ ('Are you sure?'). '\', \ '. $ Get-> getDeleteUrl ()' \ ')', 'Class' = & gt; 'Delete'))); } view at a glance
Comments
Post a Comment