Hi
I want to show How much people have voted to the product (total votes of product),
How can I do this?
for that you need to install extensions like Reviews for Virtuemart
salim,
have you enabled the review & rating system for everybody?
<?php
if ($this->showRating) {
$maxrating = VmConfig::get('vm_maximum_rating_scale', 5);
if (empty($this->rating)) {
?>
<span class="vote"><?php echo JText::_('COM_VIRTUEMART_RATING') . ' ' . JText::_('COM_VIRTUEMART_UNRATED') ?></span>
<?php
} else {
$ratingwidth = ( $this->rating->rating * 100 ) / $maxrating; //I don't use round as percetntage with works perfect, as for me
?>
<span class="vote width100">
<?php echo JText::_('COM_VIRTUEMART_RATING') . ' ' . round($this->rating->rating, 2) . '/' . $maxrating; ?>
<span title=" <?php echo (JText::_("COM_VIRTUEMART_RATING_TITLE") . $this->rating->rating . '/' . $maxrating) ?>" class="ratingbox" style="display:inline-block;">
<span class="stars-orange" style="width:<?php echo $ratingwidth.'%'; ?>">
</span>
</span>
</span>
<?php
}
}?>