I’m putting together a ratings site, where each product has a single “Our Opinion” rating created by the entry author, and separate, member ratings created by users.
The member ratings are being handled by DevDemon’s Channel Ratings, so no problem there. The per-entry “Our Opinion” rating is actually an average based on 3 other ratings: “instructions”, “installation”, and “ease of use”. I have those fields set up in the publish page, and am using the MX Calculator math plugin to calculate the average “Our Opinion” rating per-entry:
{exp:channel:entries channel="products"}
Our Opinion: {exp:mx_calc expression='({products_rating_ease_of_use}+{products_rating_installation}+{products_rating_instructions})/3'}
{/exp:channel:entries}The problem is I need to be able to sort entries based on this average “Our Opinion” rating. But since that rating isn’t an actual field, I’m not really sure how that would work. I’m assuming I’ll have to get my hands dirty with some custom queries, but I don’t really know where to start. Any suggestions are greatly appreciated, thanks!