Schema.org Microdata Setup for Bitrix CMS
Schema.org microdata — a set of vocabularies that help search engines understand page content type: product, review, organization, breadcrumbs. Google and Yandex use this data to form rich snippets: product price and rating directly in search results, star ratings, availability information.
Markup Formats
Schema.org supports three formats:
-
JSON-LD — recommended by Google.
<script type="application/ld+json">block in<head>or<body>. Not bound to page HTML structure. -
Microdata — attributes
itemscope,itemtype,itempropdirectly in HTML. - RDFa — similar to Microdata, different syntax.
Preferred approach for Bitrix — JSON-LD, easier to add without component template reworking.
Product Markup
In bitrix:catalog.element component template, add JSON-LD block:
$price = $arResult['CATALOG_PRICE_1']['PRICE'] ?? 0;
$availability = ($arResult['CATALOG_QUANTITY'] > 0)
? 'https://schema.org/InStock'
: 'https://schema.org/OutOfStock';
$schema = [
'@context' => 'https://schema.org',
'@type' => 'Product',
'name' => $arResult['NAME'],
'image' => $arResult['DETAIL_PICTURE']['SRC'] ?? '',
'sku' => $arResult['PROPERTIES']['ARTICLE']['VALUE'] ?? $arResult['ID'],
'brand' => [
'@type' => 'Brand',
'name' => $arResult['PROPERTIES']['BRAND']['VALUE'] ?? '',
],
'offers' => [
'@type' => 'Offer',
'priceCurrency' => 'USD',
'price' => $price,
'availability' => $availability,
'url' => SITE_DIR . $arResult['DETAIL_PAGE_URL'],
],
];
?>
<script type="application/ld+json">
<?= json_encode($schema, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT) ?>
</script>
Rating and Review Markup
If site has review system with ratings, add to Product block aggregateRating and review fields:
$schema['aggregateRating'] = [
'@type' => 'AggregateRating',
'ratingValue' => $avgRating, // average rating, float
'reviewCount' => $reviewCount, // review count
'bestRating' => '5',
'worstRating' => '1',
];
Google shows star ratings in snippet only with at least one review with rating.
Breadcrumb Markup (BreadcrumbList)
$breadcrumbs = $APPLICATION->GetNavChain(); // breadcrumb array
$items = [];
$position = 1;
foreach ($breadcrumbs as $crumb) {
$items[] = [
'@type' => 'ListItem',
'position' => $position++,
'name' => $crumb['TITLE'],
'item' => 'https://your-site.ru' . $crumb['LINK'],
];
}
$schema = [
'@context' => 'https://schema.org',
'@type' => 'BreadcrumbList',
'itemListElement' => $items,
];
Organization Markup
On homepage and "About" page, place Organization or LocalBusiness markup:
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Company Name",
"url": "https://your-site.ru",
"telephone": "+1-800-555-35-35",
"address": {
"@type": "PostalAddress",
"addressLocality": "New York",
"streetAddress": "Main Street, 1"
}
}
Markup Validation
After implementation — verify via:
-
Google Rich Results Test:
search.google.com/test/rich-results -
Yandex Validator:
webmaster.yandex.ru/tools/microtest
Both tools show recognized markup and structure errors.
Implementation Timeline
Adding Schema.org markup for product, breadcrumbs, and organization — 3–5 hours.







