Skip to content

Commit b1822ce

Browse files
author
Stanislav Idolov
authored
ENGCOM-3486: Fixed rating issue website wise #18888
2 parents 4c35bc2 + 6edc017 commit b1822ce

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)