What’s New In Episerver 9.2 and Commerce 9.3

Episerver 9.2 and Commerce 9.3 have recently been released, which came with a couple of nice new features and a few surprises when we upgraded.  On my current project, we’ve just gone through the upgrade process to 9.3 so I thought I’d share some of our experiences.

PropertyList<T> Supported

Technically, this isn’t a 9.2 release, however, I’ve only recently found out about it.  Back in Episerver 6 there was a really useful plug-in called the MultiProperty, more information here.  This allowed a developer to display a list of custom objects in the editor.  With the release of EpiSErver 7 and the change in paradigm of how properties within the CMS (the Dojo aspect), this plug-in no longer worked and the functionality wasn’t possible unless you created your own custom property and wrote the dojo yourself.  You could get around it by creating a block and adding them into a content area to mimic the functionality, but this was a bit cumbersome for content editors. Property<T> is the feature I’ve been wanting since version 7 came out, so I thought I’d write about it 🙂

I should warn you that as of writing this, it is still in pre-release and has not been officially released, so things may change a little.  From experience, working with beta code things do change.. so just be warned 🙂 (For reference read, How To Enable Beta Features In Episerver to enable beta features)

Property<T> allows you to throw any object you want into your page or block type definitions and Episerver will render it in the frontend for you.  The properties value(s) will then automatically be stored in the Episerver database as serialized JSON objects.  I will write a full tutorial around this in the near future.

Structure Map Upgraded

Structure map has now been upgraded to version 3.  This isn’t a massive change, but it did cause a few minor issues that broke the site after the upgrade.  First, instead of using the ObjectFactory you should now use the container instead.  More information can be found in the StructureMap API here.

Another thing is that EqualToAppSetting is now deprecated. We had a few declarations using this:

container.For&lt;IInterface&gt;()
.Use&lt;ConcreteType&gt;()
.Ctor&lt;string&gt;("appSettingValue")
.EqualToAppSetting("appsSettingName")

Which needed to be changed to:

container.For&lt;IInterface&gt;()
.Use&lt;ConcreteType&gt;()
.Ctor&lt;string&gt;("appSettingValue")
.Is( GET APP SETTING VIA ConfigurationManager.AppSettings)

Promotions Engine

I’ve talked previously in Using The New Promotions Engine in Episerver Commerce about the Episerver Commerces new way of dealing with promotions.  With the latest version, a number of fixes have been made.  In the original pre-release release there were a few bugs around saving and data being called from the Shipping LimeItems into the Order LineITems which have all been cleared up.

The marketing engine has also had a bit of a make-over and the campaign screen now looks a lot more user-friendly.

Episerver_commerce_9_Campaign_screen

The main thing we noticed from upgrading is the dates on the promotion type. Before 9.3 a promotion type had a ‘ValidFrom’ and ‘ValidUntil’ properties. Now the promotion has a ‘Schedule’ property that can be set like so:

promotion.Schedule = new PromotionSchedule
{
UseCampaignDate = false,
ValidFrom = DateTime.Now,
ValidUntil = DateTime.Now
};

There is also a new out of the box promotion type included, called ‘BuyXGetCheapestYForFree’ content reference condition and get the cheapest [Y] item in condition for free:

Episerver_commerce_get_cheapest_free

Conclusion

With the latest releases of Episerver 9 and commerce 9, there are some really useful features. PropertyList<T>, additions to the promotion engine and some performance improvements.  Upgrading was fairly straight-forward for this project.  Although if you use workflows in commerce then I think you might experience a bit of pain.

Jon D Jones

Software Architect, Programmer and Technologist Jon Jones is founder and CEO of London-based tech firm Digital Prompt. He has been working in the field for nearly a decade, specializing in new technologies and technical solution research in the web business. A passionate blogger by heart , speaker & consultant from England.. always on the hunt for the next challenge

More Posts

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *