-
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
Shortening currency list in Configuration->General (replace PR #20397) #22230
Shortening currency list in Configuration->General (replace PR #20397) #22230
Conversation
Hi @melaxon. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
@melaxon unfortunately, only members of the maintainers team are allowed to assign developers to the pull request |
$options = array_filter( | ||
$this->_options, | ||
function ($option) use ($selected) { | ||
return in_array($option['value'], $selected); |
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.
Please flip array so that we can check with isset
.
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.
Please array so that we can check with
isset
.
Hi orlangur!
Please take a look if this is what you mean:
de3d22e
That's okay if all currency codes are 3 latin characters. If one day some exotic currency will be used this checking may fail. Taking into account that this operation is not really time critical (it works only for admin) I would leave it as it was
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.
If one day some exotic currency will be used this checking may fail
I don't see how it can fail, also, 3 letters is an ISO standard.
No need in filling keys, just use array_flip
.
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.
..., just use
array_flip
.
Done: 2d9465c
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.
Please squash changes into a single commit so that we have perfectly clean history 😉
Done (I think) |
Hi @aleron75, thank you for the review. |
✔️ QA passed |
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.
@melaxon nope, I still see 5 commits here.
use isset array_flip
Sorry for the delay. I squashed the commits |
Hi @orlangur, thank you for the review. |
✔️ QA passed |
@paliarush can you please take a look at this pull request - a new optional constructor argument is added to API class |
SVC failure due to optional argument in constructor approved. |
Hi @melaxon, thank you for your contribution! |
Description (*)
in Store->Configuration->General->Currency setup will be shown only those currencies selected in
Installed currencies list (Configuration->Advanced->System)
This filters the list of allowed currencies to show only selected ones
This PR replaces closed one #19946
Fixed Issues (if relevant)
Manual testing scenarios (*)
The list of currencies will look like in screenshot
![screenshot 2019-01-18 14 26 30](https://user-images.githubusercontent.com/8507631/51384457-76ac6a80-1b2d-11e9-911c-c3e6c8d378b9.png)
These changes can be applied to 2.2.x as well
Contribution checklist (*)