guest order reassigned to logged in user v13


I have a weird issue.

chrome: I purchase an item  as a guest(anonymous)

firefox: logged in to see orders in episerver.  I see the order with anonymous info.

chrome: click login and login as a registered user

firefox: refresh orders page and see that last order gets assigned to the account I just logged in with on chrome

I'm not sure how I go about deleting whatever is in memory so that the last guest order doesn't get reassigned to the next logged in user.  I do have _orderRepository.Delete(cart.OrderLink) on finishing a checkout but it looks like I need to do something else to clear out the order session info.

  Any help would be appreciated. thank you

Mar 25, 2021 0:02

Hi Peter,

The issue look like related to state management, so you can try SessionState(SessionStateBehavior.Disabled)] on action/controller level and the _orderRepository.Delete(cart.OrderLink) is the correct way to delete a cat.

Mar 25, 2021 7:47

I assume you log in on Firefox with admin account?

The order will be assigned to the next user login (on same browse/session) as a default behavior of IProfileMigrator. If you want to disable that, you can implement your own MigrateOrders method, then register the class yourself.

Mar 25, 2021 8:31

As Sunjay mentioned it looks like the issue is related to the session state. it seems the session not expired and you tried to log in on chrome. 

you can reduce session timeout or as Quan mentioned, implement your own IProfileMigrator

Mar 25, 2021 20:44
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.