We are running Episerver Commerce version 11.2.4 and we are using "new" order api.
When investigating a reported issue related to missing tax on carts after login, I discovered that shipment is null after cart migrate (ProfileMigrator).
To clearify the process:
I solved it my overriding ProfileMigrator and adding shipment in MigrateCarts method.
This can be considered a bug, right?
Hey, it's not "new" any more! It's the norm these days.
Can you post how did you "fix" it - the code?
We actually merge/add the shipments in cart, but I think you would have to recalculate the taxes after merging. The rule is simple - you have changes to item(s), you would have to re-calculate the taxes.
In my class that inherits from ProfileMigrator:
public override void MigrateCarts(Guid anonymousId)
// get cart for current user and try to save cart
var cart = _cartService.LoadCart(_cartService.DefaultCartName);
if (cart != null)
The EnsureStoreShipmentAddress checks if cart has shipment and shipmentAdress - and adds it if empty.
So were the taxes there after the user logs in?
Are there any shipments in the cart after merging?
As I said you would probably need to re-calculate the taxes.
To be completely honest I think this might be a bug before, but should not a problem now at least.
Sorry for the late response, been occupied with different stuff.
What happens is that shipment is there, but there is no shipping address no shipping address means 0 taxes:
LineItems: Count = 1
OperationKeys: Count = 0
Properties: Count = 0
Fair enough.I created a bug (COM-6730) and will let triage team handle it.
No, thank You! Please keep the reports coming!
The bug is now fixed (by your "old" friend, Viet Anh)