mikailyilmaz3
mikailyilmaz3

Reputation: 21

How come my Schema service is not recognized correctly?

I am a bit in doubt about whether my my pricing table is correct set up according to Schema / Microdata. Can you help me validate it? Schema's own validator tool has no errors or warning. However, when validating through the tool, it looks like the 'Hair colour'-service is not recognized as a service (correctly), because I have included PriceSpecification and minPrice.

Schema validator tool screenshot

<table>
  <thead>
    <tr>
      <th scope="col">Treatment</th>
      <th scope="col">Price</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th colspan="2" scope="col">Cuts and hair colours</th>
    </tr>
    <tr itemscope itemtype="https://schema.org/Service">
      <td itemprop="name">Consultation<br /> <small>when you need ideas</small></td>
      <td itemprop="offers" itemscope itemtype="https://schema.org/Offer">
        <span itemprop="price" content="0">Free</span>
        <meta itemprop="priceCurrency" content="DKK" />
      </td>
    </tr>
    <tr itemscope itemtype="https://schema.org/Service">
      <td itemprop="name">Lady haircut<br /> <small>including wash</small></td>
      <td itemprop="offers" itemscope itemtype="https://schema.org/Offer">
        <span itemprop="price" content="660">660</span>
        <span itemprop="priceCurrency" content="DKK">kr.</span>
      </td>
    </tr>
    <tr itemscope itemtype="https://schema.org/Service">
      <td itemprop="name">Hair colour<br /> <small>including wash</small></td>
      <td itemprop="offers" itemscope itemtype="https://schema.org/Offer">
        <div itemscope itemtype="https://schema.org/PriceSpecification">
          <span itemprop="minPrice" content="1650">from 1.650</span>
          <span itemprop="priceCurrency" content="DKK">kr.</span>
        </div>
      </td>
    </tr>
  </tbody>
</table>

Upvotes: 1

Views: 96

Answers (1)

traynor
traynor

Reputation: 8742

The problem is that your markup is not correct: you need to wrap PriceSpecification inside a corresponding container/property of Offer (which is why it's being detected as "standalone", and not part of Service):

Instances of PriceSpecification may appear as a value for the following properties

https://schema.org/PriceSpecification

In your case, priceSpecification property would be appropriate (because you use Offer), so, you need to wrap PriceSpecification inside a priceSpecification property/container of Offer:

<tr itemscope itemtype="https://schema.org/Service">
  <td itemprop="name">Hair colour<br /> <small>including wash</small></td>
  <td itemprop="offers" itemscope itemtype="https://schema.org/Offer">
    <div itemprop="priceSpecification" itemscope itemtype="https://schema.org/PriceSpecification">        
      <span itemprop="minPrice" content="1650">from 1.650</span>
      <span itemprop="priceCurrency" content="DKK">kr.</span>         
    </div>
  </td>
</tr>

full code:

<table>
  <thead>
    <tr>
      <th scope="col">Treatment</th>
      <th scope="col">Price</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th colspan="2" scope="col">Cuts and hair colours</th>
    </tr>
    <tr itemscope itemtype="https://schema.org/Service">
      <td itemprop="name">Consultation<br /> <small>when you need ideas</small></td>
      <td itemprop="offers" itemscope itemtype="https://schema.org/Offer">
        <span itemprop="price" content="0">Free</span>
        <meta itemprop="priceCurrency" content="DKK" />
      </td>
    </tr>
    <tr itemscope itemtype="https://schema.org/Service">
      <td itemprop="name">Lady haircut<br /> <small>including wash</small></td>
      <td itemprop="offers" itemscope itemtype="https://schema.org/Offer">
        <span itemprop="price" content="660">660</span>
        <span itemprop="priceCurrency" content="DKK">kr.</span>
      </td>
    </tr>
    <tr itemscope itemtype="https://schema.org/Service">
      <td itemprop="name">Hair colour<br /> <small>including wash</small></td>
      <td itemprop="offers" itemscope itemtype="https://schema.org/Offer">
        <div itemprop="priceSpecification" itemscope itemtype="https://schema.org/PriceSpecification">        
          <span itemprop="minPrice" content="1650">from 1.650</span>
          <span itemprop="priceCurrency" content="DKK">kr.</span>         
        </div>
      </td>
    </tr>
  </tbody>
</table>

Upvotes: 0

Related Questions