View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005686 | OXID eShop (all versions) | 1.01. Products (product, categories, manufacturer, promotions etc.) | public | 2014-03-07 16:15 | 2014-03-18 09:43 |
Reporter | michael_keiluweit | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 4.8.4 / 5.1.4 | ||||
Summary | 0005686: rating count | ||||
Description | An article rating by stars (number values are 1 - 5) increases the rating for the article by +1. But if a customer writes a review and doesn't use the stars, the shop doesn't increase the counter. | ||||
Additional Information | \Details::saveReview public function saveReview() { [...] //save rating if ( $dRating !== null && $dRating >= 1 && $dRating <= 5 ) { [...] $oProduct->addToRatingAverage( $dRating ); } if ( ( $sReviewText = trim( ( string ) $this->getConfig()->getRequestParameter( 'rvw_txt', true ) ) ) ) { [...] } } As you see in the last if query the method call \oxArticle::addToRatingAverage() is missing and therefore the rating counter does not increase. | ||||
Tags | No tags attached. | ||||
Theme | Azure | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
The rating counter must not be updated if there was only a review (text) submitted but not a rating (stars). Otherwise the calculation of the average rating will be wrong. So the behaviour of the shop is correct: It will update the counter only for a rating not for a review. If you want to display the number of reviews you will have to include a new field or count these with a separate select query from the oxreview table. |
|
The number(in the bracket)near the stars show how many people has been voted for the product, not how many reviews was done. |