I have Magento2 multiple websites. I already added some custom attributes for the customer entity, and I wonder if it's possible to set the is_required field per website. For example, I have an attribute customer_shop_name. On the first website (b2b) this attribute will be displayed in the form and required. On the second website (b2c) this attribute will not be displayed, and should not be required.

Actually, when I created this attribute I set it to be required by default. And now, if I try to create an account on the second website, the field is not displayed, but I cannot create the account because the attribute is required. So I just get an error.

I found this question on stack overflow: https://stackoverflow.com/questions/45131554/change-attribute-data-for-a-store-magento-2 So I tried and succeed about setting scope_is_required through an UpgradeData script, but still, no luck in my account create form.

So I wonder if it's possible, and how?

Thank you for your help.

Your Answer

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

Browse other questions tagged or ask your own question.