Giorgi625 VIP
Total posts: 655
27 Mar 2016 16:41

Hello, now I am working on a Trips site, where will have two types of content: Clubs and trips. Users who are club owners can add trips and show in related field which club is organising this trip, so I want to know, if it is possible to automaticaly add rating of trip records to Club record, so that all ratings from trips which Club has organised will be counted and average rating will be gaven to Club Record. Is it possible? Hope i have expalind it clearly.

Last Modified: 30 Mar 2016


pepperstreet VIP
Total posts: 3,837
28 Mar 2016 01:14

Hello Georgi625,
if you use Relation fields, it should be possible with custom template and rating API.
(sorry, I have not tried it myself. Please wait for official answer...)


Relation fields aside, you might also utilize the Cobalt Type as Comment feature.
The parent article would be your Club. The "comments" would be your Trips.
So "registered users" might even have multiple Clubs. Submission limits could be set easily. In comments adapter, you just have to set suitable parameters for submission, rating and change labels etc. There is also a parameter set for Average rating!

Hope this helps.


Related links & topics:


Sergey
Total posts: 13,748
30 Mar 2016 11:59

If you setup trips as comments then yes. It will automaticaly update parent record rating. But it will work only if every trip can be rated only by author of that trip. If trip is rated by many users, then you can use relation fields and Rating API as suggested. But in this case, there is no order by rating.

Powered by Cobalt