File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
app/code/Magento/Review/view/frontend/templates Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -38,18 +38,20 @@ $product = $block->getProductData();
38
38
<?php foreach ($ block ->getRating () as $ _rating ): ?>
39
39
<?php if ($ _rating ->getPercent ()): ?>
40
40
<?php $ rating = ceil ($ _rating ->getPercent ()) ?>
41
+ <?php $ ratingCode = $ block ->escapeHtml ($ _rating ->getRatingCode ()) ?>
41
42
<div class="rating-summary item">
42
43
<span class="rating-label">
43
- <span><?= $ block -> escapeHtml ( $ _rating -> getRatingCode ()) ?> </span>
44
+ <span><?= $ ratingCode ?> </span>
44
45
</span>
45
- <div class="rating-result" title="<?= /* @noEscape */ $ rating ?> %">
46
+ <div class="rating-result <?= $ ratingCode ?> " title="<?= /* @noEscape */ $ rating ?> %">
46
47
<span>
47
48
<span><?= /* @noEscape */ $ rating ?> %</span>
48
49
</span>
49
50
</div>
50
- <?= /* @noEscape */ $ secureRenderer ->renderStyleAsTag (
51
+ <?= /* @noEscape */
52
+ $ secureRenderer ->renderStyleAsTag (
51
53
"width: " . /* @noEscape */ $ rating . "% " ,
52
- 'div.rating-result> span:first-child '
54
+ 'div.rating-result. ' . $ ratingCode . ' span '
53
55
) ?>
54
56
</div>
55
57
<?php endif ; ?>
Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ $urlForm = $block->getReviewsUrl() . '#review-form';
28
28
</span>
29
29
</div>
30
30
</div>
31
- <?= /* @noEscape */ $ secureRenderer ->renderStyleAsTag (
31
+ <?= /* @noEscape */
32
+ $ secureRenderer ->renderStyleAsTag (
32
33
'width: ' . $ block ->escapeHtmlAttr ($ rating ) . '% ' ,
33
34
'#rating-result_ ' . $ block ->getProduct ()->getId () . ' span '
34
35
) ?>
You can’t perform that action at this time.
0 commit comments