Jonas Bergqvist
Oct 6, 2014
  24336
(6 votes)

Comments and Ratings in Commerce 8.0

In Commerce 8.0, we have dropped the dependency to EPiServer Common Framework. When dropping the dependency, we had to remove all classes in EPiServer.Business.Commerce which had dependencies to EPiServer Common Framework. With the dropped classes, we dropped some functionality. This blog post will show how to recreate the missing functionality.

Dropped functionality

When we dropped the dependency to EPiServer Common Framework, we lost comments and ratings, which has been a part of Commerce in earlier versions. This will cause problems when upgrading to Commerce 8, if the site uses comments or rating.

Dropped classes

The following classes have been dropped from EPiServer.Business.Commerce:

  • Comment
  • CommentExtensions
  • DynamicEntry
  • DynamicEntryHandler
  • DynamicEntryProvider
  • IMessage
  • IProductComment
  • IProductRating
  • ProductComment
  • ProductCommentResult
  • ProductEntry
  • ProductEntryHandler
  • ProductRating
  • RatingMessage
  • UserExtensions

Make logging work

In “EPiServer CommonFramework”, there is functionality for logging, which will help developers to find problems in the code. This code will not be available anymore as long as the “EPiServer CommonFramework” nuget package isn’t explicitly installed on the site. Projects that has used EPiServer Common logging should change to work directly against “log4net”. By changing the using statement to “log4net”, log4net will start handling the logging.

Recreate functionality

To add back comments and ratings after upgraded to Commerce 8, the following steps are needed:

  1. Add the package “EPiServer Common” to your project.
  2. Download the zip-package below.
  3. Add the classes to your project after you have unzipped the package.

After you have the classes in to your project, you have to add a couple of lines to an initialization module:

// register entity provider with supported types
EntityProviderHandler.Instance.RegisterEntityProvider<DynamicEntityProvider, DynamicEntity>();
EntityProviderHandler.Instance.RegisterEntityProvider<DynamicEntityProvider, ProductEntity>();

Download

Zip file containting comments and ratings: CommentsAndRatings.zip

Oct 06, 2014

Comments

Christer Åkerlund
Christer Åkerlund Oct 7, 2014 10:19 PM

WOHOOOO!! \o/

Eric
Eric Oct 13, 2014 09:49 PM

Great :)

Viktar Slapik
Viktar Slapik Nov 27, 2014 02:29 PM

Thank you for useful blog post!
Actually we have an issue with old comments and ratings in EpiServer CMS 7.18 & Commerce 8.3.
All files from "CommentsAndRatings.zip" were included in our site, required strings were added in initialization module.
The comments and ratings functionality works fine for new posted product comments and ratings, but old product comments and ratings disappeared.
Is there any way to solve the issue?
Thank you in advance.

Silsila Badalte Ka
Silsila Badalte Ka Sep 5, 2018 09:04 PM

Silsila Badalte Rishton Ka is a 2018 Indian Hindi television drama series, which premiered on 4 June 2018 on Colors.The series is produced by Sunjoy Waddhwa under the banner of Sphere Origins.The serial is about the difficulties of contemporary love stories and love triangle. The series also focus on domestic violence against women.It stars Drashti Dhami, Shakti Arora, Aditi Sharma and Abhinav Shukla in the lead roles of Nandini, Kunal, Mauli and Rajdeep respectively.

Please login to comment.
Latest blogs
Opti ID overview

Opti ID allows you to log in once and switch between Optimizely products using Okta, Entra ID, or a local account. You can also manage all your use...

K Khan | Jul 26, 2024

Getting Started with Optimizely SaaS using Next.js Starter App - Extend a component - Part 3

This is the final part of our Optimizely SaaS CMS proof-of-concept (POC) blog series. In this post, we'll dive into extending a component within th...

Raghavendra Murthy | Jul 23, 2024 | Syndicated blog

Optimizely Graph – Faceting with Geta Categories

Overview As Optimizely Graph (and Content Cloud SaaS) makes its global debut, it is known that there are going to be some bugs and quirks. One of t...

Eric Markson | Jul 22, 2024 | Syndicated blog

Integration Bynder (DAM) with Optimizely

Bynder is a comprehensive digital asset management (DAM) platform that enables businesses to efficiently manage, store, organize, and share their...

Sanjay Kumar | Jul 22, 2024

Frontend Hosting for SaaS CMS Solutions

Introduction Now that CMS SaaS Core has gone into general availability, it is a good time to start discussing where to host the head. SaaS Core is...

Minesh Shah (Netcel) | Jul 20, 2024

Optimizely London Dev Meetup 11th July 2024

On 11th July 2024 in London Niteco and Netcel along with Optimizely ran the London Developer meetup. There was an great agenda of talks that we put...

Scott Reed | Jul 19, 2024