I ask another similar question before ask this question.

Magento 2: How to set default value of quantity in new product page

However, I cannot set "disable" to "Enable Product" field by default. I try to find the xml file to add

<item name="value" xsi:type="string">1</item>

However, I cannot find where it can put. Also, I try to change the meta for this field.

$meta["product-details"]["children"]["container_status"]["children"]["status"]["arguments"]["data"]["config"]["default"] = "2";

After add this to my modifer. It still show "Enable" by default.

Is I do something wrong about set it to disable?


Go to your database and change the default value to status attribute to 0 instead of 1.

You can find the attribute in eav_attribute table. By default it will be having id as 97

You can also change the default value in admin. Go to store-> attribute -> product-> search for status attribute. And change its default value

  • sorry, I tried and it still show enable... – Haze Oct 24 '17 at 9:28
  • Try doing reindexing and cleaning cache – Vivek Oct 24 '17 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.