Published 11th of August 2017
Episerver Commerce Version 10.8 to 11.0
What’s new in Episerver Commerce 11?
Commerce 11 includes improved home category handling for entries, improved API for relations and associations, catalog import handling of cleared fields consistent with the API, implementation of the IShippingGateway and IShippingPlugin, and the removal of old Asset Management system. – Episerver World
Merchandisers, read this: http://world.episerver.com/blogs/David-Bowen/Dates/2017/7/commerce-11-release/
Episerver Commerce 11 is a new major version containing some incompatible API changes. Depending how good you have worked with all obsolete messages in your solutions, you probably won’t even have these errors… but because of time and priorities this may not been done. This is my notes from the upgrade done on a multi site commerce solution with legacy code from version 5.1. It might help someone.
Before upgrading read the official commerce blog posts on this topic http://world.episerver.com/product-blogs/the-commerce-blog/
Incompatible changes/removed methods:
Helper methods of static EPiServer.Business.Commerce.StringExtension – Methods has been moved to the namespace ‘EPiServer.Commerce.Extensions’
ShipmentTotal on Shipment – Use ShippingSubTotal instead since it more accurately describes the actual value.
Lineitem.CatalogEntryId – This property has been renamed to ‘Code’, because it better describes the value.
Mediachase.Commerce.Security.SecurityContext.AssignUserToGlobalRole – If using Membership use Roles.AddUserToRole(user.UserName, globalRoleName) instead. Otherwise use configured security api.
Mediachase.Commerce.Security.SecurityContext.GetAllRegisteredRoles – Use ServiceLocator.Current.GetInstance<SecurityEntityProvider>().SearchRoles(“partofname”) instead.
Mediachase.Commerce.Security.SecurityContext.CurrentUser – The system does not consider this property. Instead it uses the property EPiServer.Security.PrincipalInfo.CurrentPrincipal. You can set the value to specific user name by using EPiServer.Security.PrincipalInfo.CurrentPrincipal = new System.Security.Principal.GenericPrincipal(new System.Security.Principal.GenericIdentity(username), null). Note CustomerContext.Current.CurrentContact may be used Membership.GetUser(CustomerContext.Current.CurrentContact.UserId);
CustomerContext.GetAllOrganization – This method has been obsoleted because of bad naming. Use ‘GetOrganizations’ instead.
Mediachase.Commerce.Core.AppContext.Current.ApplicationId is not used anymore.
Mediachase.Commerce.Engine.Navigation.UrlService – This class should no longer be used. Use UrlResolver instead.
Mediachase.Commerce.Website.Handlers.StaticCatalogUriHandler – This class is no longer needed. If you have upgraded from 5.1, you may have this left in you web.config, so remove <add name=”EcfCatalogHandler” verb=”*” path=”*.aspx” preCondition=”integratedMode” type=”Mediachase.Commerce.Website.Handlers.StaticCatalogUriHandler, Mediachase.Commerce.Website” /> from web.config. It is a leftover from the time when you hade a static aspx width querystring parameter “ec” (entry code) and “nc” (node code)
Episerver Commerce 11 requires .NET target framework to be 4.5.2 or higher. https://world.episerver.com/documentation/upgrading/episerver-commerce/commerce-11/target-framework/
If you still work with workflows/activity-flows, download and check for updates https://world.episerver.com/download2/, Lineitem.WarehouseCode is obsolete in version 10, but anyhow not removed in 11, therefore may your flows and code still work, but the recommendation is not to use the Lineitem.WarehouseCode approach.
- Tutorial upgrade Commerce 11
- Episerver Commerce 11 update