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

vendure 2.0: Multivendor, 'mark as shipped', no order found #2227

Closed
tlodge opened this issue Jun 13, 2023 · 3 comments
Closed

vendure 2.0: Multivendor, 'mark as shipped', no order found #2227

tlodge opened this issue Jun 13, 2023 · 3 comments
Assignees
Labels
type: bug 🐛 Something isn't working

Comments

@tlodge
Copy link

tlodge commented Jun 13, 2023

Describe the bug

I am very close now - thanks for all your help so far. As before, I am able to create orders that are split between sellers. When I login as a seller or choose a seller in the admin interface, then I select an order and click on fulfil, then 'mark as shipped', I now get that the order cannot be found, e.g:

No Order with the id '7' could be found

However I am able to fulfil an order if I'm on the default channel, so I guess it's a permissions issue.

To Reproduce

  1. Create two sellers and add a product to each of them through the GraphQL frontend (as specified in the multivendor.plugin README.md
  2. Login with a customer
  3. Add items to an order (one from each seller)
  4. Set the order shipping address
  5. Query the appropriate shipping methods
  6. Set the order shipping methods for each different seller
  7. Checkout the order
  8. Login to the admin interface and select either one of the seller's channels
  9. Select the newly created order
  10. Click on fulfil order and give it a fufilment method and tracking code
  11. Click on mark as shipped.

Expected behavior

Order will be in a partially shipped state (for the seller who marked it as shipped)

Environment (please complete the following information):

  • @vendure/core version:2.0
  • Nodejs version: 19.2
  • Database (mysql/postgres etc): postgres

Additional context
Running the dev-server on the master branch of 2.0

@tlodge tlodge added the type: bug 🐛 Something isn't working label Jun 13, 2023
@tlodge
Copy link
Author

tlodge commented Jun 16, 2023

I have had a slightly deeper look into this and I think I know what the problem is.

From tracing through what happens; when a new order is initially created it is provided with an id (say 16), and associated with the default channel.

Once a user goes through checkout, new aggregate orders are created for each seller that that has a product in the order (e.g, for two products, aggregate orders with Ids 17 and 18 are created).

In the admin interface, when logged in as a seller (or with the seller channel selected), when the option to 'mark as shipped' is provided, it will attempt to find the original order id (i.e. 16) rather than the aggregate order id (17) and so fails with the reported error.

@michaelbromley
Copy link
Member

Thanks for the detailed report & findings. I'll look into this now with a view to getting it resolved for the next patch release.

@tlodge
Copy link
Author

tlodge commented Jun 19, 2023

Great! Many thanks again @michaelbromley

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants