Setting up 1C-Bitrix price types

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
    1173
  • 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
    745
  • 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 Price Types in 1C-Bitrix

Price types in 1C-Bitrix are a mechanism for displaying different prices to different user groups. Retail prices for regular buyers, wholesale prices for registered dealers, and special prices for VIP clients — all of this is implemented via price types in conjunction with user groups.

Data Structure

Price types are stored in b_catalog_price_type. Prices for specific products are stored in b_catalog_price, where each row contains CATALOG_ID (the catalog info block ID), PRODUCT_ID, CATALOG_PRICE_TYPE_ID, PRICE, and CURRENCY.

Creating a Price Type

"Store → Catalog → Price Types → Add":

  • Name — technical and public names
  • Symbol code — used in code (BASE, WHOLESALE, DEALER)
  • Sort order — affects order in the price list
  • Currency — default currency for this type

Binding to user groups: "Store → Catalog → Price Types → [type] → Groups". Specify which group sees this type. A user may belong to multiple groups — the type with the highest priority is applied.

Programmatic Management

// Creating a price type
$priceType = \CCatalogPriceType::GetByID('WHOLESALE');
if (!$priceType) {
    \CCatalogPriceType::Add([
        'NAME'      => 'Wholesale',
        'CODE'      => 'WHOLESALE',
        'SORT'      => 100,
        'BASE'      => 'N',
        'CURRENCY'  => 'USD',
    ]);
}

// Setting a price for a product
\CCatalogProduct::SetPrice($productId, $priceTypeId, 1500.00, 'USD');

// Getting the price for the current user
$price = \CCatalogProduct::GetOptimalPrice($productId);
// Returns the lowest price available to the user among their accessible price types

BASE Price

One price type must have the BASE = Y flag. This is the base price — discounts are calculated from it. If a product has no price of the required type for the user, Bitrix returns the BASE price. Do not delete the BASE type or create multiple entries with BASE = Y — the behavior becomes unpredictable.

Importing Prices via CSV/XML

When importing from 1C or an Excel price list, prices of different types are passed as separate columns. In the import settings, each column is mapped to a price type. Prices cannot be set via CIBlockElement::SetPropertyValues — only through CCatalogProduct::SetPrice or the D7 API:

\Bitrix\Catalog\PriceTable::add([
    'PRODUCT_ID'            => $productId,
    'CATALOG_GROUP_ID'      => $priceTypeId,
    'PRICE'                 => 2500.00,
    'CURRENCY'              => 'USD',
    'QUANTITY_FROM'         => null,
    'QUANTITY_TO'           => null,
]);

Timeline

Creating and configuring 2–3 price types with group bindings — 2–4 hours. Configuring a price list import with multiple price types — 4–8 hours.