Setting up a feed for Yandex.Market (product advertising) in 1C-Bitrix

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1175
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Configuring a Feed for Yandex Market (Product Advertising) in 1C-Bitrix

Yandex Market accepts feeds in YML format (Yandex Market Language) — XML with its own schema. Bitrix has a built-in YML export module, but for product advertising (Performance), the data completeness requirements are higher than for a simple listing. An incomplete feed means some products are excluded from advertising, and Google Shopping-style campaigns perform worse due to missing attributes.

YML Format for Yandex Market

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE yml_catalog SYSTEM "shops.dtd">
<yml_catalog date="2024-01-15 10:00">
  <shop>
    <name>Store Name</name>
    <company>Company LLC</company>
    <url>https://your-site.com</url>
    <currencies>
      <currency id="USD" rate="1"/>
    </currencies>
    <categories>
      <category id="1">Electronics</category>
      <category id="2" parentId="1">Smartphones</category>
    </categories>
    <offers>
      <offer id="123" available="true">
        <url>https://your-site.com/catalog/product-123/</url>
        <price>14990</price>
        <oldprice>17990</oldprice>
        <currencyId>USD</currencyId>
        <categoryId>2</categoryId>
        <picture>https://your-site.com/upload/img/product-123.jpg</picture>
        <name>BrandName Model X 128GB Smartphone</name>
        <vendor>BrandName</vendor>
        <vendorCode>MODEL-X-128</vendorCode>
        <barcode>4607086560001</barcode>
        <description>Product description</description>
        <sales_notes>Free shipping on orders over $50, free in-store pickup</sales_notes>
        <param name="Storage">128 GB</param>
        <param name="Color">Black</param>
        <param name="Warranty">12 months</param>
      </offer>
    </offers>
  </shop>
</yml_catalog>

Built-in Bitrix YML Export

In the admin panel: Catalog → Export → Add Profile → Yandex Market (YML).

Profile settings:

  • Select the catalog infoblock
  • Property mapping: BRAND → vendor, ARTICLE → vendorCode, BARCODE → barcode
  • Filter: active products with non-zero stock only
  • File path: /upload/yandex_market.yml

The standard export cannot correctly export <param> tags from infoblock properties without customization. Product parameters (Storage, Color, Size) are critical for product advertising — Yandex uses them to match search queries.

Export Customization: Adding <param> from Properties

// /local/php_interface/init.php — hook on offer XML row generation
\Bitrix\Main\EventManager::getInstance()->addEventHandler(
    'catalog',
    'OnGetYmlOfferXml',
    function (\Bitrix\Main\Event $event) {
        $offer = $event->getParameter('OFFER');
        $xml   = $event->getParameter('XML');

        // Add parameters from infoblock properties
        $paramProps = ['COLOR' => 'Color', 'MEMORY' => 'Storage', 'SCREEN_SIZE' => 'Screen diagonal'];
        foreach ($paramProps as $propCode => $paramName) {
            if (!empty($offer['PROPERTIES'][$propCode]['VALUE'])) {
                $xml .= sprintf(
                    '<param name="%s">%s</param>',
                    htmlspecialchars($paramName),
                    htmlspecialchars($offer['PROPERTIES'][$propCode]['VALUE'])
                );
            }
        }

        return new \Bitrix\Main\EventResult(
            \Bitrix\Main\EventResult::SUCCESS,
            ['XML' => $xml]
        );
    }
);

Custom YML Feed Generator

If the standard export is insufficient — a fully custom generator:

// /local/cron/yandex_market_feed.php

$categories = getIblockSections($IBLOCK_ID);
$tmpFile = tempnam(sys_get_temp_dir(), 'yml_');
$xml = new XMLWriter();
$xml->openUri($tmpFile);
$xml->startDocument('1.0', 'UTF-8');
// ... generate yml_catalog structure

For large catalogs (>50K products), use XMLWriter with streaming output — do not accumulate a DOM in memory.

Common Feed Upload Errors

  • Invalid date format in yml_catalog — the date must be in YYYY-MM-DD HH:MM format
  • Duplicate offer ID — when trade offers and base products are exported with identical IDs
  • Invalid XML character — ampersand & in a name is not escaped (&amp;)
  • Missing required tag price — products without a price are not exported; Yandex rejects them

Setup Timeline

Setting up the standard Bitrix YML profile with property mapping and adding <param> via hooks — 4–8 hours. A custom generator for a complex catalog with trade offers and parameters — 1–2 business days.