Ratings

  • Posts: 62
  • Thank you received: 1
  • Hikashop Business
4 days 8 hours ago #312951

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.13
-- PHP version -- : 7.2.21

Hi I have a question about the ratings.

I would like to use some of the ratings variables at the bottom of the product/show.php file.
Now i see in the vote/mini.php the following variables:
$row->hikashop_vote_average_score, $row->hikashop_vote_nb_star and $row->hikashop_vote_total_vote.

When i try to use them in the show.php file at the bottom they do not work.
Can i use them in the show.php file?

Thanks

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

  • Posts: 67389
  • Thank you received: 9992
  • MODERATOR
2 days 18 hours ago #312975

Hi,

No, the variables are only avaiable in the context of vote/mini.php and vote/form.php
What you can do is use such code in vote mini.php / form.php:

$_SESSION['my_var'] = $row->hikashop_vote_average_score;
and then use
echo $_SESSION['my_var'];
in product / show.php so that it can use the variable defined in the other context.

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

Time to create page: 0.054 seconds
Powered by Kunena Forum