{"id":11104,"date":"2016-04-08T12:27:56","date_gmt":"2016-04-08T09:27:56","guid":{"rendered":"http:\/\/blog.belvg.com\/?p=11104"},"modified":"2025-07-01T09:28:19","modified_gmt":"2025-07-01T07:28:19","slug":"how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer","status":"publish","type":"post","link":"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html","title":{"rendered":"How to Hide a Field on a Product Edit Page in Magento Backend Using Observer"},"content":{"rendered":"\n<p>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.<\/p>\n<p><!--more--><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter wp-image-11105 size-belvg-post-content\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2016\/04\/field1-850x482.jpg\" alt=\"How to Hide a Field on a Product Edit Page in Magento backend Using Observer\" width=\"850\" height=\"482\" title=\"How to Hide a Field on a Product Edit Page in Magento Backend Using Observer\"><\/p>\n<p>Add a new event to config.xml &nbsp;<strong>core_block_abstract_prepare_layout_befor<\/strong><\/p>\n<pre class=\"lang:php decode:true \">&lt;adminhtml&gt;\r\n   &lt;events&gt;\r\n       &lt;core_block_abstract_prepare_layout_before&gt;\r\n           &lt;observers&gt;\r\n               &lt;belvg_minsellprice_hide_attribute&gt;\r\n                   &lt;type&gt;singleton&lt;\/type&gt;\r\n                   &lt;class&gt;belvg_minsellprice\/observer&lt;\/class&gt;\r\n                   &lt;method&gt;removeAttribute&lt;\/method&gt;\r\n               &lt;\/belvg_minsellprice_hide_attribute&gt;\r\n           &lt;\/observers&gt;\r\n       &lt;\/core_block_abstract_prepare_layout_before&gt;\r\n   &lt;\/events&gt;\r\n&lt;\/adminhtml&gt;\r\n<\/pre>\n<p>Then add the following code to Observer.php<\/p>\n<pre class=\"lang:php decode:true\">public function removeAttribute(Varien_Event_Observer $event)\r\n{\r\n&nbsp;&nbsp; $block = $event-&gt;getBlock();\r\n&nbsp;&nbsp; if (!($block instanceof Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs)) {\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;\r\n&nbsp;&nbsp; }\r\n\r\n&nbsp;&nbsp; \/\/ add your conditional check here\r\n&nbsp;\r\n&nbsp;&nbsp; $editableAttributes = $block-&gt;getProduct()-&gt;getTypeInstance()-&gt;getEditableAttributes()\r\n&nbsp;&nbsp; unset($editableAttributes['min_sell_price']);&nbsp; \/\/ Remove fields which you need hide\r\n&nbsp;\r\n&nbsp;&nbsp; $block-&gt;getProduct()-&gt;setData('_cache_editable_attributes', $editableAttributes);\r\n}\r\n<\/pre>\n<p>As a result the field Minimum Sell Price will not be displayed on the product settings page.<\/p>\n\n","protected":false},"excerpt":{"rendered":"There is a specific set of fields that are displayed by default on the product &#8230;","protected":false},"author":42,"featured_media":11106,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_acf_changed":false,"footnotes":""},"categories":[14],"tags":[],"class_list":["post-11104","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-magento","post_format-post-format-image"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.4 - aioseo.com -->\n\t<meta name=\"description\" content=\"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: we want them to be available for the users with the Admin permissions.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Aliaksei Hryharenka\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.4\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#article\",\"name\":\"How to Hide a Field on a Product Edit Page in Magento | BelVG Blog\",\"headline\":\"How to Hide a Field on a Product Edit Page in Magento Backend Using Observer\",\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/aleksei-grigorenko#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/Magento-2.0-Tips-blog_hide-a-field.jpg\",\"width\":737,\"height\":200},\"datePublished\":\"2016-04-08T12:27:56+02:00\",\"dateModified\":\"2025-07-01T09:28:19+02:00\",\"inLanguage\":\"en-US\",\"commentCount\":4,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#webpage\"},\"articleSection\":\"Magento, Image\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento#listItem\",\"name\":\"Magento\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento#listItem\",\"position\":2,\"name\":\"Magento\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#listItem\",\"name\":\"How to Hide a Field on a Product Edit Page in Magento Backend Using Observer\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#listItem\",\"position\":3,\"name\":\"How to Hide a Field on a Product Edit Page in Magento Backend Using Observer\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento#listItem\",\"name\":\"Magento\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/aleksei-grigorenko#author\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/aleksei-grigorenko\",\"name\":\"Aliaksei Hryharenka\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bc7dc67af8fb059c80185d983bee2fdba6e6500979e4cb118ee4ba0de94c7837?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Aliaksei Hryharenka\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#webpage\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html\",\"name\":\"How to Hide a Field on a Product Edit Page in Magento | BelVG Blog\",\"description\":\"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: we want them to be available for the users with the Admin permissions.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/aleksei-grigorenko#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/aleksei-grigorenko#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/Magento-2.0-Tips-blog_hide-a-field.jpg\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html\\\/#mainImage\",\"width\":737,\"height\":200},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#mainImage\"},\"datePublished\":\"2016-04-08T12:27:56+02:00\",\"dateModified\":\"2025-07-01T09:28:19+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to Hide a Field on a Product Edit Page in Magento | BelVG Blog","description":"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: we want them to be available for the users with the Admin permissions.","canonical_url":"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#article","name":"How to Hide a Field on a Product Edit Page in Magento | BelVG Blog","headline":"How to Hide a Field on a Product Edit Page in Magento Backend Using Observer","author":{"@id":"https:\/\/belvg.com\/blog\/author\/aleksei-grigorenko#author"},"publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2016\/04\/Magento-2.0-Tips-blog_hide-a-field.jpg","width":737,"height":200},"datePublished":"2016-04-08T12:27:56+02:00","dateModified":"2025-07-01T09:28:19+02:00","inLanguage":"en-US","commentCount":4,"mainEntityOfPage":{"@id":"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#webpage"},"isPartOf":{"@id":"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#webpage"},"articleSection":"Magento, Image"},{"@type":"BreadcrumbList","@id":"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/belvg.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento#listItem","name":"Magento"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento#listItem","position":2,"name":"Magento","item":"https:\/\/belvg.com\/blog\/category\/magento","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#listItem","name":"How to Hide a Field on a Product Edit Page in Magento Backend Using Observer"},"previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#listItem","position":3,"name":"How to Hide a Field on a Product Edit Page in Magento Backend Using Observer","previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento#listItem","name":"Magento"}}]},{"@type":"Organization","@id":"https:\/\/belvg.com\/blog\/#organization","name":"BelVG Blog","description":"Magento and Prestashop articles","url":"https:\/\/belvg.com\/blog\/"},{"@type":"Person","@id":"https:\/\/belvg.com\/blog\/author\/aleksei-grigorenko#author","url":"https:\/\/belvg.com\/blog\/author\/aleksei-grigorenko","name":"Aliaksei Hryharenka","image":{"@type":"ImageObject","@id":"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/bc7dc67af8fb059c80185d983bee2fdba6e6500979e4cb118ee4ba0de94c7837?s=96&d=mm&r=g","width":96,"height":96,"caption":"Aliaksei Hryharenka"}},{"@type":"WebPage","@id":"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#webpage","url":"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html","name":"How to Hide a Field on a Product Edit Page in Magento | BelVG Blog","description":"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: we want them to be available for the users with the Admin permissions.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/belvg.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#breadcrumblist"},"author":{"@id":"https:\/\/belvg.com\/blog\/author\/aleksei-grigorenko#author"},"creator":{"@id":"https:\/\/belvg.com\/blog\/author\/aleksei-grigorenko#author"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2016\/04\/Magento-2.0-Tips-blog_hide-a-field.jpg","@id":"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html\/#mainImage","width":737,"height":200},"primaryImageOfPage":{"@id":"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html#mainImage"},"datePublished":"2016-04-08T12:27:56+02:00","dateModified":"2025-07-01T09:28:19+02:00"},{"@type":"WebSite","@id":"https:\/\/belvg.com\/blog\/#website","url":"https:\/\/belvg.com\/blog\/","name":"BelVG Blog","description":"Magento and Prestashop articles","inLanguage":"en-US","publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"}}]}},"aioseo_meta_data":{"post_id":"11104","title":"How to Hide a Field on a Product Edit Page in Magento | #site_title","description":"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: we want them to be available for the users with the Admin permissions.","keywords":null,"keyphrases":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-11-03 18:37:31","updated":"2026-11-03 18:37:31"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/category\/magento\" title=\"Magento\">Magento<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to Hide a Field on a Product Edit Page in Magento Backend Using Observer\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/belvg.com\/blog\/"},{"label":"Magento","link":"https:\/\/belvg.com\/blog\/category\/magento"},{"label":"How to Hide a Field on a Product Edit Page in Magento Backend Using Observer","link":"https:\/\/belvg.com\/blog\/how-to-hide-a-field-on-a-product-edit-page-in-magento-backend-using-observer.html"}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/11104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/comments?post=11104"}],"version-history":[{"count":-4,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/11104\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media\/11106"}],"wp:attachment":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media?parent=11104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/categories?post=11104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/tags?post=11104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}