0

I have grid of products. Each product row in the grid can be expended to show the full product details (done with Ajax). The sample bellow shows how I implemented the microdata into the grid (not the full product details). The same microdata repeats over and over in the page Is this the best way?

<tbody>
        @foreach (var product in Model)
        {

            <tr itemscope itemtype="http://schema.org/Product" class="tr_prod" style="height:105px;" productid="@product.Id" optionid="@product.OptionId" shopcityid="@product.ShopCityId">
                <td>
                    <div class="prod_img_small">
                        <img class="preview" src="@Url.Content("~/Files/Products/" + product.ImgFileName)" />
                    </div>
                </td>
                <td itemprop="name">                       
                    <b>@product.Name</b>
                </td>
                <td>
                    <div itemprop='productID'>                           
                        <b>@product.Id</b>
                    </div>
                </td>

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

                        <b><span itemprop="price">@product.DeliveryPrice</span></b>
                    </div>
                </td>
                <td>                       
                    <b>@product.ProductPrice</b>
                </td>
                <td>

                    <b>@product.TotalPrice </b>
                </td>

            </tr>    
        }
    </tbody>
Eyal
  • 4,653
  • 9
  • 40
  • 56

1 Answers1

0

Does look valid to me. Some itemscopes can even be promoted to the <TD> like priceSpecification.

All metadata that's added using AJAX won't be showing up for spiders of course, so that's something to think about.

You can also add metadata to the page to indicate it's a collection of products.

<body itemscope itemtype="http://schema.org/CollectionPage">
  ...
</body>
Michaël Hompus
  • 3,349
  • 24
  • 35