How to Hide a Field on a Product Edit Page in Magento Backend Using Observer

April 8, 2016 Aleksei Grigorenko Magento
How to Hide a Field on a Product Edit Page in Magento Backend Using Observer

There is a specific set of fields that are displayed by default on the product settings page. However, there can be certain conditions when the fields should not be displayed, for instance: Minimum Sell Price attribute should be editable for the Admin access level users, but others should have no access to this field.

How to Hide a Field on a Product Edit Page in Magento backend Using Observer

Add a new event to config.xml  core_block_abstract_prepare_layout_befor

Then add the following code to Observer.php

As a result the field Minimum Sell Price will not be displayed on the product settings page.



2 comments

  1. How to achieve same in magento 2 ? I have tried, but not getting the exact event in which we can capture the attributes and unset them.

  2. Prajakta,
    Thank you for this question!
    We will do our best to answer it in our future articles.

Post a new comment

top
BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *