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

[Forwardport] [FIX]: Recent orders are not filtered per store at the customer account page #34

Open
wants to merge 5 commits into
base: 2.3-develop
Choose a base branch
from

Conversation

rostyslav-hymon
Copy link
Owner

Original Pull Request

magento#13257

Description

Hello,

In this PR I provide fix for filtering recent orders block where previously orders were not filtered by store. You can have different accounts with the same emails for stores belong to a website and when you logged-in to one of those stores you will see 5 recent orders but it is possible to see orders from all stores belong to a website.

Main changes:

  1. Magento\Sales\Block\Order\Recent
  • Move recent orders select to separate method
  • Filter selected collection by current store
  1. Magento\Sales\Test\Unit\Block\Order\RecentTest
  • Change test according to the class method changes
  1. app/code/Magento/Sales/view/frontend/templates/order/recent.phtml
  • Change sizeof() to count() and execute it only once instead of double call

Best regards,
Alex

Fixed Issues (if relevant)

N/A

Manual testing scenarios

  1. Create 2 stores on one website
  2. Create 2 accounts with the same email for previously added stores
  3. Place orders per store
  4. Log In to previously created account for which you created orders and check Recent Orders section. It will show orders for all stores

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 on Travis CI are green)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants