Setting Up Product Export to Price Lists in 1C-Bitrix
Wholesale customers, procurement managers, partners — everyone needs price list. Not website catalog page, but file: CSV, Excel or XML, that can be opened without browser, loaded into own accounting system, compared with competitors. In 1C-Bitrix, price list export — catalog.export module with export profiles. Standard profiles cover basic scenarios, but for real tasks almost always need modifications.
Standard Export Profiles
catalog module from box offers several profiles: Shop → Settings → Export catalog. Each profile — PHP file in /bitrix/modules/catalog/load/.
-
CSV (
cat_o_csv.php) — CSV export. Separator, field set, encoding configured. Suitable for Excel, Google Sheets, 1C import. -
Yandex.Market (YML) (
yandex_run.php) — XML in YML format. Formally for Yandex, but used as universal product feed. - CommerceML — XML for exchange with 1C. Heavy format, not for price lists.
Profile setup: select catalog infoblock, price type (retail, wholesale, partner), export properties, section filter. Result — file accessible by URL or saved to disk.
CSV Price: What to Configure
CSV — simplest format, but devil is in details:
Column set. By default standard fields exported: ID, title, price, section. For complete price list need: article, brand, availability (inventory), unit, description, photo link. Each field — infoblock property, which needs to be added to export settings.
Price type. Critical for B2B. In Bitrix you can create multiple price types (b_catalog_group): retail, wholesale, dealer. Price list for each customer group formed from own price type. One export profile = one price type. For three customer groups — three profiles.
Encoding. UTF-8 for web systems, Windows-1251 for 1C and old Excel versions. Configured in export parameters.
Inventory. Standard CSV export doesn't export warehouse inventory. For this need modification: connect CCatalogStoreProduct::GetList() in export handler and add columns with inventory for each warehouse.
Custom Export Handler
For non-standard requirements create custom handler — PHP file in /bitrix/php_interface/include/catalog_export/. File must contain two functions: profile settings and export itself.
Typical modifications:
- Excel format (XLSX). Standard export can't generate XLSX. Connect PhpSpreadsheet library via Composer. Handler forms file with formatting: header with logo, frozen row, auto-width columns.
- Filtering by properties. Export only products with inventory > 0, only specific brand, only with discount.
- Multiple price types in one file. Columns: "Retail", "Wholesale from 10 pcs", "Dealer". Each pulled from own price type.
- Trade offers in rows. If product has SKUs (size, color), each offer — separate row with variant specified.
Automatic Generation via Cron
Price list should update automatically. Setup:
- In export profile enable "Export file" — specify path, e.g.,
/upload/pricelist/price_opt.csv. - Add cron task:
*/30 * * * * php /var/www/bitrix/modules/catalog/load/cat_o_csv.php PROFILE_ID— update every 30 minutes. - Alternative — Bitrix agent:
CCatalog::PreGenerateXML(PROFILE_ID). Works viacron_events.php.
For heavy catalogs (50,000+ products) CSV generation takes seconds, Excel — tens of seconds. YML for same volume — minutes. Account for this when choosing cron interval.
| Format | 1000 products | 10,000 products | 50,000 products |
|---|---|---|---|
| CSV | < 1 sec | 2–5 sec | 10–20 sec |
| XLSX | 2–5 sec | 15–30 sec | 1–3 min |
| YML (XML) | 1–3 sec | 10–30 sec | 1–5 min |
Price List Access
File lies in /upload/pricelist/ — public directory. Options for access restriction:
- Direct link — for partners, send URL manually.
-
Authorization — close directory via
.htaccess(Basic Auth) or generate file to closed folder with delivery via PHP script checking Bitrix user authorization. -
Token in URL —
/upload/pricelist/price_opt.csv?token=abc123. PHP wrapper checks token, delivers file. Token bound to counterparty.







