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.







