Structured data
Shoptet templates describe their content with Schema.org structured data, mostly in the microdata format (itemscope, itemtype and itemprop attributes in the HTML). Search engines read it, and you can rely on it when you edit a template or write scripts for an e-shop.
This page describes the 3rd generation templates (Techno, Tango, Waltz, Classic, Step, Disco and Samba, see Template assets). The values in the examples are illustrative; check the HTML of a real e-shop for the exact output.
Overview
Product detail
On the product detail page, the main product is described by microdata following the Google recommendation for product structured data. The Product item is the div.p-detail element.
<div class="p-detail" itemscope itemtype="https://schema.org/Product">
<meta itemprop="name" content="Konferenční stolek AIKO" />
<meta itemprop="category" content="Úvodní stránka > Interiér a bydlení > Konferenční stolek AIKO" />
<meta itemprop="url" content="https://classic.shoptet.cz/interier-a-bydleni/konferencni-stolek-aiko/" />
<meta itemprop="image" content="https://cdn.myshoptet.com/usr/classic.shoptet.cz/user/shop/big/394_konferos-brutos-1.png?6a6b3723" />
<!-- … -->
<meta itemprop="productID" content="394" />
<meta itemprop="identifier" content="88d2a7da-2cdf-11f1-9e7a-bc24115b1301" />
<span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<link itemprop="availability" href="https://schema.org/InStock" />
<meta itemprop="url" content="https://classic.shoptet.cz/interier-a-bydleni/konferencni-stolek-aiko/" />
<meta itemprop="price" content="4899.00" />
<meta itemprop="priceCurrency" content="CZK" />
<!-- etc. -->
</span>
<!-- etc. -->
</div>
The Product item can contain these properties:
name,category(the breadcrumb path joined with>),url,image(the first product image)description(the short description), if filled inmanufacturer(Organization) andbrand(Brand), both with the manufacturer's name, if a manufacturer is setgtin13with the EAN, if filled inproductID(the product ID) andidentifier(the product GUID)skuwith the product code (for a product with variants, the code is in each offer)aggregateRating(AggregateRatingwithratingValue,ratingCount,bestRating5 andworstRating1), if the product has ratingsreview(ReviewwithreviewRating,authorandreviewBody) for each rating shown on the pageoffers(Offer): one offer for a product without variants, one offer per variant otherwise. An offer can containsku,availability(InStock,OutOfStockorPreOrder, if the availability is displayed on the product detail),url,price,priceCurrencyandpriceValidUntil(if prices are displayed),itemCondition(NewCondition),warrantyandshippingDetails(OfferShippingDetailswith the shipping label, rate, destination country and delivery time). When a product has variants, only the first offer containsshippingDetails; the others refer to it withitemref.
The product detail form also contains the hidden inputs productId and priceId, which you need when adding a product to the cart with JavaScript.
Breadcrumbs
The breadcrumb navigation is a BreadcrumbList. Each item is a ListItem with item, name and position; the last item (the current page) has its URL in a meta element.
<div class="breadcrumbs" itemscope itemtype="https://schema.org/BreadcrumbList">
<span id="navigation-first" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a href="/" itemprop="item"><span itemprop="name">Home</span></a>
<meta itemprop="position" content="1" />
</span>
<!-- … -->
<span id="navigation-2" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<meta itemprop="item" content="https://classic.shoptet.cz/interier-a-bydleni/konferencni-stolek-aiko/" />
<meta itemprop="position" content="3" />
<span itemprop="name" data-title="Konferenční stolek AIKO">Konferenční stolek AIKO</span>
</span>
</div>
Other microdata and JSON-LD
- Search form – the element around the search form is a
WebSiteitem (withheadline,urland, if available,textfrom the page meta description). The form itself is itspotentialAction, aSearchActionwithtargetandquery-input. - Blog article detail – a
NewsArticlewithheadline,description,datePublished,dateModified,image,authorandpublisher. - Article (page) detail – an
Articlewithheadlineandabout. - Product discussion – each post is a
CommentwithdatePublished,name,authorandtext. - Contact box – the e-shop's contact details are rendered as one JSON-LD block of the type
Organization(name,url,logo,employee,email,telephone,sameAswith the social network links that are set to be displayed).
<script type="application/ld+json">
{
"@context" : "https://schema.org",
"@type" : "Organization",
"name" : "Classic",
"url" : "https://classic.shoptet.cz/",
"email" : "info@example.com",
"sameAs" : ["https://www.facebook.com/shoptet"]
}
</script>
Product listings
Product listings (for example the homepage, a category or search results) do not use microdata. The same basic data is available in HTML data attributes with the data-micro prefix instead:
data-micro="{property}"marks the element that holds the value (for exampledata-micro="name"on the element with the product name,data-micro="url"on the link with the product URL)data-micro-{property}="{value}"holds the value itself (for exampledata-micro-identifier,data-micro-image)
Property names follow Schema.org; names of more than one word are separated by a hyphen (priceCurrency → data-micro-price-currency).
<div class="p" data-micro="product" data-micro-product-id="394" data-micro-identifier="88d2a7da-2cdf-11f1-9e7a-bc24115b1301">
<a href="/interier-a-bydleni/konferencni-stolek-aiko/" class="image">
<img src="..." data-micro-image="https://cdn.myshoptet.com/usr/classic.shoptet.cz/user/shop/big/394_konferos-brutos-1.png?6a6b3723">
</a>
<a href="/interier-a-bydleni/konferencni-stolek-aiko/" class="name" data-micro="url">
<span data-micro="name">Konferenční stolek AIKO</span>
</a>
<div class="stars-wrapper" data-micro-rating-value="4.6" data-micro-rating-count="16">
...
</div>
<div class="prices" data-micro="offer"
data-micro-price="4899.00"
data-micro-price-currency="CZK"
data-micro-availability="https://schema.org/InStock">
...
</div>
<!-- etc. -->
</div>
Depending on the template and the e-shop settings, a product in a listing can also have data-micro="description" (the short description), data-micro="sku" (the product code), data-micro-warranty on the offer, and the rating attributes. The price attributes are present only when prices are displayed in the category, the availability only when availability is displayed in the category.
Microdata was removed from product listings in March 2020, see Nové řešení mikrodat ve výpisech produktů (in Czech). The 2nd generation template Echo still uses microdata in listings.
Other information available in data attributes
Some other elements also carry data attributes that are useful when editing templates.
Cart items
Each cart item has its GUID (data-micro-identifier) and product code, the SKU (data-micro-sku), in data attributes. They are available wherever cart items are listed: the cart, the cart widget and the order summary in the checkout.
<table class="cart-table">
<tbody>
<tr class="removeable"
data-micro="cartItem"
data-micro-identifier="88d2a7da-2cdf-11f1-9e7a-bc24115b1301"
data-micro-sku="293"
>
...
</tr>
</tbody>
</table>
Images of subcategories in the menu
If a subcategory has an image set in the administration, its item in the main menu has the image URL in the data-image attribute. This allows you to build visually richer menus.
<ul class="menu-level-2" role="menu">
<li class="menu-item-702" role="none">
<a href="/saty-a-sukne/" data-image="https://cdn.myshoptet.com/usr/step.shoptet.cz/user/categories/thumb/womens-patterned-dress-redfloral-hm-red-dresses_1.jpg" role="menuitem">
<span>Šaty a sukně</span>
</a>
</li>
...
</ul>
This applies to Techno, Tango, Waltz and Step. Classic, Disco and Samba display subcategory images in the menu themselves (as img elements in a.menu-image), so their menu links have no data-image attribute.