Author Topic: Rating Images not showing up  (Read 31294 times)

sandstorm

  • Jr. Member
  • **
  • Posts: 234
    • ConCom
  • Skype Name: sandstorm871
  • VirtueMart Version: 3.0.16
Rating Images not showing up
« on: February 06, 2012, 16:18:24 pm »
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

tobisagt

  • Jr. Member
  • **
  • Posts: 104
Re: Rating Images not showing up
« Reply #1 on: February 07, 2012, 00:02:06 am »
I have a similar problem but still no answer...

http://forum.virtuemart.net/index.php?topic=96845.msg318615#msg318615

sandstorm

  • Jr. Member
  • **
  • Posts: 234
    • ConCom
  • Skype Name: sandstorm871
  • VirtueMart Version: 3.0.16
Re: Rating Images not showing up
« Reply #2 on: February 07, 2012, 13:42:19 pm »
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

  • Jr. Member
  • **
  • Posts: 51
  • If everything was easy it woud be frickin awesome!
Re: Rating Images not showing up
« Reply #3 on: February 08, 2012, 10:31:05 am »
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

  • Jr. Member
  • **
  • Posts: 104
Re: Rating Images not showing up
« Reply #4 on: February 11, 2012, 18:13:50 pm »
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

  • Jr. Member
  • **
  • Posts: 51
  • If everything was easy it woud be frickin awesome!
Re: Rating Images not showing up
« Reply #5 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. 
Joomla 2.5.4
Virtuemart 2.0.6
PHP 5.2.17
MySQL 5.5.21-55
APACHE 2.2.22

tobisagt

  • Jr. Member
  • **
  • Posts: 104
Re: Rating Images not showing up
« Reply #6 on: February 15, 2012, 15:04:19 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

  • Full Member
  • ***
  • Posts: 1035
    • J-lux
Re: Rating Images not showing up
« Reply #7 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.

tobisagt

  • Jr. Member
  • **
  • Posts: 104
Re: Rating Images not showing up
« Reply #8 on: February 17, 2012, 00:01:50 am »
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

  • Beginner
  • *
  • Posts: 6
Re: Rating Images not showing up
« Reply #9 on: February 18, 2012, 18:50:28 pm »
Hi,

I have the some problem, anybody resolve ?

Thank you

hollywooood

  • Jr. Member
  • **
  • Posts: 51
  • If everything was easy it woud be frickin awesome!
Re: Rating Images not showing up
« Reply #10 on: February 23, 2012, 09:56:54 am »
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

  • Jr. Member
  • **
  • Posts: 51
  • If everything was easy it woud be frickin awesome!
Re: Rating Images not showing up
« Reply #11 on: February 25, 2012, 09:56:18 am »
OK...so here is what I did...

Replace:
Code: [Select]
<?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:

Code: [Select]
<?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

  • Jr. Member
  • **
  • Posts: 51
  • If everything was easy it woud be frickin awesome!
Re: Rating Images not showing up
« Reply #12 on: February 25, 2012, 09:58:55 am »
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3751
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Rating Images not showing up
« Reply #13 on: February 25, 2012, 14:06:45 pm »
Hollywood nice to provide a methode but this is not good.

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

vapro

  • Beginner
  • *
  • Posts: 9
Re: Rating Images not showing up
« Reply #14 on: February 25, 2012, 15:00:02 pm »
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... :)