Skip to content

Fix aggregateRating schema on product page#316

Merged
NeOMakinG merged 1 commit intoPrestaShop:developfrom
rodriciru:patch-1
Jun 21, 2022
Merged

Fix aggregateRating schema on product page#316
NeOMakinG merged 1 commit intoPrestaShop:developfrom
rodriciru:patch-1

Conversation

@rodriciru
Copy link
Contributor

@rodriciru rodriciru commented Jun 8, 2022

Questions Answers
Description? Add aggregaterating to schema.org markup
Type? improvement

@rodriciru
Copy link
Contributor Author

Also, i can't find any implementation of the first if, so maybe it can be deleted
{if isset($nbComments) && $nbComments && $ratings.avg}"aggregateRating": { "@type": "AggregateRating", "ratingValue": "{$ratings.avg|round:1|escape:'html':'UTF-8'}", "reviewCount": "{$nbComments|escape:'html':'UTF-8'}" }

@rodriciru
Copy link
Contributor Author

Also, will be great to add the reviews to the schema, but as far I can see the module productcomments doesn't provide that info

@NeOMakinG
Copy link

NeOMakinG commented Jun 9, 2022

@rodriciru Please, could you make some efforts on filling the PR description? Sometimes we're pretty free not serving it for some apparent things or whatever, but we need some input here

I'll approve afterwhile

@rodriciru
Copy link
Contributor Author

Sorry!
I think it will be self-explanatory

@rodriciru
Copy link
Contributor Author

rodriciru commented Jun 9, 2022

Im working on add review to schema, but I have some problems
My PR regarding that :
PrestaShop/productcomments#140

I try to do in theme files but google complains about it because we can't link the product schema with the microdata or json+ld on .tpl (Really you can (@id or itemref) but it still complains because on product schema there's no direct ref to the reviews.
So the best option is adding to the module

@NeOMakinG
Copy link

@rodriciru I guess we can at least merge this one? And add reviews inside another PR?

@NeOMakinG NeOMakinG merged commit 5c5319f into PrestaShop:develop Jun 21, 2022
@rodriciru rodriciru deleted the patch-1 branch July 21, 2022 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants