Trying to sort out how to use the schema.org property isConsumableFor with JSON. I set the main product as "Raspberry Pi 4" and the isConsumableFor product "Power Supply".
The JSON snippet is built for "Raspberry Pi 4":
{
"@context":"http://schema.org/",
"@type":"Product",
"name":"Raspberry Pi 4",
"image":[
"raspberry-pi-4-model-b.jpg",
"raspberry-pi-4-model-b-2.jpg",
],
"description":"Raspberry Pi 4 ...",
"offers":{
"@type":"AggregateOffer",
"offerCount":1,
"highPrice":"40.00 ",
"lowPrice":"40.00 ",
"priceCurrency":"EUR",
"offers":[
{
"@type":"Offer",
"priceCurrency":"EUR",
"priceValidUntil":"2019-11-09T21:50:32+01:00",
"url":"Raspberry-Pi-4-Model-B",
"price":"40.00 ",
"itemCondition":"http://schema.org/New",
"availability":"http://schema.org/InStock",
}
]
}
}
On the page of Raspberry Pi 4 where do I have to kick the property "isConsumableFor"? To Raspberry Pi 4 or to Power Supply?
{
"@context": "http://schema.org/",
"@type": "Product",
"isConsumableFor":{
"@context":"http://schema.org/",
"@type":"Product",
"name":"Raspberry Pi 4",
"url":"example.com",
},
}
or that way but if there are more consumable products available for Raspberry Pi 4 than it will repeat all the time the Raspberry Pi 4 where one time should be enough for all accessories:
{
"@context":"http://schema.org/",
"@type":"Product",
"name":"Power Supply",
"image":[
"psu.jpg",
"psu-2.jpg",
],
"description":"Power Supply ...",
"offers":{
"@type":"AggregateOffer",
"offerCount":1,
"highPrice":"8.00 ",
"lowPrice":"8.00 ",
"priceCurrency":"EUR",
"offers":[
{
"@type":"Offer",
"priceCurrency":"EUR",
"priceValidUntil":"2019-11-09T21:50:32+01:00",
"url":"powersupply",
"price":"8.00 ",
"itemCondition":"http://schema.org/New",
"availability":"http://schema.org/InStock",
}
]
},
"isConsumableFor":{
"@context":"http://schema.org/",
"@type":"Product",
"name":"Raspberry Pi 4",
}
}