src/ShopBundle/objects/db/TShopArticle.class.php
public function UpdateStatsReviews()
    {
        $sArticleId = $this->id;
        if ($this->IsVariant()) {
            $sArticleId = $this->fieldVariantParentId;
        }
        $iCount = $this->GetReviewCount(true);
        $dAvrg = $this->GetReviewAverageScore(true);
        $this->getProductStatsService()->set($this->id, ProductStatisticsServiceInterface::TYPE_REVIEW_AVERAGE, $dAvrg);
        $this->getProductStatsService()->set($this->id, ProductStatisticsServiceInterface::TYPE_REVIEW_COUNT, $iCount);
        TCacheManager::PerformeTableChange($this->table, $sArticleId);
    }
public function UpdateStatsReviews()
    {
        $sArticleId = $this->id;
        if ($this->IsVariant()) {
            $sArticleId = $this->fieldVariantParentId;
        }
        $iCount = $this->GetReviewCount(true);
        $dAvrg = $this->GetReviewAverageScore(true);
        $this->getProductStatsService()->set($this->id, ProductStatisticsServiceInterface::TYPE_REVIEW_AVERAGE, $dAvrg);
        $this->getProductStatsService()->set($this->id, ProductStatisticsServiceInterface::TYPE_REVIEW_COUNT, $iCount);
        TCacheManager::PerformeTableChange($this->table, $sArticleId);
    }
public function UpdateStatsReviews ( ) { $ sArticleId = $ this -> id ; if ( $ this -> IsVariant ( ) ) { $ sArticleId = $ this -> fieldVariantParentId ; } $ iCount = $ this -> GetReviewCount ( true ) ; $ dAvrg = $ this -> GetReviewAverageScore ( true ) ; $ this -> getProductStatsService ( ) -> set ( $ this -> id , ProductStatisticsServiceInterface :: TYPE_REVIEW_AVERAGE , $ dAvrg ) ; $ this -> getProductStatsService ( ) -> set ( $ this -> id , ProductStatisticsServiceInterface :: TYPE_REVIEW_COUNT , $ iCount ) ; TCacheManager :: PerformeTableChange ( $ this -> table , $ sArticleId ) ; }
updates the review stats for the article.
updates the review stats for the article .