Since Osclass 4.2.0, users have the option to leave ratings on comments, which means that the
comment can now be simply transformed into item review.
The problem with this feature in it's current form, is that it's half-baked, meaning that the ratings really have no actual purpose, besides the visual one in the comments section.
To fix this, we also need an option to calculate the total rating based on the number of ratings received, and display it somewhere with a
shortcode.
Why shortcode/function? Because this would allow us to display the ratings in different spots.
Basically, we need another 2 functions here:
- A function that counts and outputs the number of ratings: eg. (10 ratings)
- A functions that calculates and outputs the total rating, based on the above function.
It should be something like this:
PS: What would make this truly a review system, would be the ability to select in which category the ratings are allowed like in the
Voting Plugin, and also hook this to the search page (sort by rating) like you did on
https://osclasspoint.com/searchHowever I think this would be too much to ask.
Thanks!