0

I have category pages that contain products. Some of the products have fixed prices and some of the products have price ranges.

Also any product has a seller that must be inside Offer. Right? So I must use the Offer type and I can not using PriceSpecification. Am I wrong?

How can I use Microdata with this condition?

A product with price range in my product list page:

<li  itemscope itemtype="http://schema.org/Product"   >
<span  itemprop="name" >ProductName</span>

<div   itemprop="offers" itemscope itemtype="http://schema.org/Offer">

<ul>
 <li><meta itemprop="maxprice" content="1000000"  /><meta itemprop="minprice" content="10000"  />
<meta itemprop="priceCurrency" content="USD"  />
from 10,000 to 1,000,000 USD</li>

</ul>

<div  itemprop="seller" itemscope itemtype="http://schema.org/Organization">
<ul>

<li><span itemprop="telephone" >00188341534</span></li>
</ul>
</div>

 <div  itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span  itemprop="addressLocality">Washington</span></div>

I need valid code look like this. But this code is not valid.

  • 1
    Your using a lot of bloat in your code... what's the point in using of ul > li > meta when just meta would do fine. Also, you could use <li temprop="telephone">00188341534</li>, only use spans and element elements for styling, or when you absolutely have no other choice. The examples on Schema, are purely for example purposes only. You can use itemtype and itemprop on all containers, such as <main>, <ul>,<header>,<body>,<html>,<h1>,<p>,<li>,<ul>,<section> and so on. – Simon Hayter Sep 28 '16 at 16:09
  • @SimonHayter I am using meta because some data inside span is not valid for Microdata. So i have to use meta that is invisible to users.Am i right? But about using a lot of bloat, you are right.Thanks for notifying me. – Mohsen Tavoosi محسن طاوسی Sep 29 '16 at 9:20
  • 1
    I was referring to meta within a the UL, LI, its pointless since meta is not an element, or visible to users. – Simon Hayter Sep 29 '16 at 9:37
2

You can have a PriceSpecification for the Offer, by using the priceSpecification property:

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

  <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">

    <div itemprop="priceSpecification" itemscope itemtype="http://schema.org/PriceSpecification">
    </div>

  </div>

</article>

And inside the PriceSpecification, you can use the minPrice and maxPrice properties. (Note that they are case-sensitive.)

-1
<div itemscope itemtype="http://schema.org/Product">

  <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">

  <h1 itemprop="description">New furnace and installation</h1>

    <div itemprop="priceSpecification" itemscope itemtype="http://schema.org/PriceSpecification">
    Prices for a unit installation:<br>

    Minimum : <span itemprop="minPrice">10.00</span><span itemprop="priceCurrency">USD</span>
    <br>
    Maximum : <span itemprop="maxPrice">30.00</span><span itemprop="priceCurrency">USD</span>

    </div>

  </div>

</div>
  • 1
    A code only answer is not high quality. You should edit this answer and explain more about what the code does. It would be helpful to link to any documentation about it as well. – Stephen Ostermiller Mar 25 '18 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.