Skip to main content

Logical error in vote/mini.php

More
9 years 11 months ago - 9 years 11 months ago #251717 by almika
-- HikaShop version -- : 2.6.4

Hi,

I tested the new version Hikashop (2.6.4) and got the wrong display of the product pages.

I spent some time to check it and now I found a reason of it.

There is an logical error in vote/mini.php view.

Here is lines 65-85:
Code:
if ($row->hikashop_vote_total_vote > 0) { ?> <div style="display: none;"> <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <span itemprop="ratingValue"><?php echo $row->hikashop_vote_average_score; ?></span> <span itemprop="bestRating"><?php echo $row->hikashop_vote_nb_star; ?></span> <span itemprop="ratingCount"><?php echo $row->hikashop_vote_total_vote; ?></span> <span itemprop="itemReviewed">Product</span> </div> </div> <div class="hk-rating" data-original-title="<?php echo $tooltip; ?>" data-toggle="hk-tooltip"> <?php } for($i = 1; $i <= $row->hikashop_vote_average_score_rounded; $i++) { echo '<span class="hk-rate-star state-full"></span>'; } for($i = $row->hikashop_vote_average_score_rounded; $i < $row->hikashop_vote_nb_star; $i++) { echo '<span class="hk-rate-star state-empty"></span>'; } ?> </div>

If ($row->hikashop_vote_total_vote > 0) is wrong, we have </div> without <div class="hk-rating"...

And I did it so:
Code:
if ($row->hikashop_vote_total_vote > 0) { ?> <div style="display: none;"> <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <span itemprop="ratingValue"><?php echo $row->hikashop_vote_average_score; ?></span> <span itemprop="bestRating"><?php echo $row->hikashop_vote_nb_star; ?></span> <span itemprop="ratingCount"><?php echo $row->hikashop_vote_total_vote; ?></span> <span itemprop="itemReviewed">Product</span> </div> </div> <?php } ?> <div class="hk-rating" data-original-title="<?php echo $tooltip; ?>" data-toggle="hk-tooltip"> <?php for($i = 1; $i <= $row->hikashop_vote_average_score_rounded; $i++) { echo '<span class="hk-rate-star state-full"></span>'; } for($i = $row->hikashop_vote_average_score_rounded; $i < $row->hikashop_vote_nb_star; $i++) { echo '<span class="hk-rate-star state-empty"></span>'; } ?> </div>

Best regards
Last edit: 9 years 11 months ago by almika.

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #251776 by nicolas
Hi,

Thanks for the feedback. You're totally right. We've changed that on our end.

Please Log in or Create an account to join the conversation.

Time to create page: 0.206 seconds
Powered by Kunena Forum