0

In magento 1.9.3.1 on the category list page and also on the actual product view page, it displays the stars and 1 Review(s) : add your review

now this only shows up if there are reviews, anyone know how i can get this to display even if there are no reviews i.e.

the grey stars then 0 review(s) : add your review

as i want to remove the tabs with the reviews at the bottom


there are two of those statements, and i have tried changed one at a time and even both and it doesnt work for me

  <?php if ($this->getReviewsCount()): ?>
    <div class="ratings">
        <?php if ($this->getRatingSummary()):?>
            <div class="rating-box">
                <div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%"></div>
            </div>
        <?php endif;?>
        <p class="rating-links">
            <a href="<?php echo $this->getReviewsUrl() ?>"><?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?></a>
            <span class="separator">|</span>
            <a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Add Your Review') ?></a>
        </p>
    </div>
<?php elseif ($this->getDisplayIfEmpty()): ?>
    <p class="no-rating"><a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Be the first to review this product') ?></a></p>
<?php endif; ?>
0

In app\design\frontend\package_name\theme_name\template\review\helper\summary.phtml change the condition if ($this->getReviewsCount()): to if ($this->getReviewsCount() >= 0)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.