Giving power to customers

There are two very powerful social-oriented features, which we can implement into our framework.

Product ratings

Product ratings are quite simple to add to our framework: we simply need to record a series of ratings between one and five, and display the average of these on the product view. We can enhance the view by making the rating system a clickable image, where the customer can click on the number of stars they wish to give the product and their rating is saved.

There are a few minor considerations that need to be taken into account. However, if the logged-in customer has already rated a product, we should then update their rating. If the customer is not logged in, we must record some information about them such as ...

Get PHP 5 e-commerce Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.