Merging carts when customer logs in on Commerce 14
In Commerce 13 and below, we had out of the box default behaviour that when a customer logs in, their cart, wishlist and any orders they made during their anonymous state will get merged into their customer contact associated with their principal object. This is done via a httpmodule where an authentication event would be raised and the IProfileMigrator would get called executing the said actions.
Unfortunately in the current version of Commerce 14 (v14.5.0 at the time of this post) does not include the middleware to hook up the IProfileMigrator and do this automatically as it did with its previous versions.
For the example middleware code please go here: https://www.hiddenfoundry.com/thoughts/merging-carts-when-logging-in-from-an-anonymous-state-in-commerce-14/