logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
Macoy  
#1 Posted : Tuesday, September 10, 2019 6:07:13 PM(UTC)
Macoy

Rank: Member

Groups: Authorized User, Developers, Registered
Joined: 12/19/2018(UTC)
Posts: 11

Hello
We have these two product errors on Google search and it is related to the variants of our many products.

The errors are
1) Review count must be positive
2) Rating Value is out of range.

I think it is related to this below.

"aggregateRating": {
"@type": "AggregateRating",
"bestRating": "10",
"worstRating": "1",
"ratingValue": "0",
"reviewCount": "0"


What do we do? Each variant is not going to have a review. Should I turn something off?

If you want to know one product try https://www.macoy.com/Go...385-Solid-Back-8763.aspx



Thanks

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

shari  
#2 Posted : Thursday, September 12, 2019 2:38:57 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Hi Macoy,

We shouldn't be rendering an aggregate rating section if the review count is 0.
To fix the issue you need to update a view file.

1- Please open the file \Website\Views\Product\_ProductSchema.cshtml

2- Search for the code

Code:
"aggregateRating": {
"@@type": "AggregateRating",
"bestRating": "10",
"worstRating": "1",
"ratingValue": "@Model.RatingValue",
"reviewCount": "@Model.ReviewCount"
},


3- Replace it with

Code:
@if (Model.ReviewCount > 0)
    {
        <text>
            "aggregateRating": {
            "@@type": "AggregateRating",
            "bestRating": "10",
            "worstRating": "1",
            "ratingValue": "@Model.RatingValue",
            "reviewCount": "@Model.ReviewCount"
            },
        </text>
    }


Please let me know if there are still any errors.

Thanks
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.