-
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
[Customer] Removing the delete buttons for default customer groups #26251
[Customer] Removing the delete buttons for default customer groups #26251
Conversation
Hi @eduard13. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow! Really great job done. Could you only replace magic numbers with more meaningful const?
->method('getUrl') | ||
->willReturnMap( | ||
[ | ||
['customer/group/edit', ['id' => 1], 'http://magento.com/customer/group/edit'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace magic numbers with const
named for example - STUB_LOGGEDIN_CUSTOMER_GROUP_ID
Instead of literal with sample domain - try to also replace it with const
- eg. STUB_GROUP_EDIT_URL
->method('getUrl') | ||
->willReturnMap( | ||
[ | ||
['customer/group/edit', ['id' => 1], 'http://magento.com/customer/group/edit'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace magic numbers with const
named for example - STUB_LOGGEDIN_CUSTOMER_GROUP_ID
Instead of literal with sample domain - try to also replace it with const
- eg. STUB_GROUP_EDIT_URL
->willReturnMap( | ||
[ | ||
['customer/group/edit', ['id' => 1], 'http://magento.com/customer/group/edit'], | ||
['customer/group/edit', ['id' => 0], 'http://magento.com/customer/group/edit'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace magic numbers with const
named for example - STUB_GUEST_CUSTOMER_GROUP_ID
[ | ||
[ | ||
[ | ||
'customer_group_id' => 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Give the magic number a meaning - like const
named for example - STUB_LOGGEDIN_CUSTOMER_GROUP_ID
false, | ||
[ | ||
[ | ||
'customer_group_id' => 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Give the magic number a meaning - like const
named for example - STUB_LOGGEDIN_CUSTOMER_GROUP_ID
Hi @lbajsarowicz, thank you for reviewing this one, could you please check the latest changes? |
['customer/group/edit', ['id' => 0], 'http://magento.com/customer/group/edit'] | ||
[ | ||
'customer/group/edit', | ||
[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one could be just onliner:
['id' => static::STUB_GENERAL_CUSTOMER_GROUP_ID]
But it's minor stuff 👍
Hi @lbajsarowicz, thank you for the review. |
✔️ QA Passed |
Hi @eduard13, thank you for your contribution! |
Description (*)
This PR removes the listing
Delete
button for Default Customer Group, as far as we aren't able to remove it.Fixed Issues (if relevant)
Customers / Customer Groups
General
groupCannot delete group
error messageManual testing scenarios (*)
Stores / Configuration / Customer Configuration / Create New Account Options
Default Group
->General
Customers / Customer Groups
Delete
action shouldn't be available forGeneral
group.Questions or comments
Contribution checklist (*)