Automated Order Import Module for 1C-Bitrix from Excel/CSV/XML

Procurement managers process dozens of Excel files from suppliers daily. Manually transferring data into the Bitrix basket means losing up to 2 hours a day. Mistakes when copying articles lead to incorrect orders and returns. Typical scenario: a manager opens `price_123.xlsx`, copies articles into t

Our competencies:

Frequently Asked Questions

Procurement managers process dozens of Excel files from suppliers daily. Manually transferring data into the Bitrix basket means losing up to 2 hours a day. Mistakes when copying articles lead to incorrect orders and returns. Typical scenario: a manager opens price_123.xlsx, copies articles into the basket — and only at checkout notices that instead of article "AB-123" they copied "AB-123 " (with a trailing space). Product not found, order must be reworked. We developed a module that parses XLSX/CSV/XML and fills the basket in seconds. After installation, clients report up to 80% time savings for managers and a 70% reduction in returns. Investment in the module pays off in 2-3 months — lower operational costs are evident. For example, one client saved $2,500 monthly after switching to automated import.

How article search works

The article in Bitrix is stored in multiple places: the XML_ID field of the information block element, the ARTICLE property (if used), and the ARTICLE field in the b_catalog_product table. We search sequentially, with priority:

// 1. Search by b_catalog_product.ARTICLE $product = \Bitrix\Catalog\ProductTable::getList([ 'filter' => ['=ARTICLE' => $sku], 'select' => ['ID', 'ARTICLE'], ])->fetch(); // 2. If not found — search by XML_ID of the information block element if (!$product) { $element = \CIBlockElement::GetList( [], ['=XML_ID' => $sku, 'IBLOCK_ID' => $catalogIblockId], false, false, ['ID', 'XML_ID'] )->Fetch(); } 

This approach covers 95% of cases. If not found — status not_found. If multiple found with the same article — multiple. We log each case for audit.

Why preview is critical

Without preview, an error in the file (e.g., extra space in the article) can lead to an incorrect order. Our module, after parsing, shows the user a table with results: for each row — found product, quantity from file, status. Rows with errors are highlighted; the user can manually match the product from the catalog. This reduces defect rates significantly — in practice, after implementation, returns due to order errors dropped by 70%.

Only after user confirmation the data is sent to the basket.

How to set up column mapping

  1. Install the module and go to settings.
  2. Specify column numbers for article (e.g., column A) and quantity (column B).
  3. If the file has headers, enable the "Headers" option — the module will automatically recognize columns by names ("Article", "Qty", "Quantity").
  4. Save configuration. The upload form will now use your settings.

How upload errors are handled

All upload attempts are recorded in the b_orderimport_log table:

Field Type Purpose
ID int auto_increment
USER_ID int Who uploaded
FILE_NAME varchar(255) Original file name
ROWS_TOTAL int Rows in file
ROWS_FOUND int Found products
ROWS_ADDED int Added to basket
STATUS enum SUCCESS, PARTIAL, FAILED
CREATED_AT datetime

Logging statuses:

  • SUCCESS — all rows processed, order created.
  • PARTIAL — some products not found or error, but order created with found ones.
  • FAILED — critical error (invalid format, unable to parse).

Module structure

The module is registered in local/modules/vendor.orderimport/. Main components:

  • lib/FileParser/XlsxParser.php — XLSX parser
  • lib/FileParser/CsvParser.php — CSV parser
  • lib/ProductMatcher.php — product search by article
  • lib/CartFiller.php — basket filling
  • components/vendor/orderimport.form/ — upload form component

Basket filling

use Bitrix\Sale\Basket; use Bitrix\Sale\BasketItem; $basket = Sale\Basket::loadItemsForFUser(Sale\Fuser::getId(), SITE_ID); foreach ($confirmedItems as $item) { $basketItem = $basket->getExistsItem('catalog', $item['product_id']); if ($basketItem) { $basketItem->setField('QUANTITY', $basketItem->getQuantity() + $item['qty']); } else { $newItem = $basket->createItem('catalog', $item['product_id']); $newItem->setFields([ 'QUANTITY' => $item['qty'], 'PRODUCT_PROVIDER_CLASS' => \CCatalogProductProvider::class, 'LID' => SITE_ID, 'CURRENCY' => \Bitrix\Currency\CurrencyManager::getBaseCurrency(), ]); } } $basket->save(); 

Official Bitrix documentation on basket operations is available at dev.1c-bitrix.ru.

File template for download

On the upload page, a link to download a template is displayed — a ready XLSX file with column headers ("Article", "Quantity", "Note") and example data. The template is generated via PhpSpreadsheet on each request or served as a static file.

What is included in the work

We don't just write the module — we deliver a complete package: installation and configuration documentation, manager training, 30-day post-delivery support, and access to source code in your repository. Our experience: 5+ years in Bitrix development, 20+ successful data loading modules. 100% delivery guarantee and certification compliance. Contact us to discuss your scenario — we will evaluate the project in one business day. Get a free consultation on module integration.

Example file

Example contents of the XLSX template:

Article Quantity Note
AB-123 10 Urgent
CD-456 5 Regular
EF-789 2 No defects allowed

Development timelines

Scope Composition Timeline
Basic XLSX/CSV parsing, article search, basket adding 5–7 days
Standard + Preview, manual matching of unfound, file template 9–12 days
Extended + XML format, logging, multiple price columns, stock check 14–18 days

For accurate cost and timeline estimation, contact us — we'll consider all specifics of your catalog and integrations. Order the module today and reduce order processing time by 80%!