O'Reilly logo

PHP 5 e-commerce Development by Michael Peacock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required