Episerver CMS 9.2 and Episerver Commerce 9.3 have recently been released. If you upgrade your site to use either of these versions, you will get a few nice surprises. If you want to learn what benefits you will get, read on 🔥🔥🔥
PropertyList Supported
Technically, this isn't a 9.2 release, however, I've only recently found out about it. Back in Episerver v6, there was a really useful plug-in called MultiProperty. MultiProperty
allows a developer to display a list of custom objects in the editor.
With the release of Episerver 7, MultiProperty
no longer worked and it was not ported into v7. The ability to generate lists of things was no longer possible. If you want to create a list picker you had to create your own custom property and write the dojo yourself.
One workaround was to define a content area and define blocks to mimic the functionality. This approach works, however, it is a bit cumbersome for content editors. Using blocks means more clicks and waiting. I've been wanting for PropertyList<T>
to be released since version 7 came out and it is finally here 😊
I should warn you that as of v9.2, Property<T>
is still in pre-release and has not been officially released, so things may change a little, however, I can confirm it works as you would expect. From experience, it is highly likely that the code around beta will change slightly before it is officially released. This means you may need to refactor things at some point, so just be warned.
If you do not know how to enable beta features within Episerver, read this guide to learn how.
Property<T>
uses generics. The property allows you to use any POCO as T
. When you decorate a page or a block with a property of type Property<T>
, Episerver will render a list picker in the editor 💥. Any value(s) added by the content editor within the editor, will be automatically persisted back to the Episerver database. All deserialization and serialization of data will also be handled for you. This is a really handy property to master and you can see a deep dive tutorial about Property<T>
here
Structure Map Upgraded
In Episerver v9.2, Structure map has now been upgraded to use V3. This isn't a massive change, however, the upgrade does introduce some breaking changes which broke some of my code. First, instead of using the ObjectFactory
you should now use the Container
instead. More information about this change can be found in the StructureMap document here. Another handy thing to note is that EqualToAppSetting
is now deprecated. We had a few declarations using this:
In Episerver v9.2 you will need to change these references, like this:
The change is simple enough and will only take a few minutes to update 💥
Promotions Engine
In the latest version of Commerce, the new promotions engine is live. I've talked about this engine previous in Using The New Promotions Engine in Episerver Commerce. This version sees the introduction of a number of fixes to the beta version. The UI has also had a bit of a make-over and the campaign screen now looks a lot more user-friendly:
The main thing I noticed from upgrading is the dates on the promotion type. Before v9.3, the promotion type contained ValidFrom
and ValidUntil
properties. Now the promotion type has a property called Schedule
that can be set like this:
There is also a new promotion type called BuyXGetCheapestYForFree
. The promotion takes a content reference condition and returns the cheapest item in condition for free:
With the latest releases of Episerver 9 and commerce 9, there are some really useful features. My favourites are definitely PropertyList<T>
and the promotions engine. Upgrading was fairly straightforward although my site was already using the beta promotion engine. If your project uses the older Commerce workflow system to deal with promotions, I think you might experience a lot of pain when updating your code. The new engine is a big shift in code structure compared to workflow so expect the worst. Good luck and Happy Coding 🤘