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

Support for AggregateOffer is missing #70

Open
madman-81 opened this issue Dec 3, 2021 · 0 comments
Open

Support for AggregateOffer is missing #70

madman-81 opened this issue Dec 3, 2021 · 0 comments

Comments

@madman-81
Copy link

AggregateOffer (https://schema.org/AggregateOffer) isn't supported and result in a normal Offer. Could this be added?

        return Context::create('product', [
            'name' => 'some name',
            'image' => [
                'https://site.com/image1.png',
                'https://site.com/image2.png'
            ],
            'description' => 'some description',
            'brand' => [
                '@type' => 'Brand',
                'name' => 'Awesome brand'
            ],
            'offers' => [
                '@type' => 'AggregateOffer',
                'offerCount' => 3,
                'lowPrice' => 100,
                'highPrice' => 200,
                'priceCurrency' => 'EUR'
            ]
        ]);

Expected:

{"@context":"http:\/\/schema.org","@type":"Product","name":"some name","description":"some description","brand":{"@type":"Brand","name":"Awesome brand"},"image":["https:\/\/site.com\/image1.png","https:\/\/site.com\/image2.png"],
"offers":{
    "@type":"AggregateOffer",
    "offerCount": "3",
    "lowPrice": "100",
    "highPrice": "200",
    "priceCurrency":"EUR"
}
}

Actual:

{"@context":"http:\/\/schema.org","@type":"Product","name":"some name","description":"some description","brand":{"@type":"Brand","name":"Awesome brand"},"image":["https:\/\/site.com\/image1.png","https:\/\/site.com\/image2.png"],
"offers":{
    "@type":"Offer",
    "priceCurrency":"EUR"
}
}
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

1 participant