How to create a customer attribute is explained in various answers such as this or this. What they all have in common, is that when creating the attribute its properties user_defined and system are always defined like this:

'user_defined' => true,
'system' => false,

For me this doesn't work. When setting the properties as seen above the attribute is not visible in the adminhtml customer edit form. When setting user_defined => false and system => true it is shown but now saved. It only works (showing in form and saving) when both properties are set to false.

So my question is what is the difference between the two properties and what are they used for?

I am aware that these properties are used to mark "system attributes" which cannot be deleted easily like describes in this answer. I am looking for a more in depth answer what the difference between user_defined and system is. In addition what are both properties used for individually?

  • check this link magento.stackexchange.com/questions/191523/… . In this link it explain good one – Jinesh Apr 8 '20 at 10:31
  • 1
    Unfortunately this answer only says that user_defined marks attributes as "system attributes" I am aware that both properties are marking attributes as "system attributes". I am looking for an answer that describes the differences between them both and a more in depth approach in what they are used for. Like: "It is used in X places to determine X" – Daniel Apr 8 '20 at 12:26
  • Magento system attributes are set to false for user_defined so our custom attributes should be set to true. System attributes can not be deleted so if you set false to user_defined, your attribute will work as system attribute. – Jinesh Apr 8 '20 at 13:24

system > you cannot delete it this attribute from admin and it is created by magento core user_defined : you can delete it and generally when u create custom attribute it will be user_defined.

  • 1
    Unfortunately this does not answer my question. – Daniel Apr 9 '20 at 9:05

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.