vendure-ecommerce / vendure

The commerce platform with customization in its DNA.
https://www.vendure.io
Other
5.73k stars 1.02k forks source link

Missing Shipping Lines on partial order - MultiVendor #2767

Closed Swampy469 closed 7 months ago

Swampy469 commented 7 months ago

Describe the bug We encountered an issue regarding the absence of shipping methods in the order generated after payment completion. This problem occurred due to the duplication of shipping method items without assigning new IDs to the orderLines that had the shippingLineId attribute.

In particular the problem is partially caused by this changes (f04b033c7d6689ee0704c0f0409d01c6aa637105), in the file "order-calculator.ts". This because the Ids of the shipping lines are not matching anymore with the orderLine.shippingLineId

This behavior is happening with a single seller in the Order. To Reproduce Steps to reproduce the behavior:

  1. Create a new order with multiple items of different sellers (channels)
  2. Make sure each seller have is own Shipping Method assigned
  3. Complete the order with a Payment
  4. Access the Admin panel with a Super User
  5. Go to "Orders"
  6. You will have multiple Orders, one containing all the Sellers products (Aggregate Order) and the other one (Seller Orders)
  7. Open the Seller Order and you will see that the shipping methods are missing but not in the Aggregate one.

Expected behavior The Shipping Methods must be present also in the Seller Order as the older Vendure versions

Environment:

Additional context

This is the Aggregate Order, as you can see the shipping methods are correctly assigned.

This a Seller Order and the shipping methods are missing, same as the second one showed below

Swampy469 commented 7 months ago

This issue is fixed in this PR #2766