Skip to content

Fix incorrect logo on order print page #34943

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

Conversation

ihor-sviziev
Copy link
Contributor

@ihor-sviziev ihor-sviziev commented Jan 6, 2022

Description (*)

This PR adds a fallback to a header logo in case if the sales HTML logo() isn't declared.
Originally the issue was introduced in 4531c76

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes The default luma logo is shown on frontend order print page #34942

Manual testing scenarios (*)

  1. See linked issue description

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)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Jan 6, 2022

Hi @ihor-sviziev. Thank you for your contribution
Here are 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

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.

For more details, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@ihor-sviziev
Copy link
Contributor Author

@magento run Integration Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev ihor-sviziev force-pushed the fix-wrong-logo-path-on-print-order-page branch from 7d4489e to f6a6289 Compare January 6, 2022 13:24
@ihor-sviziev
Copy link
Contributor Author

@magento run Integration Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev ihor-sviziev marked this pull request as ready for review January 6, 2022 13:29
ihor-sviziev referenced this pull request Jan 6, 2022
…settings does not reflect on frontend my account order
@ihor-sviziev
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

4 similar comments
@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@m2-community-project m2-community-project bot added Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Jan 11, 2022
Copy link
Contributor

@Den4ik Den4ik left a comment

Choose a reason for hiding this comment

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

Hi @ihor-sviziev.
Thanks for the good fix.

I believe that we could inject theme LogoPathResolver as fallback class and call getPath instead of duplicate part of code.
What do you think?

@ihor-sviziev
Copy link
Contributor Author

@Den4ik I thought about it as well, but it doesn't get store id from the current order, but from the store manager (there might be some edge cases when you're in admin, for instance), so I decided to do it like that.

@Den4ik
Copy link
Contributor

Den4ik commented Jan 13, 2022

@ihor-sviziev Wrote direct message in slack

@ihor-sviziev
Copy link
Contributor Author

As we discussed in Slack - it might be improved to reduce the code duplication, but I don't have enough time for that now.

@engcom-Lima engcom-Lima self-assigned this Jan 24, 2022
@engcom-Lima
Copy link
Contributor

Since all the builds are passed moving it to Pending Review column.

@magento-engcom-team
Copy link
Contributor

Hi @Den4ik, thank you for the review.
ENGCOM-9400 has been created to process this Pull Request
✳️ @Den4ik, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@ihor-sviziev ihor-sviziev added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Feb 11, 2022
@engcom-Alfa engcom-Alfa self-assigned this Feb 11, 2022
@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Preconditions:

  1. Have Magento latest instance installed.
  2. Make sure front end customer having an account and already at least one order.

Manual testing scenario:

  1. Admin side: Content> Default Edit Default Website> Select theme to Magento Luma.

  2. Header Section> Upload the new logo and save the chages.

  3. Login as customer in the frontend and view the order from My account > My Orders page.

  4. Click on Print Order and that opens up a printable option popup. Validate the image from it.

Before: ✖️ The old image was only getting displayed while printing up.

image

After: ✔️ The new image is getting displayed while printing up.

image

Additionally, having multi stores - login as different customer of different store and validate that has its relevant image printable but not the default website's custom image.
The testing relevant to it needs to be regressed and has to be automated. Hence added a new test case as part of regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: Sales Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: accept Release Line: 2.4 Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The default luma logo is shown on frontend order print page
6 participants