Mobile app version of vmapp.org
Login or Join
Miguel251

: How to mark up the "isAccessoryOrSparePartFor" property for a replacement part? I want to create a rich snippet for a replacement valve for a kitchen faucet. How do I associate that part to

@Miguel251

Posted in: #Microdata #Products #RichSnippets #SchemaOrg

I want to create a rich snippet for a replacement valve for a kitchen faucet.

How do I associate that part to the parent product using Microdata and the isAccessoryOrSparePartFor property?

This is what I have so far:

<div itemprop="isAccessoryOrSparePartFor" itemscope itemtype="http://schema.org/Product">
<h1 itemprop="name">Replacement Valve 209438</h1>
<link itemprop="url" href="https://www.example/replacement-valve-209438">
<link itemprop="model" href="https://www.example.com/kitchen-faucet-220/">
<!-- more product properties, etc. -->
</div>


How should it look in the Google Rich Snippet Tool--should there be one product or two? Is model the correct property to associate to the parent faucet?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Miguel251

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

(Google’s Products rich result doesn’t make use of the isAccessoryOrSparePartFor property, so the following is only based on how it can be represented with Schema.org.)

Your structured data conveys: There is a Product (not shown) which is an an accessory/spare part for the Product "Replacement Valve 209438". But you want it the other way around, as far as I understand it.

So it could look like this:

<article itemscope itemtype="http://schema.org/Product">

<h2 itemprop="name">Replacement Valve 209438</h2>

<div itemprop="isAccessoryOrSparePartFor" itemscope itemtype="http://schema.org/Product">
<a itemprop="url" href="/kitchen-faucet-220">
<span itemprop="name">Kitchen Faucet 220</span>
</a>
</div>

</article>


The model property can be used to reference the ProductModel of the Product for which (!) you specify the property.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme