Forums / Setup & design / Creating average review results

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Creating average review results

Author Message

David Barker

Thursday 31 July 2003 3:40:16 pm

Hi,
I am going to use the enum variable in the products review class to create a review of 1 to 5 with 5 different stars but I would also like to create an average result for the review. Like if it got two reviews of 2/5 and 4/5, the average would be 3/5.

I was thinking maybe I could do this by making a new field in the 'product' class called 'Average Review' and have Exponential insert the average review into that. What I would like to know is how to do make Exponential calculate the average review (if possible) and how to make it insert it into the product it is assosicated with.

Thanks!

Dave