File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed
app/code/Magento/Review/view/frontend/templates Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ $reviewHelper = $block->getData('reviewHelper');
43
43
<div class="rating-summary">
44
44
<span class="label"><span><?= $ block ->escapeHtml (__ ('Rating ' )) ?> :</span></span>
45
45
<div class="rating-result"
46
+ id="rating-result_<?= /* @noEscape */ $ block ->escapeHtml ($ review ->getId ()) ?> "
46
47
title="<?= /* @noEscape */ ((int )$ review ->getSum () / (int )$ review ->getCount ()) ?> %">
47
48
<span>
48
49
<span>
@@ -51,9 +52,10 @@ $reviewHelper = $block->getData('reviewHelper');
51
52
</span>
52
53
</div>
53
54
</div>
54
- <?= /* @noEscape */ $ secureRenderer ->renderStyleAsTag (
55
+ <?= /* @noEscape */
56
+ $ secureRenderer ->renderStyleAsTag (
55
57
"width: " . /* @noEscape */ ((int )$ review ->getSum () / (int )$ review ->getCount ()) . "%; " ,
56
- 'div. rating-summary div.rating-result>span:first-child '
58
+ '# rating-result_ ' . $ block -> escapeHtml ( $ review -> getId ()) . ' span '
57
59
) ?>
58
60
<?php endif ; ?>
59
61
</td>
Original file line number Diff line number Diff line change 30
30
<?php $ rating = $ _review ->getSum () / $ _review ->getCount () ?>
31
31
<div class="rating-summary">
32
32
<span class="label"><span><?= $ block ->escapeHtml (__ ('Rating ' )) ?> :</span></span>
33
- <div class="rating-result" title="<?= $ block ->escapeHtmlAttr ($ rating ) ?> %">
33
+ <div class="rating-result"
34
+ id="rating-result_<?= /* @noEscape */ $ block ->escapeHtml ($ _review ->getId ()) ?> "
35
+ title="<?= $ block ->escapeHtmlAttr ($ rating ) ?> %">
34
36
<span>
35
37
<span><?= $ block ->escapeHtml ($ rating ) ?> %</span>
36
38
</span>
37
39
</div>
38
- <?= /* @noEscape */ $ secureRenderer ->renderStyleAsTag (
39
- "width: " . $ block ->escapeHtmlAttr ($ rating ) . "% " ,
40
- 'div.rating-result>span:first-child '
40
+ <?= /* @noEscape */
41
+ $ secureRenderer ->renderStyleAsTag (
42
+ "width: " . $ block ->escapeHtmlAttr ($ rating ) . "% " ,
43
+ '#rating-result_ ' . $ block ->escapeHtml ($ _review ->getId ()) . ' span '
41
44
) ?>
42
45
</div>
43
46
<?php endif ; ?>
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ $urlForm = $block->getReviewsUrl() . '#review-form';
21
21
<span class="label"><span><?= $ block ->escapeHtml (__ ('Rating ' )) ?> :</span></span>
22
22
<div class="rating-result"
23
23
id="rating-result_<?= /* @noEscape */ $ block ->getProduct ()->getId () ?> "
24
- title="<?= $ block ->escapeHtmlAttr ($ rating ); ?> %"
24
+ title="<?= $ block ->escapeHtmlAttr ($ rating ) ?> %"
25
25
>
26
26
<span>
27
27
<span>
You can’t perform that action at this time.
0 commit comments