How to enable Episerver new and beta features

2019-04-24

_config.yml As you might know already, Episerver has introduced continuous release process to help the customer quickly get the issue fixed and adopt the new/beta features.

By default, some of these features are required to be manually turned on E.g. SerializedCarts. When it’s a beta feature, you’ll need to ensure the user are in the right user groups as well. I hope this blog post will help you to get them working in your website quickly and make your experience smooth.

So far, there are two scenarios I had been through since Episerver introduced continous release process.

Scenario 1 - Released feature

Serializable Cart feature has been introduced since 10.2.0. I won’t cover details of this feature here, you can check out the links in the Reference section to get more details.

By default it is enabled for a new installation and disabled for an upgraded site.

To enable this feature within your site, you have two options

Option 1 - Configuration

Add the following to ecf.app.config file (CMS solution, not CommerceManager)

<Features>
  <add feature="SerializedCarts" state="Enabled" type="Mediachase.Commerce.Core.Features.SerializedCarts,Mediachase.Commerce" />
</Features>

Option 2 - Programmatically

Add the following to your InitializeModule class

ServiceLocator.Current.GetInstance<IFeatureSwitch>().EnableFeature(SerializedCarts.FeatureSerializedCarts);

Scenario 2 - Beta feature

CSR UI (Customer Service UI) is a beta feature at the time of writing this post.

_config.yml

(New CSR UI)

By default, all beta features are hidden to prevent unintentional use. To work with Beta features, you need a role defined with the name EPiBetaUsers

To enable this beta feature within your site, you first need to add the following to ecf.app.config file (CMS solution, not CommerceManager)

  <Features>
    <add feature="CustomerServiceUI" state="Enabled" type="EPiServer.Commerce.UI.CustomerService.Features.CustomerServiceUI, EPiServer.Commerce.UI.CustomerService" />
  </Features>

Secondly, you can either by adding a virtual roles in the virtual role section of the configuration or by creating a role in admin view. Then you add the users to this role. (NOTE: Added users to new role, you must log out and in again to see the Beta feature)

<episerver.framework>
    <appData basePath="App_Data" />
    <scanAssembly forceBinFolderScan="true" />
    <virtualRoles addClaims="true">
      <providers>
        <!-- other roles -->
        <add name="EPiBetaUsers" type="EPiServer.Security.MappedRole, EPiServer.Framework" roles="WebAdmins, Administrators" mode="Any" />
      </providers>
    </virtualRoles>   
  </episerver.framework>

_config.yml

(Adding a virtual roles)


_config.yml

(Creating a role in admin view)

Reference

Beta features

Feature switch

Benchmarking Episerver serializable carts

Introducing SerializableCart mode

Happy Coding! 😇