Todcan
New Member
Hello,
I have the need to average some star ratings.
Using the calc element plugin I have enabled ajax and have the following calculation.
$wts = (int)'(fab_gymhit___weights_raw)';
$cdo = (int)'(fab_gymhit___cardio_raw)';
$cla = (int)'(fab_gymhit___classes_raw)';
$kcl = (int)'(fab_gymhit___Kids_Club_raw)';
$sst = (int)'(fab_gymhit___sauna_steam_raw)';
$spt = (int)'(fab_gymhit___sports_raw)';
$poo = (int)'(fab_gymhit___rating_raw)';
$ts = $wts + $cdo + $cla + $kcl + $sst + $spt + $poo;
return "Score = $ts";
Each item is a star rating. All I get is an output of 'score=0'
do star ratings not store in the database as a number?
Thanks in advance.
I have the need to average some star ratings.
Using the calc element plugin I have enabled ajax and have the following calculation.
$wts = (int)'(fab_gymhit___weights_raw)';
$cdo = (int)'(fab_gymhit___cardio_raw)';
$cla = (int)'(fab_gymhit___classes_raw)';
$kcl = (int)'(fab_gymhit___Kids_Club_raw)';
$sst = (int)'(fab_gymhit___sauna_steam_raw)';
$spt = (int)'(fab_gymhit___sports_raw)';
$poo = (int)'(fab_gymhit___rating_raw)';
$ts = $wts + $cdo + $cla + $kcl + $sst + $spt + $poo;
return "Score = $ts";
Each item is a star rating. All I get is an output of 'score=0'
do star ratings not store in the database as a number?
Thanks in advance.