Try our conversational search powered by Generative AI!

Class CartMigrator

This type/member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Handles migrating carts/wishlist of a customer to another customer. The common scenario is switching from anonymous user to logged in user.

Inheritance
System.Object
CartMigrator
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Order.Internal
Assembly: EPiServer.Business.Commerce.dll
Version: 12.17.2
Syntax
public class CartMigrator

Constructors

CartMigrator(IOrderRepository)

Initializes an instance of CartMigrator.

Declaration
public CartMigrator(IOrderRepository orderRepository)
Parameters
Type Name Description
IOrderRepository orderRepository

The order repository.

Methods

MigrateCarts(Guid, Guid)

Migrates all carts of a customer to another customer.

Declaration
public void MigrateCarts(Guid sourceCustomerId, Guid destinationCustomerId)
Parameters
Type Name Description
System.Guid sourceCustomerId

The source customer identifier.

System.Guid destinationCustomerId

The destination customer identifier.

MigrateContactAddresses(CustomerContact, ICart)

Declaration
protected virtual void MigrateContactAddresses(CustomerContact customerContact, ICart cart)
Parameters
Type Name Description
CustomerContact customerContact
ICart cart

MigrateWishList(Guid, Guid, IMarket)

Migrates wishlist of a customer to another customer.

Declaration
public void MigrateWishList(Guid sourceCustomerId, Guid destinationCustomerId, IMarket currentMarket)
Parameters
Type Name Description
System.Guid sourceCustomerId

The source customer identifier.

System.Guid destinationCustomerId

The destination customer identifier.

IMarket currentMarket

The current market.