Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

Issue with Using IProfileMigrator in Episerver Commerce when migrating/merging an anonymous Cart to a logged in user cart

$
0
0

Hello, I am currently having an issue with the IProfileMigrator I have implemented. It seems that no methods get called in this when I am migrating carts. I have implemented the IProfileMigrator because we have some custom logic needed for line items that have custom meta properties. (the default logic collapses them into a single line item when those meta properties are supposed to be unique) It seems that it only calls the base logic from

  <add name="ProfileModule" type="EPiServer.Business.Commerce.HttpModules.ProfileModule, EPiServer.Business.Commerce" />

inside the web config. I have tried removing this from the web config but it still never hits my IProfileMigrator.

The migrator looks like this:

    [ServiceConfiguration(typeof(IProfileMigrator), Lifecycle = ServiceInstanceScope.Hybrid)]
    public class CEProfileMigrator: IProfileMigrator
    {
      //blah blah my 3 methods
    }

The dev I am working with set the lifecycle as such but I am not sure that is correct.

And its even more apparent in the initializable module where we have it added as a singleton.

        public void ConfigureContainer(ServiceConfigurationContext context)
        {
            context.Services.AddSingleton<IProfileMigrator, CEProfileMigrator>();
        }

Any insight as to why my profile migrators logic does not get called when the anonymous user logs in? I am out of ideas as to why its not being intercepted.


Viewing all articles
Browse latest Browse all 6894

Trending Articles