Skip to content

Commit 0fc5806

Browse files
Fixed broken review links on product page going to 404 (#691)
Co-authored-by: Giacomo Putignano <gputignano@users.noreply.github.com>
1 parent c161f93 commit 0fc5806

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

app/design/frontend/base/default/template/review/helper/summary.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@
2323
</p>
2424
</div>
2525
<?php elseif ($this->getDisplayIfEmpty()): ?>
26-
<p class="no-rating"><a href="<?= $this->getReviewsUrl() ?>#review-form"><?= $this->__('Be the first to review this product') ?></a></p>
26+
<p class="no-rating"><a href="#tab-reviews" onclick="document.querySelector(this.getAttribute('href')).click()"><?= $this->__('Be the first to review this product') ?></a></p>
2727
<?php endif ?>

app/design/frontend/base/default/template/review/product/view/list.phtml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,7 @@
6767
</div>
6868
<?php elseif($this->getParentBlock()): ?>
6969
<div class="rv-header empty">
70-
<?php
71-
/** @var Mage_Catalog_Block_Product_Abstract $parent */
72-
$parent = $this->getParentBlock();
73-
?>
74-
<?= $parent->getReviewsSummaryHtml($this->getProduct(), 'short', true) ?>
70+
<p class="no-rating"><?= $this->__('This product has no reviews yet') ?></p>
7571
<button type="button" class="button" onclick="document.getElementById('review-dialog').showModal()">
7672
<?= $this->__('Be the First to Review') ?>
7773
</button>

app/locale/en_US/Mage_Review.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"Summary","Summary"
7878
"Summary of Review","Summary of Review"
7979
"Summary Rating","Summary Rating"
80+
"This product has no reviews yet","This product has no reviews yet"
8081
"Title","Title"
8182
"Type","Type"
8283
"Unable to post the review.","Unable to post the review."

0 commit comments

Comments
 (0)