*

webcity

  • ****
  • 220 posts
Setting default user rating count to zero if no rating
« on: March 12, 2024, 01:55:39 AM »
Hi,

How do I set the default user rating and review count to zero when the listing doesn't have a rating?

I have the rating plugin installed and all my Google listings are showing as a one star for listings that have not had a rating yet.

Code: [Select]
"aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "0",
    "bestRating": "5",
    "worstRating": "0",
    "ratingCount": "1",
    "reviewCount": "1"

I would like the ratingCount and reviewCount to default to zero when there aren't any ratings or reviews.

How do I get the ratingValue to equal the value of the rating for items that have been rated?

If I view https://plugins3.abprofitrade.eu/for-sale/cameras-camera-accessories/canon-pix-z9_i470  using the rating plugin, the rating is 4.3 but the scheme code for the listing shows ratingValue equals zero.

Any help is appreciated.

« Last Edit: March 12, 2024, 06:03:05 AM by webcity »

*

MB Themes

Re: Setting default user rating count to zero if no rating
« Reply #1 on: March 12, 2024, 08:14:20 AM »
It's user rating, not item rating, anyway we might be able to get some benefit out of it - will review.
If you set counts to 0, it's same as removing these structured data.
It's probably better to set default value to 3
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

webcity

  • ****
  • 220 posts
Re: Setting default user rating count to zero if no rating
« Reply #2 on: March 14, 2024, 03:11:50 AM »
Thanks for the plugin update - it is much appreciated :-)