News:

Looking for documentation? Take a look on our wiki

Main Menu

Avarage Rating doesn't seem to be working

Started by zuotoski, December 23, 2014, 21:55:31 PM

Previous topic - Next topic

zuotoski

Hi,

   I've been trying for days, reading everything I could find here and in other places about it, with no success. I've tried some code changes, but actually nothing is related to my issue. I have two problems:

- FRONTEND:

I've set the ratings and comments as follows:

Auto-Publish Reviews: yes
Comment Minimum Length: 0
Comment Maximum Length: 2000
Show Review: Show to Everybody
Enable Review System for: To Registered users
Show Rating: Show to Everybody
Enable Rating System for: To Registered users
Order status Review/Rating: Confirmed



I am able to rate and comment the product, it shows in the backend as a new review and also shows at the bottom of the product details' page. But even with more than one rating, the avarage rating still shows "Not rated yet", like this:

- Rating and review at the bottom of the page:



- Avarage Rating at the top of the page:



- BACKEND:

Even with the option to autopublish ratings and comments, it still shows the red icon indicating that the rating is not published (but it is actually) and it doesn't matter if I click on the icon to publish or unpublish it, the review remains as published - as below:



If I click on the date of the review, it changes to another page where I supposedly could edit the user's review, but If I select the review I want to edit, by clicking on the left box of the review itself, and click on the "Edit" button nothing happens. The only way to edit it is to click on the link of the review where the user name and date are displayed. In this page, the published and unpublished function works and the icon changes (for another image) like this:



OK, it should open the selected item to edit, but instead it opens a blank review, like this:



If I change its content, like to add a review and/or comments, I get this error:

"vmError: Cant save rating/review/vote without vote/product_id"

This is the page with the error:




     I've also tested it with Beez template, but it doesn't matter which template I use, the problem remains.

SYSTEM INFORMATION:

PHP Built On    Linux servidor2 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014 x86_64
Database Version    5.5.38-0ubuntu0.14.04.1
Database Collation    latin1_swedish_ci
PHP Version    5.5.9-1ubuntu4.4
Web Server    Apache/2.4.7 (Ubuntu)
WebServer to PHP Interface    apache2handler
Joomla! Version    Joomla! 3.3.6 Stable [ Ember ] 01-October-2014 02:00 GMT
Joomla! Platform Version    Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent    Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0

VIRTUEMART VERSION: 3.0.3

    I have an online site, but it is password protected for now, so the access is only for support.

Any ideas? Is this a known issue? As far I could read here, the VM Rating System is something a little bit tricky (it shouldn't be though).

Thanks for any help.

[attachment cleanup by admin]

luisch125

Hello, same issue here. Rating in comments show perfectly, but average rating is not showing, just empty stars. I'm with the latest virtuemart and joomla versions.

Roger Lightening

I am having exactly the same issue. Any ideas about what can be going wrong. Is it a bug maybe?

zuotoski

#3
Hi.

Could somebody please try to help with this issue?

Any help would be great! :)


duncan12

This is a serious problem, well documented and confirmed, reported over 7 months ago. Yet no progress or solution posted?

jenkinhill

It's working fine on current versions with default VM templates. eg see http://demo.virtuemart.net/
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

ginageick

QuoteIt's working fine on current versions with default VM templates. eg see http://demo.virtuemart.net/

That's not really helpful since it is NOT working for a number of us.
I'm using VM 3.0.10 on Joomla 3.4.5 (PHP 5.4.45 and MySQL 5.1.73) and am having the same issue. Stars/Reviews only showing below product description, average not updating.
Help is greatly appreciated.

jenkinhill

If you are using template overrides without the correct "default" code then you could well have a problem but you give no URL to see if this is the case. As always with such issues, first test using the VM default templates - simplest way is to switch Joomla to using Protostar.  If the problem goes away then you know the issue is with your overrides.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

ginageick

Yes, I realized that I did not give any specifics :)
I also noticed that the ratings are there, but not published. Once manually published, everything seems fine.
So, the question (at least in my case) is, whether reviews can be auto published?

jenkinhill

VM Configuration/Shopfront/Shopper Review/Rating System/Auto-Publish Reviews.........
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

TemplateBoutique

#10
Hey, I have the same problem here, I wrote one 5 star review for a product and the average stars are still gray: http://template-boutique.com/cleanmart/index.php/store/category-sidebar/white-dress-detail
I disabled all overrides and changed the template, nothing happened so far.

Also the title of the star div is "Not Rated Yet", so it seems the problem isn't the template or the overrides.

I get this issue on Virtuemart version 3.0.8 as well as on 3.0.10.

By the way I don't see any review on the demo product pages although they are rated? http://demo.virtuemart.net/wear/skirt-knock-rock-detail

EDIT: This error only occurs, when the review system is on. All ratings made without the review system work fine.

TemplateBoutique

Just installed the Virtuemart 3.0.12 update, disabled all template overrides but still have the problem that it doesn't show the general rating from any review.
I have the same issue on different joomla sites, is this a general bug?

PhotonVideo

Found this topic searching for a solution to the same problem.  I think I found a partial fix.

Although auto-publish is selected in the backend, that only seems to auto-publish in the ratings with the reviews at the bottom of the product details page.  It appears that you will need to go to the VM control panel.  select Products -> Reviews & Ratings.  There you will find all the ratings that have been given.  You will probably find that the ratings show as not published.  Publish the ratings.  On my store setup, all ratings must be published, or the average rating will not show.

This is probably a bug, but at least there is a workaround.

florihana

For this issue,
my version is joomla 3.6, VIRTUEMART 3.0.8

And I found the related composant file for rating:
1.components/com_virtuemart/views/productdetails/tmpl/default_reviews.php

varaiable: $maxrating which is the key to call start and defined the animate and voting
for( $num = 0; $num<=$maxrating; $num++ ) {
        $stars[] = '
                <span title="'.(vmText::_( "COM_VIRTUEMART_RATING_TITLE" ).$num.'/'.$maxrating).'" class="vmicon ratingbox" style="display:inline-block;width:'. 16*$maxrating.'px;">
                    <span class="stars-orange" style="width:'.(16*$num).'px">
                    </span>
                </span>';
    }


The problem is maxrating calculation wide block to show starts here I had changed 24 instead 16 in this way it could be showed correctly 5 stars instead of 3


2: same file look into this line:
<div role="tabpanel" class="tab-pane fade active in" id="prod_reviews">

be make sure add active in cause this use boostrap syntag which if not add in active in the block will not show

3; in Admin the same configuration as above

4. after all those the rating system had showed correctly, here is the test screen shot

hope this could help

jenkinhill

Note that this "fix" does not apply / is not required in current (secure) Joomla/VirtueMart versions, J3.8.2 VM3.2.6, where average rating works OK.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum