16
Lecture#09

Empowers to your customer Product Rating and its Management in Ecommerce Framework Product Reviews and Management: Collecting customer opinion about

Embed Size (px)

Citation preview

Page 1: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Lecture#09

Page 2: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Outline

Empowers to your customer Product Rating and its Management

in Ecommerce Framework Product Reviews and Management:

Collecting customer opinion about a product

Page 3: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Giving Power to Customer

There are two most famous ways to empower customer Product Rating Product Reviews

Product Rating is a process of assigning a value to a product Show your likeness and dislikenes Limited to set of values (usually 1-5)

Page 4: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Product Rating

Product Rating is simple to add in framework Show rating options to customer on each

product▪ Radio buttons, stars etc.▪ Values ranges from 1 to 5

Customer selects one and only one value

Selected values are recorded in table Average of recorded values is calculated Show average value to customer on

product page

Can a customer rate a product multiple

times?

Can an anonymous customer rate a

product?

Page 5: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Product Rating

For Registered customers When they give rating Values are saved in table against their

CustomerID Average rating is updated and displayed on

product page For Anonymous customers

When they give rating to a product Values are saved in table against IP and

Session (Like wish list) Average rating is updated on product page

How to save their

rating?

Page 6: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Product Rating -Model

We need a table in database with columns ID (Integer, Primary Key, Auto Increment) ,

ContentID (Integer), Rating (Integer) , User ID (Integer), Timestamp (datetime), Session ID(Varchar), IP Address (Varchar)

Page 7: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Product Rating-Controller Controller will perform the following

task When customer click for rating Pass rated value (bw 1-5) to url Parse the URL and extract the information▪ User Identity, Product ID and Rated Value etc.

Check product is valid Check rated value is valid Check user identity▪ If logged in, get UserID from user table▪ If anonymous, get IP address and timestamp

Page 8: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Product Rating-Controller

Check current customer has already rated the current product▪ If yes, ignore further processing▪ If no, save information in Rating Table

Calculate average with new values Redirect user to rated product page

Page 9: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Product Rating-View

To display rating of product we have to use following query

It is a sub query for rating within main query for product information

Page 10: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Product Reviews

Product Reviews are customers opinion, feedback, likeness or dislikes about product

A simple feed back form on product page with: Customer name, email, feedback as well

Reviews can be displayed on product page simple as on blogs or comments

Page 11: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Product Review-Model

We needs a Review table with following columns in DB to store customer reviews

Page 12: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Product Review-Model

SQL statement to create content_comments

SQL statement to maintain referential integrity

Page 13: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Product Reiview

A simple process of product review can be: Along with table in DB, we need to provide a

form to customer for getting review Customer will fill the form and click on submit

button Form values are processed and saved in DB Review is pending for Admin approval After Admin approval, Review is displayed on

product page If admin rejects, Review is deleted from DB and

not displayed on product page

Page 14: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Product Revew

Simple Product Review form can be:

Page 15: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Product Review-Controller Controller will perform the following

actions Get the data from form after its submission Validate the form data Check if customer is logged in▪ Save data with customer logged in information

If not logged in▪ Save reviews with IP and timestamp

Redirect/move customer on product page after adding review

After approval from admin▪ Show review on product page

Page 16: Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about

Product Reivew-View

What do we need to do to display reviews and comments?1. Check to see if there are any comments2. Display either the comments or a "no

comments" template3. Check to see if new comments are allowed4. Display either the comments form or a "no

comments allowed" template Displaying and approving reviews are

part of admin controller