tags:

views:

24

answers:

1

I have a custom module for displaying all the product details from the database..How i can integrate the votting api for rating each product using fivestar rating

+1  A: 

Since your products are not nodes, you'll need to implement the voting logic yourself - check the 'API.txt' file of the votingapi module for details on this.

The fivestar module would do this for you, but it is designed to work on actual nodes. To reuse it for your non-node products, you'll have to do quite some tweaking of the widget providing and processing logic of the module. It might be easier to implement your own custom version, using the fivestar module as a blueprint on how to do this. (Basically just reusing the UI widget and accompanying JavaScript, but changing the complete processing logic.)

Sorry for not being more specific, but this is quite a bit of work that I have not done so far and that would require detailed knowledge of your implementation of the non-node product handling.

Henrik Opel

related questions