Author |
Topic |
|
go4gold
VP-CART New User
151 Posts |
Posted - December 13 2006 : 00:58:54
|
Hi,
Not sure if this is a bug or just me. The "Review" feature is critical for my site but it is currently treating a "no rating" as though it were "0 Stars" which is of course very different. e.g. one "5 star" rating plus one "no-rating" shows up as an average rating of 3 stars when it should be 5 stars.
Any ideas anyone please? Thanks in advance.
Go4Gold |
|
dafragan
Starting Member
45 Posts |
Posted - December 13 2006 : 20:38:25
|
Hi!
If you've got templates, I think it's an easy fix. Find the sub FileioReviewAverage in shopfileio.asp and change the sql to -
rsql=" SELECT catalogid, Avg(rating) AS avgofrating, count(catalogid) as countcatalogid from reviews where catalogid=" & catalogid & " AND authorized IS NOT NULL GROUP BY catalogid"
That just tells it to ignore any reviews that have no rating.
Hope that helps!
Seb |
|
|
go4gold
VP-CART New User
151 Posts |
Posted - December 14 2006 : 09:24:35
|
Hi Sebastian,
Thanks for taking the trouble to respond. I am using the default template and checked it against the code you suggest but in fact it has this same code already. So no luck I'm afraid.
No-one else have the same problem I suppose?
Thanks in advance.
Go4Gold |
|
|
dafragan
Starting Member
45 Posts |
Posted - December 14 2006 : 14:08:54
|
Hey Go4Gold!
Sorry, my mistake, I pasted in the original code!
Try this code -
rsql=" SELECT catalogid, Avg(rating) AS avgofrating, count(catalogid) as countcatalogid from reviews where catalogid=" & catalogid & " AND authorized IS NOT NULL and NOT rating = 0 GROUP BY catalogid"
Seb |
|
|
go4gold
VP-CART New User
151 Posts |
Posted - December 14 2006 : 16:01:17
|
Hey Seb!
Thanks, this fixes part of the problem. On the product detail page, the review average now displays correctly, however the search results and category pages still display an average star rating that includes the "no rating" reviews. Would you happen to know how to tweak the code further please?
Thanks again for your help already.
Go4Gold |
|
|
support
Administrator
4679 Posts |
Posted - December 14 2006 : 16:17:58
|
Hi,
The same query is located in shopreviewaverage.asp - if you make the same change there it should fix your issue.
Regards, Claire VP-ASP Support |
|
|
go4gold
VP-CART New User
151 Posts |
Posted - December 14 2006 : 17:15:19
|
Hi,
Excellent, that's sorted it, thanks Claire! Thanks again Seb.
Go4Gold |
|
|
go4gold
VP-CART New User
151 Posts |
Posted - December 14 2006 : 17:36:52
|
A quick (?) follow on question if I may. At the moment the rating defaults to 5 stars - is it possible now to change this so the default is "no rating" please? It's just that if someone forgets to complete a field and then submits a review, it is rejected and the rating returns to the default of 5 stars so they have to notice this and change it again. Sorry if this all sounds a bit pedantic but I shall be using the star ratings as a kind of voting system so they will be an important part of my site.
Thanks in advance.
Go4Gold |
|
|
|
Topic |
|