Skip to content
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

Fix #17933 - Bank Transfer Payment Instructions switch back to default #26765

Conversation

Bartlomiejsz
Copy link
Contributor

@Bartlomiejsz Bartlomiejsz commented Feb 7, 2020

Description (*)

This is fix for #17933
The issue was caused because observer modified here did override additional_information column in sales_order_payment table with data for incorrect store view.
Also, exactly the same issue occurred for Cash On Delivery and very similar, just for other fields (payable_to and mailing_address), for Check Money Order - both also are resolved with this fix.

Related Pull Requests

Fixed Issues (if relevant)

  1. Bank Transer Payment Instuctions switch back to default #17933: Bank Transer Payment Instuctions switch back to default

Manual testing scenarios (*)

Please check fixed issue for testing scenario

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Feb 7, 2020

Hi @Bartlomiejsz. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@Bartlomiejsz Bartlomiejsz requested a review from YevSent February 7, 2020 22:32
@Bartlomiejsz Bartlomiejsz force-pushed the feature/fix_17933_bank_transfer_instructions_default branch 2 times, most recently from 5d097bf to 8153cc6 Compare February 7, 2020 23:08
if (!empty($methodInstance->getPayableTo())) {
$payment->setAdditionalInformation('payable_to', $methodInstance->getPayableTo());
$storeId = $payment->getOrder()->getStoreId();
if (!empty($payableTo = $methodInstance->getConfigData('payable_to', $storeId))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also used to implement assignments within comparisons but one day someone pointed me out that it can be a bit misleading: is the = a real assignment or a bug, that is, a missing==? Reading the code without too much attention (it happens) it may seem a bug, someone could be tempted to correct it causing indeed a bug :)

At that point, I stopped using it and switched back to assigning the variable and doing the comparison in two different statements.

Would you consider doing that change, thus joining my group of old, wise, and defensive programmers like me? :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aleron75 I'm not sure if I will get used to do it, but I can definitely try, changed it :)

@aleron75 aleron75 self-assigned this Feb 20, 2020
@aleron75 aleron75 added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Feb 20, 2020
@Bartlomiejsz Bartlomiejsz force-pushed the feature/fix_17933_bank_transfer_instructions_default branch from 8153cc6 to b4dddf1 Compare February 20, 2020 08:50
@Bartlomiejsz Bartlomiejsz force-pushed the feature/fix_17933_bank_transfer_instructions_default branch 2 times, most recently from 6872751 to 4543082 Compare February 20, 2020 13:53
@Bartlomiejsz Bartlomiejsz force-pushed the feature/fix_17933_bank_transfer_instructions_default branch from 4543082 to 7c4be6a Compare February 20, 2020 14:53
@Bartlomiejsz Bartlomiejsz changed the title Fix #17933 - Bank Transer Payment Instuctions switch back to default Fix #17933 - Bank Transfer Payment Instructions switch back to default Feb 20, 2020
@Bartlomiejsz
Copy link
Contributor Author

@aleron75 I rebased changes on develop since those files were also modified there, ready for review again 😉

@magento-engcom-team
Copy link
Contributor

Hi @aleron75, thank you for the review.
ENGCOM-6953 has been created to process this Pull Request

@engcom-Delta
Copy link
Contributor

✔️ QA passed

@engcom-Delta
Copy link
Contributor

HI @aleron75 could you approve this PR once again to move it into Ready for Testing status?

@ghost ghost removed the Progress: review label Feb 27, 2020
@magento-engcom-team
Copy link
Contributor

Hi @aleron75, thank you for the review.
ENGCOM-6953 has been created to process this Pull Request

@m2-assistant
Copy link

m2-assistant bot commented Feb 28, 2020

Hi @Bartlomiejsz, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@Bartlomiejsz Bartlomiejsz deleted the feature/fix_17933_bank_transfer_instructions_default branch June 23, 2020 20:41
@sdzhepa sdzhepa mentioned this pull request May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bank Transer Payment Instuctions switch back to default
5 participants