-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "Not Specified" as a gender option when customer does not specify gender #1496
Conversation
…ify value does not default to male
Or, perhaps instead of setting a value for "Not Specified", the select box just has no value or a disabled value for "Not Specified" which is NULL. |
@chadbean, these changes make sense and it is approved by product owner. But I think that it will change expected behavior a bit. 'Male' option has value '1' now and 'Female' is '2', but you want to change it and add 'Not Specified' with value 1. Probably it will confuse some extension developers. I suggest to add new option at the and of the list (with value '3'). What do you think? |
I added "Not Specified" as value '1', assuming it would be a default value. I'm okay with making it a value of '3'. What about instead, we just update the front-end so it renders the drop-down with a "Not Specified" label that's disabled and shows first? Then, if the form gets saved without a value selected, the value should be NULL in the DB. Thoughts? |
@chadbean we need to save backward compatibility with previous versions and can`t change codes of enumerators. Please take into account migration difficulties (although our Data Migration Tool is able to do this). But you could always change sequence of drop-down items on UI. |
@chadbean, thank you last changes, but integration tests are failed after that. Looks like that you also should make changes in app/code/Magento/Customer/Setup/CustomerSetup.php. Are you going to fix it? After that we can accept this PR. |
Thanks, I have made the change. For some reason, locally I am unable to see the additional option on the admin select combo. Is there a certain cache I should be clearing? |
Hm, probably you need to reinstall Magento and new option will be added by CustomerSetup.php script. |
…ustomer does not specify gender #1496
…ustomer does not specify gender #1496
When creating a new customer in the Magento 2 admin, the gender field has only two options: Male or Female. This is not ideal as many times a customer won't specify their gender and there won't be any way to infer it. I propose adding a new option of 'Not Specified' for these cases.