3

Could somebody advise the best way to add correct Schema.org markup for the page where the user can buy some product? I am adding the Product tag there (for Rich Snippets).

I would like to add possibility to ask questions about this product, but I didn't find what properties I could use as embedded items.

Example:

<div itemscope="" itemtype="http://schema.org/Product">
    <meta itemprop="brand" content="Brand">
    <meta itemprop="url" content="URL">
    ......

    <div id="question1" itemprop=??????? itemscope="" itemtype="http://schema.org/Question">
         ......
        <div id="answer1" itemprop=??????? itemscope="" itemtype="http://schema.org/Question/Answer">....</div>
        <div id="answer2" itemprop=??????? itemscope="" itemtype="http://schema.org/Question/Answer">....</div>
    </div>
    ...
    <div id="question10" itemprop=??????? itemscope="" itemtype="http://schema.org/Question">
        ......
        <div id="answer1" itemprop=??????? itemscope="" itemtype="http://schema.org/Question/Answer">....</div>
        <div id="answer2" itemprop=??????? itemscope="" itemtype="http://schema.org/Question/Answer">....</div>
    </div>
</div> 
unor
  • 82,883
  • 20
  • 183
  • 315

1 Answers1

1

There is no property to add a Question to a Product.
But there is a property to convey that a Question is about a Product: about.

There are different ways how this can be marked up with Microdata. Here is an example using itemref:

<div id="product-42" itemprop="about" itemscope itemtype="http://schema.org/Product">
</div>

<div itemscope itemtype="http://schema.org/Question" itemref="product-42">
</div>

<div itemscope itemtype="http://schema.org/Question" itemref="product-42">
</div>

To link an Answer to a Question, you can use suggestedAnswer/acceptedAnswer.

unor
  • 82,883
  • 20
  • 183
  • 315
  • Thanks a lot! So there is no way to include Questions div blocks inside Product div as unfortunately I am not allowed to change the html structure a lot? – Nika Derkach Jul 10 '17 at 09:36
  • @NikaDerkach: There are two ways. 1) You could use the `itemprop-reverse` attribute (which is not part of the Microdata spec) to specify `about` in the other direction. 2) You could use `itemid` to give your product an URI as ID, and use this URI as value for the `about` property (e.g., in a `link` element). -- For both ways, you can find examples in [my answer to the question *Linking independent elements in Microdata*](https://stackoverflow.com/a/38663388/1591669). – unor Jul 10 '17 at 10:20
  • Thanks a lot @unor! – Nika Derkach Jul 12 '17 at 12:51