Typical situation: a wholesale buyer sends a list of 50–200 SKUs in Excel, expecting the site to allow one-click upload. But a standard Bitrix store cannot handle multiple price types automatically linked to user groups, and it does not upload files directly into the cart. The result — manual entry of items, errors, and lost time. Over 10+ years we have developed more than 50 solutions that turn a site into a full-fledged B2B tool: integration with 1C, custom REST endpoints for stock and credit limits, flexible pricing and document systems. Contact us — we will evaluate your project within 2 days. Typical project cost starts from 150,000 ₽, and average ROI reaches 200% within first year.
What are the key features of a B2B wholesale portal?
B2B Catalog: Price Types and Wholesale Rules
The foundation of a B2B catalog is multiple price types. In the b_catalog_group table, price groups are created:
| Price Type | For Whom |
|---|---|
| Retail | Unauthorized users |
| Small wholesale | Dealers category C |
| Medium wholesale | Dealers category B |
| Large wholesale | Dealers category A |
| Special | Key clients |
Each price type is linked to a user group via the catalog module settings. An authorized dealer sees only their price column. Additionally, at the product level, minimum lot, order multiplicity, and unit of measurement are configured — these are infoblock properties controlled in the cart.
Setting Up Multiple Price Types for Dealers
We connect several price types through the standard functionality "Trade Catalog" → "Price Types" → "Buyer Groups". For each type, we create a display rule: the price is shown only to the groups it is linked to. If a dealer needs a volume discount, we add cart rules with conditions on order amount. This allows threshold discounts without additional code.
Dealer Authorization and Access Segregation
Dealer registration is not self-service but by request. The scheme:
- On the site — a request form: TIN, company name, contact person, sphere of activity, estimated purchase volume.
- The request goes to CRM or admin panel (section "Users" → "Registration Requests").
- The manager checks the counterparty, creates an account, and assigns a group (small/medium/large wholesale).
- The dealer gets access to a personal account and sees the catalog with their prices.
Segregation of assortment (not just prices) is implemented through access rights setup to infoblock sections. For example, the "Large Wholesale" group sees the "Exclusive Collections" section that is inaccessible to small dealers.
Dealer Personal Account Contents
The personal account goes far beyond the standard sale.personal.section. Key sections:
- Order history — with filtering by date, status, amount. Repeat order in one click.
- Invoices — PDF documents generated by the sale module or transferred from 1C.
- Reconciliation statements — files uploaded by the manager or generated automatically from 1C.
- Waybills and universal transfer documents — linked to orders, available for download.
- Credit limit — display of the current limit, used amount, and available balance.
- Payment deferral — information about terms and conditions.
Documents are stored in a Highload-block Documents: document type, number, date, file, link to order and counterparty. This is part of Bitrix document management. Upload from 1C — via REST API on a schedule. PDF invoices generated on the Bitrix side — via the mPDF or TCPDF library, connected in the OnSaleOrderSaved event handler. The invoice template includes company details, item table, totals, and a QR code for payment.
How to set up dealer credit limits?
Integration with 1C: CommerceML + REST
Exchange with 1C is the core of a wholesale site. Two channels:
CommerceML (standard exchange):
- Nomenclature → product infoblock.
- Prices by type →
b_catalog_price. - Stock by warehouses →
b_catalog_store_product. - Orders: Bitrix → 1C (export) and back (statuses, shipments).
REST API (for operational data):
- Actual stock — request to 1C when opening a product card (with caching for 5–10 minutes).
- Counterparty credit limit — request at login and when placing an order.
- Documents — export of new invoices and statements on a schedule.
More about CommerceML can be found at CommerceML.
B2B Cart with Excel Upload and Price Types
The standard Bitrix cart is designed for a retail buyer: selected a product, clicked "Add to Cart", proceed to checkout. In a B2B scenario, the buyer works differently. They come with a ready list of 50–200 items and want to upload it in one action — upload via Excel is 10 times faster than manual entry.
Quick Order by Article
On the "Quick Order" page — a text field where pairs "article — quantity" are entered, one per line:
ART-001 24
ART-002 48
ART-003 12
When submitted, the server handler parses the lines, looks up products by the ARTICLE property in the infoblock (via CIBlockElement::GetList with a filter), checks availability, and adds to the cart via \Bitrix\Sale\Basket::addItem(). If an article is not found — the line is highlighted in red with an explanation.
Example of quick order handler
// Parsing lines
$lines = explode("\n", $_POST['items']);
$basket = \Bitrix\Sale\Basket::loadItemsForFUser(\Bitrix\Sale\Fuser::getId(), SITE_ID);
foreach ($lines as $line) {
list($art, $qty) = explode(' ', trim($line));
$res = CIBlockElement::GetList([], ['PROPERTY_ARTICLE' => $art], false, false, ['ID']);
if ($el = $res->Fetch()) {
$item = $basket->createItem('catalog', $el['ID']);
$item->setField('QUANTITY', (int)$qty);
}
}
$basket->save();
Excel File Upload
A more advanced option — upload XLS/XLSX. Server-side handler:
- File reception — via standard Bitrix upload (
CFile::SaveFile). - Parsing — PhpSpreadsheet library (installed via Composer). Expected format: column A — article, column B — quantity. First row — header (skipped).
- Validation — check each line: article existence, product availability for the user group, compliance with minimum lot and multiplicity.
- Result generation — table with columns:
| Article | Name | Requested | Adjusted | Stock | Price | Total | Status |
|---|---|---|---|---|---|---|---|
| ART-001 | Product A | 24 | 24 | 150 | — | — | OK |
| ART-002 | Product B | 48 | 48 | 30 | — | — | Partial (stock 30) |
| ART-999 | — | 12 | — | — | — | — | Not found |
- Confirmation — the user sees the result, adjusts quantities, confirms adding to cart.
Handling Price Types in the Cart
When adding a product to the cart, the price is determined automatically based on the user group. The logic:
- Determine the authorized user's group (
CUser::GetUserGroupArray()). - By group, determine the available price type (
CCatalogGroup::GetGroupsList()). - From
b_catalog_price, retrieve the price for the product by the required type. - If quantity discounts are configured for the product (module "Cart Rules" —
sale.discount), they are applied during recalculation.
Additional logic — threshold discounts: when the order amount exceeds a certain threshold, an additional discount is automatically applied. Configured via cart rules with the condition "Cart amount greater than N".
Credit Limit Check
At the order placement stage, the counterparty's credit limit is checked. Data is taken from 1C via REST API. If the order amount exceeds the available limit — a warning is displayed, but the order can still be submitted (at the manager's discretion). Implementation — handler for the OnSaleOrderBeforeSaved event, which makes a request to 1C and writes the result into an order property.
Deliverables
When developing a wholesale site, we provide:
- Technical specification describing the logic of price types and rights.
- Configured exchange with 1C (CommerceML + REST).
- Dealer personal account with documents.
- Cart with Excel and quick order support.
- Integration with payment systems and delivery services.
- Source code and server access.
- Administrator guide and employee training.
- 3 months of warranty support after launch.
Savings on order processing can reach 500,000 ₽ per year, and average payback period is 4–6 months.
Technical Summary
| Component | Solution |
|---|---|
| Catalog | bitrix:catalog with facet index |
| Filtering | bitrix:catalog.smart.filter + AJAX |
| Cart | Custom component with Excel support |
| Integration | CommerceML (catalog) + REST API (stock, limits) |
| Documents | Highload-block + mPDF |
| Access rights setup | User groups → price types + infoblock sections |
A wholesale site on Bitrix is primarily a backend: 1C and Bitrix REST API, price types, rights, document management. The frontend is secondary — the interface should be functional and fast, not flashy. Order development — get a tool that really saves your dealers' time. Typical project cost starts from 150,000 ₽, with average ROI of 200% within first year. Contact us for a consultation on your project.







