0

I'm new to drupal and trying to figure out how i can use fivestar to implement a rating system.

I have around 15 products and want my site users to be able to rate & review them from a page named "User Reviews" and NOT from within each product page/node.

Adding the rating axis in the review node is nice and simple but can't figure out how to select the product node to associate the vote with. I want to create a select list field that would list all my products and where the user will be able to select the item they want to review. Then add their comments and ratings and submit it.

Its straight forward to do this when creating a review as a comment on the product node that is reviewed (i.e. select Parent Node as the Voting Target) but how can I achieve this from a different node and assosiate the nodeId with the nodeId of a product?

I'm using the latest releases of Drupal, Fivestar and Voting API.

1

How are you generating your page with the 15 products? I think views can display the widget as a field so that might be an easy way to achieve the desired functionality.

  • Each of the 15 products is a "product" type node and is displayed on its own page. – user4335 Dec 4 '11 at 22:45
  • Ah sorry, I misunderstood. Is what you want a "User Reviews" page that has some way of selecting a product and then giving it a five star rating? – Malks Dec 4 '11 at 22:53
  • Yes, that's exactly what I want – user4335 Dec 4 '11 at 23:12
  • There will be no easy code free way to do it. You could create a view that by using an exposed filter (probably the node's title), and making sure that the filter is not optional, only showed one product's details. If you then added the fivestar widget as a field you could rate this node. With an exposed filter though the filter will be a text entry field (rather than, say, a select list). This is not very usable. Unless you then created a taxonomy (which can be exposed as a select list) and created manual links to the nodes that you wanted to review. If you did that you could have a select. – Malks Dec 4 '11 at 23:26
  • Im not looking for a code free way to do this. I can imagine that it shouldnt be difficult to code it but I just don't know how to go about doing it – user4335 Dec 4 '11 at 23:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.