File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
app/code/Magento/Review/Block/Product Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ public function getReviewsSummaryHtml(
57
57
$ templateType = self ::DEFAULT_VIEW ,
58
58
$ displayIfNoReviews = false
59
59
) {
60
+ if (!$ product ->getRatingSummary ()) {
61
+ $ this ->_reviewFactory ->create ()->getEntitySummary ($ product , $ this ->_storeManager ->getStore ()->getId ());
62
+ }
63
+
60
64
if (!$ product ->getRatingSummary () && !$ displayIfNoReviews ) {
61
65
return '' ;
62
66
}
@@ -68,9 +72,6 @@ public function getReviewsSummaryHtml(
68
72
69
73
$ this ->setDisplayIfEmpty ($ displayIfNoReviews );
70
74
71
- if (!$ product ->getRatingSummary ()) {
72
- $ this ->_reviewFactory ->create ()->getEntitySummary ($ product , $ this ->_storeManager ->getStore ()->getId ());
73
- }
74
75
$ this ->setProduct ($ product );
75
76
76
77
return $ this ->toHtml ();
You can’t perform that action at this time.
0 commit comments