Skip to content

Commit 6edc017

Browse files
ENGCOM-3486: Fixed rating issue website wise #18888
- Merge Pull Request #18888 from saphaljha/magento2:18192-fix-rating-issue - Merged commits: 1. 1c820be 2. 8ea303b 3. cd24396 4. cbbaf12 5. 611969d 6. 774164c 7. 2ea37a8 8. 0e59e8c 9. b9790c6
2 parents 4126ffc + b9790c6 commit 6edc017

File tree

1 file changed

+3
-1
lines changed
  • app/code/Magento/Review/Model/ResourceModel

1 file changed

+3
-1
lines changed

app/code/Magento/Review/Model/ResourceModel/Rating.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,11 @@ public function getReviewSummary($object, $onlyForCurrentStore = true)
425425

426426
$data = $connection->fetchAll($select, [':review_id' => $object->getReviewId()]);
427427

428+
$currentStore = $this->_storeManager->isSingleStoreMode() ? $this->_storeManager->getStore()->getId() : null;
429+
428430
if ($onlyForCurrentStore) {
429431
foreach ($data as $row) {
430-
if ($row['store_id'] == $this->_storeManager->getStore()->getId()) {
432+
if ($row['store_id'] !== $currentStore) {
431433
$object->addData($row);
432434
}
433435
}

0 commit comments

Comments
 (0)