Setting up price export from 1C to 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

Setting up price export from 1C to 1C-Bitrix

Prices are transmitted from 1C to Bitrix as part of the offers.xml file in standard CommerceML exchange. Each SKU contains a <Цены> block with one or more price types. In Bitrix, each price type from 1C corresponds to a price type in b_catalog_price_type and an entry in b_catalog_price.

Price types in Bitrix

In Bitrix you can configure multiple price types: retail, wholesale, dealer, purchase. Table b_catalog_price_type stores types, b_catalog_price — specific prices for each SKU by each type.

When exchanging with 1C, it's important that price type names in 1C match the symbolic codes or names of price types in Bitrix — otherwise prices won't be matched. Correspondence is configured in Catalog → 1C Exchange Settings → Price Types.

Separate price synchronization

Full catalog exchange is a heavy operation. With frequent price changes (promotions, dynamic pricing) a lighter mechanism is needed.

Via lightweight XML. 1C forms prices.xml with prices only (without product data):

<КоммерческаяИнформация>
  <ПакетПредложений>
    <Предложения>
      <Предложение>
        <Ид>GUID-sku</Ид>
        <Цены>
          <Цена>
            <ИдТипаЦены>Retail</ИдТипаЦены>
            <ЦенаЗаЕдиницу>1250.00</ЦенаЗаЕдиницу>
            <Валюта>RUB</Валюта>
          </Цена>
        </Цены>
      </Предложение>
    </Предложения>
  </ПакетПредложений>
</КоммерческаяИнформация>

Handler on Bitrix side parses XML and updates b_catalog_price by SKU XML_ID.

Updating price in Bitrix:

$priceData = CCatalogProduct::GetByID($productId);
CCatalogProduct::SetPrice($productId, $priceTypeId, $price, $currency);
// or directly:
CCatalogPrice::Update($priceId, ['PRICE' => $price, 'CURRENCY' => 'RUB']);

Old price and promotional price

Bitrix has field CATALOG_PRICE_OLD (old price for displaying struck-through). If 1C has two price types — "base" and "promotional" — map:

  • Promotional → main price type in Bitrix (BASE)
  • Base → old price field (b_iblock_element_prop with code OLD_PRICE or via price type)

Another option — create special price type "Old Price" in Bitrix and display it in template as struck-through.

Currencies

Bitrix supports multi-currency prices. Field CURRENCY in b_catalog_price stores currency code. When exchanging with 1C, prices are transmitted in currency specified in 1C. Conversion to other currencies — via rates in b_currency_rate, configured in Shop → Currencies.

If 1C transmits prices in USD and we show in RUB — make sure rate is current. Rate can be updated automatically via Central Bank: module currency has built-in agent for updating.

Group prices and discounts

If site has group prices (B2B clients have different price), in Bitrix they're implemented via price type + user group: in b_catalog_group is configured, which price type available for which group. 1C transmits multiple price types simultaneously, Bitrix shows customer the one matching their group.