------
Pls see this thread for solutions!
http://forum.virtuemart.net/index.php?topic=97611.0
------
Hi there,
the rating system is a little bit confuse...
If i want to write a review i can choose between five stars.
If i did chosse the fifth he shows in the review just a "10" (not stars)
and if i want to display the ratings in my product he shows "5/5" (not stars)
How to show ONLY stars?
Pls see attachment.
And another question, how to display the rating in category view?
-Tobi
[attachment cleanup by admin]
OK...so here is what I did...
around line 272 on the default.php page in the components>com_virtuemart>views>productdetails>tmpl folder
Replace:
<?php
if($this->showRating){
$maxrating = VmConfig::get('vm_maximum_rating_scale',5);
$rating = empty($this->rating)? JText::_('COM_VIRTUEMART_RATING').' '.JText::_('COM_VIRTUEMART_UNRATED'):JText::_('COM_VIRTUEMART_RATING') . round($this->rating->rating, 2 ) . '/'. $maxrating;
echo $rating;
}
?>
With:
<?php
if($this->showRating){
$maxrating = VmConfig::get('vm_maximum_rating_scale',5);
$rating = empty($this->rating)? JText::_('COM_VIRTUEMART_RATING').' '.JText::_('COM_VIRTUEMART_UNRATED'):JText::_('COM_VIRTUEMART_RATING') . round($this->rating->rating, 2 ) . '/'. $maxrating;
echo "<br/>";
echo $rating;
if ($rating == "Rating: 0/5"){
echo '<img src="'.JURI::root().'/components/com_virtuemart/assets/images/stars/_0.gif" style="margin-left: 6px;">';
}
if ($rating == "Rating: 1/5"){
echo '<img src="'.JURI::root().'/components/com_virtuemart/assets/images/stars/_1.gif" style="margin-left: 6px;">';
}
if ($rating == "Rating: 2/5"){
echo '<img src="'.JURI::root().'/components/com_virtuemart/assets/images/stars/_2.gif" style="margin-left: 6px;">';
}
if ($rating == "Rating: 3/5"){
echo '<img src="'.JURI::root().'/components/com_virtuemart/assets/images/stars/_3.gif" style="margin-left: 6px;">';
}
if ($rating == "Rating: 4/5"){
echo '<img src="'.JURI::root().'/components/com_virtuemart/assets/images/stars/_4.gif" style="margin-left: 6px;">';
}
if ($rating == "Rating: 5/5"){
echo '<img src="'.JURI::root().'/components/com_virtuemart/assets/images/stars/_5.gif" style="margin-left: 6px;">';
}
}
?>
Make sure you have your star images in the proper folder and you should be good to go.
hi,
Thank you hollywooood but didn't work with joomla 1.5.25 !
dose it work for you ?
I have deleted the extra } ,buy still didn't work.
There is already another thread which is more helpful.
http://forum.virtuemart.net/index.php?topic=97611.0
I think this thread can be closed!