How to display total number of votes?

  • Posts: 224
  • Thank you received: 8
6 years 11 months ago #293375

Hello,
I am trying to apply your suggestion ( www.hikashop.com/forum/product-category-...ote-total-count.html )

I have inserted this code

<div class="hika-total-votes">&nbsp<?php echo $this->element->product_total_vote; ?> recensioni</div>
in vote / mini.php
but it doesn't print the total number of votes (yes, I have many for the product I am testing with)

thank you

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

  • Posts: 83779
  • Thank you received: 13566
  • MODERATOR
6 years 11 months ago #293396

Hi,

Maybe the place you're looking at doesn't use vote/mini.php but another view file.
Check with the "Display view files" setting of the Hikashop configuration to make sure that it is the correct view file you're editing.
If that's the case, then please provide a screenshot of the page with that option activated, and a link to the page so that we can look at the situation.

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

  • Posts: 224
  • Thank you received: 8
6 years 11 months ago #293408

Yes , the file I am modifying is correct, infact I see a text I've put aside to where the total number of votes should show.
You can check this link accademiainfinita.it/shop/prodotto/medit...a-iscrizione-annuale
even if right now the page layout is broken and you can't really see the elements on the right side of the product image.
This is causes by the carousel slider (see this other post: www.hikashop.com/forum/install-update/89...-breaking-layout.htm )

Maybe you can check both issues at the same time.

Below I attach my vote custom templates, it contains also the mini.php file

Thank you!

Attachments:

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

  • Posts: 83779
  • Thank you received: 13566
  • MODERATOR
6 years 11 months ago #293419

Hi,

I had a look at the code in the views.
The code from the other thread is for the product/show.php or product/show_*.php view files.
for the vote/mini.php the code needs to be different.
It should be:

<div class="hika-total-votes">&nbsp<?php echo $row->hikashop_vote_total_vote; ?> recensioni</div>

The following user(s) said Thank You: oloccina

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

  • Posts: 224
  • Thank you received: 8
6 years 11 months ago #293435

that works, thank you!

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

Time to create page: 0.061 seconds
Powered by Kunena Forum