Setting up 1C-Bitrix marketplace commissions

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

Marketplace Commission Setup 1C-Bitrix

Marketplace commission is a percentage or fixed amount that the platform retains from each seller's sale. Rules can be simple (uniform % for all) or complex (depends on product category, seller turnover, delivery type). 1C-Bitrix has no built-in tools for this — custom implementation is required.

Commission Rules Structure

Commissions are best stored in a separate table (via HL-infoblock or custom table), not in b_option. This allows versioning rules and applying different rules to different sellers/categories.

Rules table structure:

Field Type Description
ID int
RULE_TYPE varchar global / category / vendor
VENDOR_ID int null = applies to all
CATEGORY_ID int Section ID in infoblock, null = all categories
RATE_TYPE varchar percent / fixed
RATE_VALUE decimal % or fixed amount
MIN_AMOUNT decimal Minimum commission
MAX_AMOUNT decimal Maximum commission (null = no limit)
ACTIVE_FROM date Effective start date
ACTIVE_TO date End date (null = indefinite)

Commission Calculation at Sub-Order Creation

Calculation occurs in OnAfterOrderAdd handler or in sub-order creation logic. Rule selection algorithm: first find individual rule for seller + category, then for seller, then for category, then global.

function calculateCommission(int $vendorId, int $categoryId, float $amount): float
{
    // Priority: vendor+category > vendor > category > global
    $rule = findRule($vendorId, $categoryId)
        ?? findRule($vendorId, null)
        ?? findRule(null, $categoryId)
        ?? findRule(null, null);

    if (!$rule) return 0.0;

    $commission = $rule['RATE_TYPE'] === 'percent'
        ? $amount * $rule['RATE_VALUE'] / 100
        : $rule['RATE_VALUE'];

    if ($rule['MIN_AMOUNT']) $commission = max($commission, $rule['MIN_AMOUNT']);
    if ($rule['MAX_AMOUNT']) $commission = min($commission, $rule['MAX_AMOUNT']);

    return round($commission, 2);
}

The calculated commission is recorded in financial operations table with type commission and linked to sub-order.

Administrative Interface for Managing Rules

A page in /bitrix/admin/ with CRUD interface for commission rules. List of rules with filtering by seller/category, create/edit form, date picker for periods.

Separate page — view accrued commissions for period grouped by seller, export to Excel for accounting.

Timeline

Basic implementation (one rate for all + by categories) — 1 week. Complex model (individual rates, progressive tariffs, promotional offers) — 2–3 weeks.