News:

Looking for documentation? Take a look on our wiki

Main Menu

Rating Images not showing up

Started by sandstorm, February 06, 2012, 16:18:24 PM

Previous topic - Next topic

sandstorm

Ive created a test shop using Joomla 2.5.1 and VM2.

Though all thougout setting up I dont see images for rating in my product details/flypage pages.

It just says Rating 0 ?? - If I leave a test review, publish it, etc then it now says Rating 3/5  rather than display 3 stars.

I was using a customer Joomla template and a custom VM2 template, but have now just reverted back to default in VM2 and Joomla Beez, with the exact same result.

Is this a problem, or have I missed some setting the the new VM2 somewhere?

I also just upgraded to the 2.0.1e beta vesrion and still the same there too, so guessing i missed a setting?
Thanks,
Andy
J3.6.4 / PHP7.0.12
VM3.0.16


sandstorm

I think thats re-assuring  :o

Ive been thinking its a setting I have missed, but sounds like a possible bug?

Wait to see what response comes back here or your thread.
J3.6.4 / PHP7.0.12
VM3.0.16

hollywooood

I am also experiencing this problem.  Hope to have a resolution soon...
Joomla 2.5.4
Virtuemart 2.0.6
PHP 5.2.17
MySQL 5.5.21-55
APACHE 2.2.22

tobisagt

I really need a solution for that! Are we the only ones who got this problem?

I tried 2.0.1e but problem is still alive...

hollywooood

I guess still no solution eh?? I will have a look into what's going on here myself when I get a chance.  Was hoping there was a quick fix. 
Joomla 2.5.4
Virtuemart 2.0.6
PHP 5.2.17
MySQL 5.5.21-55
APACHE 2.2.22

tobisagt

Quote from: hollywooood on February 15, 2012, 14:59:52 PM
I guess still no solution eh?? I will have a look into what's going on here myself when I get a chance.  Was hoping there was a quick fix.

If you found a way to fix it, please let us know! :)

Scar

Did you guys try another template? Might be some sort of conflict, they are working just fine in my shop.

tobisagt

#8
Quote from: Scar on February 16, 2012, 21:46:15 PM
Did you guys try another template? Might be some sort of conflict, they are working just fine in my shop.

yes, i tried "beez_20", "beez5" and "colorshop". I work with my own template (atomic was base template).

jlgarcia9

Hi,

I have the some problem, anybody resolve ?

Thank you

hollywooood

I just did a fresh new install to see if this was something goofy on my end but it is definitely a problem with Virtuemart and it's rating system.  So far this is all I have but I am working on it...
Joomla 2.5.4
Virtuemart 2.0.6
PHP 5.2.17
MySQL 5.5.21-55
APACHE 2.2.22

hollywooood

OK...so here is what I did...

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->rating2                    ) . '/'$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->rating2                    ) . '/'$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. 

Joomla 2.5.4
Virtuemart 2.0.6
PHP 5.2.17
MySQL 5.5.21-55
APACHE 2.2.22

hollywooood

By the way...that code is around line 272 on the default.php page in the components>com_virtuemart>views>productdetails>tmpl folder...sorry I forgot to mention that.
Joomla 2.5.4
Virtuemart 2.0.6
PHP 5.2.17
MySQL 5.5.21-55
APACHE 2.2.22

Studio 42

Hollywood nice to provide a methode but this is not good.

If you change max rate to 7 then the stars are missing

vapro

#14
I try hollywood code, but i have two problem:

1.)I need to think the default.php page in the components>com_virtuemart>views>category>tmpl folder cant read the  $this->rating value!  I think this because i rated, and enable to show rating at the backend, and it doesn't work in category view. (but in product view works perfect!)

2.) I dont have stars folder and stars gif there.

i have fresh install of vm2.0.2

sorry my english... :)