How to get Pages in to Commerce

casper.rasmussen/ April 30, 2016/ DOJO, Episerver Commerce/ 2 comments

Episerver Commerce was built with a fundamental goal of connecting Commerce and Marketing. Commerce leverages some of the key concepts of working with content from the successful Episerver CMS 7 platform. I was, with that statement in mind, quite surprised to find out, that Commerce, out-of-the-box, didn’t allow my authors to use Pages inside the Catalogue interface. Intent was to utilize the powerful features for structuring (e.g. use a partial rendering of a page) and associating content across both Episerver CMS and Episerver Commerce. Luckily, I found a simple solution.

How to use Pages as Content in Episerver Commerce

Solution is pretty self explanatory if you are familiar with how it is possible to register Components (Widgets) for Episervers authoring interfaces. All it requires is a single class.

Above class tells Episerver to register a Widget based on epi-cms.component.MainNavigationComponent in a designated place known as /episerver/commerce/assets/defaultgroup. If you instead wan’t the widget to appear next to the Catalogue structure, in the left hand side, then you can adjust the registration slightly.

Be aware that the Component registering the existing Catalogue structure uses 50 as SortIndex. Adjusting your SortIndex to go below 50 will impact which Widget is shown by default when the Catalogue interface is opened.

I told you. It was easy.

2 Comments

  1. Thanks Casper. This is great. On above version 11, we would need to use slash (/) instead of dot(.) for widgetType. So we would need to use it as base(“epi-cms/component/MainNavigationComponent”).

    1. That’s right. Compatibility to dot-notation was removed with Episerver CMS 11. Thanks!

      /Casper Aagaard Rasmussen

Leave a Comment

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

Please type the characters of this captcha image in the input box

Please type the characters of this captcha image in the input box
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
*
*