[Skip to main content](#vessel-content)

#   Logical error in vote/mini.php

##

- **[almika](/forum/user/15732-almika "View almika's Profile")**
- [![almika's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar15732.png)](/forum/user/15732-almika "View almika's Profile") Topic Author
- [ Offline](/forum/user/15732-almika)

Less More

- Posts: 382
- Thank you received: 77
-
-
-
-

10 years 1 month ago -  10 years 1 month ago [\#251717](#251717) by [almika](/forum/user/15732-almika "View almika's Profile")  *[Logical error in vote/mini.php](/forum/3-bug-report/886784-logical-error-in-vote-mini-php#251717 "-- 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:  If ($row-&gt;hikashop&#95;vote&#95;total&#95;vote &gt; 0) is wrong, we have  without =&quot;hk-rating&amp;quot;...  And I did it so:  Best regards&quot;")* was created by *[almika](/forum/user/15732-almika "View almika's Profile")*

-- 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-&gt;hikashop_vote_total_vote &gt; 0) { ?&gt; &lt;div style="display: none;"&gt; &lt;div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"&gt; &lt;span itemprop="ratingValue"&gt;&lt;?php echo $row-&gt;hikashop_vote_average_score; ?&gt;&lt;/span&gt; &lt;span itemprop="bestRating"&gt;&lt;?php echo $row-&gt;hikashop_vote_nb_star; ?&gt;&lt;/span&gt; &lt;span itemprop="ratingCount"&gt;&lt;?php echo $row-&gt;hikashop_vote_total_vote; ?&gt;&lt;/span&gt; &lt;span itemprop="itemReviewed"&gt;Product&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="hk-rating" data-original-title="&lt;?php echo $tooltip; ?&gt;" data-toggle="hk-tooltip"&gt; &lt;?php } for($i = 1; $i &lt;= $row-&gt;hikashop_vote_average_score_rounded; $i++) { echo '&lt;span class="hk-rate-star state-full"&gt;&lt;/span&gt;'; } for($i = $row-&gt;hikashop_vote_average_score_rounded; $i &lt; $row-&gt;hikashop_vote_nb_star; $i++) { echo '&lt;span class="hk-rate-star state-empty"&gt;&lt;/span&gt;'; } ?&gt; &lt;/div&gt;

If ($row-&gt;hikashop_vote_total_vote &gt; 0) is wrong, we have &lt;/div&gt; without &lt;div class="hk-rating"...

And I did it so:
Code:

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

Best regards

Last edit: 10 years 1 month ago by [almika](/forum/user/15732-almika "View almika's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84ODY3ODQtbG9naWNhbC1lcnJvci1pbi12b3RlLW1pbmktcGhwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

10 years 1 month ago [\#251776](#251776) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Logical error in vote/mini.php](/forum/3-bug-report/886784-logical-error-in-vote-mini-php#251776 "-- 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:  If ($row-&gt;hikashop&#95;vote&#95;total&#95;vote &gt; 0) is wrong, we have  without =&quot;hk-rating&amp;quot;...  And I did it so:  Best regards&quot;")*

Hi,

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84ODY3ODQtbG9naWNhbC1lcnJvci1pbi12b3RlLW1pbmktcGhwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.049 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
