Configuring Multi-Warehouse Setup in 1C-Bitrix
When a store has multiple storage points — central warehouse, regional warehouses, retail points — and needs to show customer product availability at each or auto-select warehouse for shipment, single warehouse is insufficient. Multi-warehouse in Bitrix — part of catalog module, requires license not lower than "Small Business".
Enabling Multi-Warehouse
Shop → Catalog → Settings → "Warehouse" Tab:
- Use warehouses — enable
- Create minimum two warehouses (
Shop → Catalog → Warehouses)
After enabling, stock stored in b_catalog_store_product partitioned by STORE_ID. Table contains: PRODUCT_ID, STORE_ID, AMOUNT (stock), QUANTITY_RESERVED.
Setting Up Shipment Warehouses in Orders
In delivery service settings (Shop → Settings → Delivery Services → [edit]) specify warehouse for shipment. This allows different services to work with different warehouses.
For more flexible control — warehouse selection rules configured via OnSaleOrderBeforeSaved event handler:
AddEventHandler('sale', 'OnSaleOrderBeforeSaved', function(\Bitrix\Main\Event $event) {
$order = $event->getParameter('ENTITY');
// logic for warehouse selection based on order composition, region etc.
});
Displaying Stock by Warehouses on Public Part
In catalog.element component (bitrix:catalog.element) parameter USE_STORE_QUANTITY — enable warehouse stock display. Component template receives $arResult['STORE_QUANTITY'] variable — array of stock by each warehouse.
For output use helper method:
$storeData = \Bitrix\Catalog\StoreProductTable::getList([
'filter' => ['=PRODUCT_ID' => $productId],
'select' => ['STORE_ID', 'AMOUNT', 'STORE_TITLE' => 'STORE.TITLE'],
'runtime' => [
new \Bitrix\Main\ORM\Fields\Relations\Reference(
'STORE', \Bitrix\Catalog\StoreTable::class,
\Bitrix\Main\ORM\Query\Join::on('this.STORE_ID', 'ref.ID')
)
]
]);
Reservation in Multi-Warehouse
Reserves in b_sale_order_reserve contain STORE_ID field — reserve tied to specific warehouse. On auto-reservation Bitrix selects warehouse by priority (field SORT in b_catalog_store). If first warehouse lacks sufficient quantity — by default doesn't split order across warehouses: requires custom logic.
Stock Synchronization with 1C
On 1C exchange via CommerceML 2, stock transmitted in <Warehouses> section of exchange file. XML_ID of warehouses in Bitrix must match warehouse IDs in 1C. Warehouse mapping configured in /bitrix/admin/1c_exchange.php.
Execution Timeline
Setting multi-warehouse with two-three warehouses, shipment rules and display on site — 4–8 hours. Custom warehouse selection logic and 1C integration — 1–2 working days.







