<?php 
/**
 *---------------------------------------------------------------------------------------
 * @package       VP Smart Template
 *---------------------------------------------------------------------------------------
 * @copyright     Copyright (C) 2012-2020 VirtuePlanet Services LLP. All rights reserved.
 * @license       GNU General Public License version 2 or later; see LICENSE.txt
 * @authors       Abhishek Das
 * @email         info@virtueplanet.com
 * @link          https://www.virtueplanet.com
 *---------------------------------------------------------------------------------------
 */
defined('_JEXEC') or die('Restricted access');

if($showRating) :
	$rating = VPFrameworkVM::getRating($product->virtuemart_product_id);
	$score  = round($rating->rating);
	$title  = (empty($rating->count) || $rating->count == 1) ? JText::_('PLG_SYSTEM_VPFRAMEWORK_RATING') : JText::_('PLG_SYSTEM_VPFRAMEWORK_RATINGS'); 
	?>
	<div class="product-rating">
		<span class="rating">
			<span class="vm-product-rating" data-score="<?php echo $score ?>"></span>
		</span>
	</div>
<?php endif; ?>