-
Notifications
You must be signed in to change notification settings - Fork 192
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
#Show Holder Name Field Fix - When Config is set to NO/YES in Magento admin #1373
Conversation
- Javascript expects bool to be returned on frontend and to avoid type conversion we can get bool type directly from config. - getConfigData flag is false by default. - Since has_holder_name & has_holder_name required are yes/no magento fields return $this->scopeConfig->isSetFlag will return true/false by default if flag is set to true under getHasHolderName() & getHasHolderNameRequired().
Hi @dejankar, Thanks for opening this PR. As you rightly pointed out this is a cleaner solution to my older PR. Hence, could you please also revert the changes of that PR and include it in this PR? Since those changes will be redundant once we merge your PR. Also could you please remove the binary file which I think was accidentally added? Best regards, |
… admin Description Javascript expects bool to be returned on the frontend and to avoid type conversion we can get bool type directly from config. getConfigData() function variable flag is false by default, so IsSetFlag function is ignored in this case. Since has_holder_name & has_holder_name required are yes/no magento fields return, $this->scopeConfig->isSetFlag()will return true/false by default if flag is set to true under getHasHolderName() & getHasHolderNameRequired(). Tested scenarios Tested both scenarios when the Show holder name field for card payment methods is set to NO and YES. The frontend form is rendered properly without the need for type conversion in the javascript. Fixed issue: Adyen#1336 Adyen#1345
Hi Jean, I hope this is what you mean by reverting changes from your commit and adding it to my commit? In case I'm wrong please specify the exact commit numbers that need to be changed or reverted. Best Regards, |
Hi @dejankar, Yes, that was exactly what I meant. Thanks a lot for your quick response! Best regards, |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Description
Javascript expects bool to be returned on the frontend and to avoid type conversion we can get bool type directly from config.
getConfigData() function variable flag is false by default, so IsSetFlag function is ignored in this case.
Since has_holder_name & has_holder_name required are yes/no magento fields return, $this->scopeConfig->isSetFlag()will return true/false by default if flag is set to true under getHasHolderName() & getHasHolderNameRequired().
Tested scenarios
Fixed issue:
#1336
#1345