source/Application/Controller/ArticleDetailsController.php
public function getRDFaNormalizedRating()
    {
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();
        $minRating = $config->getConfigParam("iRDFaMinRating");
        $maxRating = $config->getConfigParam("iRDFaMaxRating");

        $article = $this->getProduct();
        $count = $article->oxarticles__oxratingcnt->value;
        if (isset($minRating) && isset($maxRating) && $maxRating != '' && $minRating != '' && $count > 0) {
            $normalizedRating = [];
            $value = ((4 * ($article->oxarticles__oxrating->value - $minRating) / ($maxRating - $minRating))) + 1;
            $normalizedRating["count"] = $count;
            $normalizedRating["value"] = round($value, 2);

            return $normalizedRating;
        }

        return false;
    }
public function getRDFaNormalizedRating()
    {
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();
        $minRating = $config->getConfigParam("iRDFaMinRating");
        $maxRating = $config->getConfigParam("iRDFaMaxRating");

        $article = $this->getProduct();
        $count = $article->oxarticles__oxratingcnt->value;
        if (isset($minRating) && isset($maxRating) && $maxRating != '' && $minRating != '' && $count > 0) {
            $normalizedRating = [];
            $value = ((4 * ($article->oxarticles__oxrating->value - $minRating) / ($maxRating - $minRating))) + 1;
            $normalizedRating["count"] = $count;
            $normalizedRating["value"] = round($value, 2);

            return $normalizedRating;
        }

        return false;
    }
public function getRDFaNormalizedRating ( ) { $ config = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ minRating = $ config -> getConfigParam ( "iRDFaMinRating" ) ; $ maxRating = $ config -> getConfigParam ( "iRDFaMaxRating" ) ; $ article = $ this -> getProduct ( ) ; $ count = $ article -> oxarticles__oxratingcnt -> value ; if ( isset ( $ minRating ) && isset ( $ maxRating ) && $ maxRating != '' && $ minRating != '' && $ count > 0 ) { $ normalizedRating = [ ] ; $ value = ( ( 4 * ( $ article -> oxarticles__oxrating -> value - $ minRating ) / ( $ maxRating - $ minRating ) ) ) + 1 ; $ normalizedRating [ "count" ] = $ count ; $ normalizedRating [ "value" ] = round ( $ value , 2 ) ; return $ normalizedRating ; } return false ; }
Sets normalized rating

@return array
Sets normalized rating