nopCommerce ProductReview plugin

Project Description

Introduction

Zee3DCompany operates an intermediation platform allowing downloading 3D printable models posted by their creators (designers).
Downloads can be free, shareware, payable (with or without DRM).
They want to adjust the writing and reading comment tools to a multilingual environment. Plus, they want to add a report inappropriate content’s functionality.

Technical description

The implementaion based on nopCommerce 3.0 (hosting on Azure) integrates and complemenst nopCommerce functionally. 
The evolution of classes is managed by dependency injection without changing the kernel.
The plugin is multilingual, "desktop" and "mobile" supported (following the paradigm implemented by the platform).
Wherever possible, errors are managed in a silent way and all the warning messages are reported in the nopCommerce log.
All literal texts are configured as resources from the "Languages" administration page.
Sources are fairly commented and all texts are provided in English.

General description

The comments management device is amended in order to allow:

  • Reading, scoring and writing comments at the bottom of each product page (unless otherwise indicated in the product’s administration page).
  • Report of inappropriate comments

Everything is multilingual

Storage

Reviews storage is patterned based on the other textual multilingual resources, ie:

  • Use of Title and ReviewText fields in the ProductReview table for the english version
  • Storage and retrieval of the following records in the LocalizedProperty table:
    • LocaleKeyGroup "ProductReview" LocaleKey: "Title"; LocalValue: title
    • LocaleKeyGroup "ProductReview" LocaleKey "ReviewText" LocalValue: text

for other installed languages.

Interfaces

User interface (cf. annexes)

A specific area is dedicated to the comments, placed at the bottom of each product page (widget area « productdetails_bottom »).
It contents :

  • A title, showing the name of the product : « product name – product reviews »
  • A form which will allow to write a new comment
  • The list of all existing comments, from the newest to the oldest.

Product review form

The new comment form is folded, reachable by clicking on a link: « Be the first to review this product »: if there’s no opinion written yet, « Add your review »: if there’s at least 1 existing opinion.
An anchor is set up.
If the user is logged in, the activation of the link unfold the form.
Otherwise, the user is redirected to the login/register page and then to the anchor described above.
The form allows users to write a title (100 characters max), a text (1000 characters max) and a score (of 1 to 5).
The form is protected by a captcha based on the specific parameter set up in the admin interface.
The form validation induces:

  • Storing informations in current language
  • The asynchronous calls to the web service (Google Translate) for the translation of the title and text in all installed languages ("- translated by Google" is added to the translation of texts) according to the storage instructions above, and the refresh of the current page.

Product review display

Comments is displayed from the newest to the oldest applying model and features (comments scoring) proposed by default by nopCommerce.
The displayed title and text versions will be the ones corresponding to the current language.
A link allowng to display the original version is proposed for comments which haven’t been written in the current language. E.g.: «Read the original version (spanish)».
The original version is displayed using an Ajax filed div, in order to make contents not appear in the HTML code.
Only the 10 latest comments are visible, the other ones are in a folded div which makes them displayed by clicking on a « See all comments » link.
Every review contains an "Inappropriate Content" link leading to a form letting enter a text of complaint and the email address of the applicant (required and verified by a regular expression).
The form shows the IP address of the HTTP client and the time and date of the request.
A successful validation leads the user to a confirmation page.
A confirmation message, containing the text of the complaint, the URL of the product page, the original title and text of the review, the IP address and the time and date of the request, is sent to the user's email address. A blind copy is simultaneously sent to the address specified in the plugin configuration page (see bellow).

Productreview page

Page /productreviews/{n} is changed to redirect the user toward the anchor placed next to the form to write a new comment.
If the user isn’t logged in, he or she will be redirected toward the register/login page before being redirected.

Administration interface

The comment moderation interface is changed to allow an access to the different versions of the title and text thanks to the tab system commonly used in the whole admin interface.
Configuration interface
The configuration page of the plugin lets specify:

  • the Google translate API key.
  • the nopCommerce email account sending the confirmation email
  • the email address receiving the complaint confirmation message in blind copy

Project Details

Date:

October 2013

Tags:

Latest Works

Mark's website

Mark's is USA most knowledgeable team of Plumbing Parts with 30 years experience and more than 1 million products online.

nopCommerce B2B Kramer website

Kramer Electronics Russia. Professional switching equipment for the AV market. Online catalog and B2B platform.

nopCommerce new xDalys website

New website for one of the largest new and used automotive parts supply in Lithuania