Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markup errors in AggregateOffer examples #3298

Closed
jvandriel opened this issue Apr 22, 2023 · 5 comments
Closed

Markup errors in AggregateOffer examples #3298

jvandriel opened this issue Apr 22, 2023 · 5 comments

Comments

@jvandriel
Copy link

The https://schema.org/AggregateOffer markup examples contain a couple of errors:

"offers": {
    "@type": "AggregateOffer",
    "highPrice": "$1495",
    "lowPrice": "$1250",
    "offerCount": "8",

and

"offers": {
    "@type": "AggregateOffer",
    "lowPrice": "$35",
    "offerCount": "1938"

In both case there's a price currency symbol in the pricing values. Providing number values and adding a priceCurrency property instead would be better. Secondly in JSON-LD Number values should be without double quotes.

"offers": {
    "@type": "AggregateOffer",
    "priceCurrency": "USD",
    "highPrice": 1495,
    "lowPrice": 1250,

And the second example only has a lowPrice. Since there's no highPrice it'd be better to use price instead.

"offers": {
    "@type": "AggregateOffer",
    "priceCurrency": "USD",
    "price": 35,
    "offerCount": 1938
@jvandriel jvandriel changed the title Markup error in AggregateOffer prices Markup errors in AggregateOffer markup examples Apr 22, 2023
@jvandriel jvandriel changed the title Markup errors in AggregateOffer markup examples Markup errors in AggregateOffer examples Apr 22, 2023
@RichardWallis
Copy link
Contributor

RichardWallis commented May 2, 2023

Whilst inspecting errors in identified examples (eg-0011, eg-0461) also identified similar 'priceCurrency' issues in near by Offer examples (eg-0174, eg-0202, eg-0208)

Will fix together

@jvandriel
Copy link
Author

Thanks @RichardWallis

danbri added a commit that referenced this issue May 12, 2023
…xisting vocabulary. Needs another pass but bridges the

different pieces of related vocabulary in several places.
/cc @rvguha
For #3298
@jvandriel
Copy link
Author

jvandriel commented May 17, 2023

I just noticed the matter of double quote usage hasn't been fixed in this release @RichardWallis. Does this happen to do with how the json-ld examples are being generated or is this something I could fix myself if I modify the correct files?

And if I can make such fixes myself, could you point out which files I need to edit?

@RichardWallis
Copy link
Contributor

These examples are not 'generated' they just use the code suppled.

So used to seeing double quotes around everything, I didn't spot the difference in your suggested change beyond priceCurrency.

I will fix to the suggested ideal practice. However I note the term definition does also allow Text - reflecting common [poor] practice

@jvandriel
Copy link
Author

jvandriel commented May 17, 2023

No worries, I don't want to put it all on your back.

The reason I asked is because quite recently, yet again, I had a discussion with some folks about how they sometimes don't understand the often subtle differences between schema.org examples and those provided by Google, and that because of this markup examples copied from schema.org sometimes don't seem to satisfy the Rich Result Test even after folks have modified their templates.

And so I'm contemplating helping out by by going through (all of?) schema.org examples to see what I can update and actualize to modern patterns.

Now don't get me wrong, I don't intend on making sure everything complies with what Google wants (not that crazy), it's more about actualizing as many of the examples as I can, thus trying to prevent copy and paste errors for folks that aren't all that experienced in this stuff.

danbri added a commit to gmackenz/schemaorg that referenced this issue May 17, 2023
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

No branches or pull requests

2 participants