Setting Up YML Export in 1C-Bitrix
YML (Yandex Market Language) — XML format that long outgrew Yandex.Market. Used by price aggregators (Goods Mail.ru, Price.ru), CRM systems for catalog import, affiliate networks for product feeds. In 1C-Bitrix, YML generation — standard function of catalog module, but default settings enough only for simplest catalogs.
Basic Export Profile Setup
Shop → Settings → Export catalog → Add profile → Yandex.Market (YML). Parameters:
- Catalog infoblock — which infoblock to export from.
-
Price type — which price type goes to
<price>tag. One selected. - Currency — RUR, USD, EUR. If catalog has prices in multiple currencies, feed price converted to selected currency.
- Sections — can limit export to specific infoblock sections.
-
Export properties — which infoblock properties export as
<param>. -
Export file — path to result file, e.g.,
/upload/yml/feed.xml.
After saving — "Export" button. File generated and accessible by URL.
YML File Structure
Valid YML contains:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE yml_catalog SYSTEM "shops.dtd">
<yml_catalog date="2024-01-15 12:00">
<shop>
<name>Store Name</name>
<company>Legal Entity</company>
<url>https://site.ru</url>
<currencies>
<currency id="RUR" 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://site.ru/product/123/</url>
<price>79990</price>
<categoryId>2</categoryId>
<picture>https://site.ru/upload/photo.jpg</picture>
<name>Samsung Galaxy S24 Smartphone</name>
<vendor>Samsung</vendor>
<param name="Memory">256 GB</param>
</offer>
</offers>
</shop>
</yml_catalog>
<categories> formed from infoblock sections. <offers> — from elements. Link via <categoryId> → section id.
What Standard Profile Does Wrong
1. Trade offers. If product has SKUs (infoblock trade offers), standard profile generates <offer> for each offer. But takes <name> from offer, not main product. Result: instead of "Nike Air Max Shoes" — "Nike Air Max Shoes — White, 42". For Yandex.Market normal, for price aggregator — no.
2. Multiple photos. Standard export takes DETAIL_PICTURE as main photo. Additional photos from multiple property (e.g., MORE_PHOTO) need explicit addition in profile settings. Each photo — separate <picture> tag.
3. Filtering. No filter "only products with inventory > 0". All active elements exported. To hide products without inventory — either deactivate them (breaks SEO), or modify profile.
4. Special characters. Characters &, <, > in description break XML. Standard profile escapes them, but if infoblock properties contain "raw" HTML — feed may become invalid. Check via xmllint or online YML validator.
Profile Modification
Handler file: /bitrix/modules/catalog/load/yandex_run.php. Don't edit directly — lost on update. Copy to /bitrix/php_interface/include/catalog_export/ under new name and register as custom profile.
Common modifications:
-
Inventory filter. Add to
arFiltercondition>CATALOG_QUANTITY=> 0 or check viaCCatalogStoreProductfor multi-warehouse. -
Custom
<name>format. Form title as "Brand + Model + Key property" instead of standardNAME. -
<oldprice>for discounts. Standard profile doesn't export strikethrough price. Add<oldprice>tag, substitute value from another price type (e.g., "Retail before discount"). -
<delivery-options>. Tag for Yandex.Market with delivery conditions. Not generated by standard profile. -
<sales_notes>. Note for buyer (minimum order amount, conditions). Up to 50 characters.
Automatic Generation
Cron task for periodic feed update:
*/30 * * * * /usr/bin/php /var/www/bitrix/modules/catalog/load/yandex_run.php PROFILE_ID
Or via Bitrix agent in profile settings — "Periodic export" option. Agent runs via cron_events.php. Interval — 30–60 minutes for most stores.
For catalogs 50,000+ products, YML generation can take 3–5 minutes. Ensure max_execution_time in PHP sufficient, or use step-by-step generation (split into N elements per iteration).
| Task | Time |
|---|---|
| Basic setup of standard profile | 30 min |
| Custom profile with filtering and additional tags | 3–5 h |
| Profile + cron + validity monitoring | 1 day |







