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.aspxThanks
|
|
|
|
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
|
|
|
|
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.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close