VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Customization
 Review feature is not working correctly
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

go4gold
VP-ASP New User

151 Posts

Posted - December 13 2006 :  00:58:54  Show Profile  Visit go4gold's Homepage  Reply with Quote
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  Show Profile  Reply with Quote
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
Go to Top of Page

go4gold
VP-ASP New User

151 Posts

Posted - December 14 2006 :  09:24:35  Show Profile  Visit go4gold's Homepage  Reply with Quote
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
Go to Top of Page

dafragan
Starting Member

45 Posts

Posted - December 14 2006 :  14:08:54  Show Profile  Reply with Quote
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
Go to Top of Page

go4gold
VP-ASP New User

151 Posts

Posted - December 14 2006 :  16:01:17  Show Profile  Visit go4gold's Homepage  Reply with Quote
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
Go to Top of Page

support
Administrator

4266 Posts

Posted - December 14 2006 :  16:17:58  Show Profile  Visit support's Homepage  Reply with Quote
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
Go to Top of Page

go4gold
VP-ASP New User

151 Posts

Posted - December 14 2006 :  17:15:19  Show Profile  Visit go4gold's Homepage  Reply with Quote
Hi,

Excellent, that's sorted it, thanks Claire!
Thanks again Seb.

Go4Gold
Go to Top of Page

go4gold
VP-ASP New User

151 Posts

Posted - December 14 2006 :  17:36:52  Show Profile  Visit go4gold's Homepage  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000