Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • aleksandar 14 posts 74 karma points
    Aug 04, 2015 @ 09:31
    aleksandar
    0

    Rating System

    Hello guys, im relatively new in .net technology, and im trying to create/implement rating system/module for my book store, i try to find useful resources on this forum but nothing so far, my recent searches were : implement rating system in umbraco 7.... or latest: implement ajax star rating system in asp.net mvc, if anyone have any useful info. pls post it, i would be very greatful, tnx in advance

  • Stefano Beretta 102 posts 247 karma points
    Aug 04, 2015 @ 10:55
    Stefano Beretta
    1

    Hi aleksandar!

    If I was in your situation I'd proceed in this way:

    • Create a solution installing umbraco as Project (and not as website)
    • Add a new Project (Class library) to your solution and, inside it, create a new edmx generated from the database that should contains the rating records (I think three columns are enough: Id (pk), NodeId, vote). Maybe you can add a View to your db, which gives you the average vote for every node to retrieve more easily the pages votes average
    • Add to the Umbraco project a new surface controller containing two actionmethods: one to get the average of the votes and the othe one to set a new record in the database you created before
    • you can use an already existing jquery plugin to implement the ui of the rating.
    • everytime the page is loaded you can call the first actionmethod via ajax to retrieve the vote average of the page and set the js plugin
    • when a user click the star you should call the second actionmethod (always via ajax, posting to the method a model with NodeId and VoteValue) to set the value in your db

    To avoid multiple votes from the same user (if there's no login) you can simply use cookies (not the best solution at all)

    I hope this is clear enough, but if you are new to .net and mvc I'd suggest you to read some documentation about it.

    Best regards

    S

  • aleksandar 14 posts 74 karma points
    Aug 07, 2015 @ 08:03
    aleksandar
    0

    Tnx for your help i will follow the instructions above

  • Piotr Bach 16 posts 130 karma points c-trib
    Oct 12, 2021 @ 10:02
    Piotr Bach
    0

    Hi, check out Star Rating Property Editor.

    Best, Piotr

Please Sign in or register to post replies

Write your reply to:

Draft