Blog about tips & tricks for CMS enhancement


Migrating Commerce Manager from 13 to 14

In the ever-evolving landscape of e-commerce, staying ahead of the curve is imperative. With each new version of e-commerce platforms, businesses are presented with an opportunity to enhance their digital presence and unlock fresh capabilities. One such crucial upgrade is migrating from Commerce Manager 13 to Commerce Manager 14, a transformational step that promises improved performance and expanded functionalities. However, as with any major transition, the path to Commerce Manager 14 isn't always paved with roses.

In this blog post, I will share some trivials encountered when migrating a client from Commerce 13 (Episerver) into Commerce 14 (Optimizely)

Identifying migration issue

For starters, this was part of the process of Β the upgrade assistant migration alongside a vanilla Optimizely site. We decided to take the migration step-by-step, e.g. start with a brand new solution and project structure and take functionality, blocks, areas piece by piece. Hence, we made it to the part of the Commerce Manager.

We installed the desired EPiServer.Commerce Nuget and started up the site to initialize the built in and now automatic upgrade of Commerce Manager. However, when we reached the login screen in order to verify the migration overview page of the commerce parts, we could not login properly with the administator account.

We started to check if there was a missmatch in the connection string to the Commerce database alongside the Cms:

"ConnectionStrings": {
  "EPiServerDB": "Data Source=.;Initial Catalog=cms;Integrated Security=True",
  "EcfSqlConnection": "Data Source=.;Initial Catalog=commerce;Integrated Security=True"

But it seemed to be in its order, so we enabled some UI statistics in the startup.cs file for the browser console to help us navigate further the initialization modules of Optmizely:

if (_webHostingEnvironment.IsDevelopment())
    services.Configure<ClientResourceOptions>(uiOption => 
        uiOption.Debug = true;

And there, Commerce seemed to be initialized as expected:

Enabled UI diagnostics in Cms.

How to fix the migration

After some brief thinking we started to take the vanilla Optimizely installation in concern of the process. Since we started the migration process from scratch, we did not get any coexisiting roles or user administrations more that the built in administrator accounts WebAdmins role.

So we logged onto the CMS section and headed for Admin > Access rights > Administer groups. Here we created the role group CommerceAdmins and asigned it to our administrator account and re-initialized the startup of the site.

Optimizely admin administer group section

Now once again we received the login page and this time we could properly verify our priveleages for the migration overview page of Commerce. After that, it was all down the hill with the click of the Start button and Commerce Manager was successfully migrated from the 13 version into 14.

The login page when initializing the site.
The commerce migration overview step process.

The CMS blade with the different products then properly recieved the Commerce section and its different sections in the menu now be presented in the UI:

Sometimes starting over from the beginning will slow you down with some minors in the overall process but with the team's experience in former Episerver architecture we solved this small but minor detail.

Hopefully you found this blog post helpful in the quest of migrating Episerver Commerce Manager into Optimizely Commerce.