Setting up product uploads to 1C-Bitrix price lists

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

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:

  1. In export profile enable "Export file" — specify path, e.g., /upload/pricelist/price_opt.csv.
  2. Add cron task: */30 * * * * php /var/www/bitrix/modules/catalog/load/cat_o_csv.php PROFILE_ID — update every 30 minutes.
  3. Alternative — Bitrix agent: CCatalog::PreGenerateXML(PROFILE_ID). Works via cron_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.