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

NEXT-00000 - Add missing transactions association #3632

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

jasperP98
Copy link
Contributor

1. Why is this change necessary?

The \Shopware\Storefront\Controller\AccountOrderController::updateOrder function loads the order and checks the transaction state in the \Shopware\Core\Checkout\Order\SalesChannel\OrderService::isPaymentChangeableByTransactionState but the order transaction association is not loaded so this will always be null.

2. What does this change do, exactly?

This change adds the missing association when loading the order.

3. Describe each step to reproduce the issue or behaviour.

  1. Create an order
  2. Do a POST to the frontend.account.edit-order.update-order route
  3. You can now see that the order transactions are always null

4. Please link to the relevant issues (if any).

/

5. Checklist

  • I have rebased my changes to remove merge conflicts
  • I have written tests and verified that they fail without my change
  • I have created a changelog file with all necessary information about my changes
  • I have written or adjusted the documentation according to my changes
  • This change has comments for package types, values, functions, and non-obvious lines of code
  • I have read the contribution requirements and fulfil them.

@mstegmeyer
Copy link
Contributor

Hi @jasperP98, would you mind adding a unit test for the AccountOrderController that validates, that the Criteria passed to the order contains the transactions & stateMachineState?

@mstegmeyer
Copy link
Contributor

@jasperP98 any update here?

@jasperP98
Copy link
Contributor Author

@mstegmeyer Hi! Yes i had some trouble with setting up the test environment on my local machine. Will have a closer look at that ASAP

@jasperP98 jasperP98 force-pushed the add-missing-transactions-association branch 4 times, most recently from 4e7de26 to c304d34 Compare May 2, 2024 14:49
@jasperP98 jasperP98 force-pushed the add-missing-transactions-association branch from c304d34 to 44d5569 Compare May 2, 2024 14:53
@jasperP98
Copy link
Contributor Author

@mstegmeyer I added a test

@shopware-github-importer
Copy link

Hello,

thank you for creating this pull request.
I have opened an issue on our Issue Tracker for you. See the issue link: https://issues.shopware.com/issues/NEXT-36025

Please use this issue to track the state of your pull request.

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.

None yet

3 participants