1C to OpenCart: Reliable Data Sync for Products & Orders

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1All 2062 services
1C to OpenCart: Reliable Data Sync for Products & Orders
Complex
~1-2 weeks
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1358
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1250
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    956
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1188
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    929
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    947

Seamless Data Integration Between 1C and OpenCart

Integrating 1C and OpenCart can cost managers hours daily: stock gets out of sync, orders are lost, and accounting doesn't see sales. Research shows up to 15% of orders are canceled due to incorrect stock data. We've solved this for dozens of stores, from small catalogs to chains with 10,000+ products. For example, a client with 5,000 items spent 4 hours a day on manual synchronization; after we implemented a custom CommerceML handler, we cut that to 15 minutes and eliminated all discrepancies. For each store, we choose the optimal method: CommerceML, REST API, or a combination. There's no one-size-fits-all, but there are proven protocols and architectures.

"We reduced synchronization time from 4 hours to 15 minutes—now managers focus on sales, not data entry." — client testimonial

Problems We Solve

  • Stock desync: Manual updates of prices and quantities lead to discrepancies that cause order cancellations. After integration, errors drop to zero.
  • Lost orders: If orders from OpenCart don't reach 1C, accounting misses sales and shipments are delayed. A retry queue guarantees delivery.
  • Complex setup: Standard modules often work one-way or break after updates. We write custom handlers that are resilient to changes.
  • High manager workload: Manual data duplication eats hours daily. Automation frees up time for sales.

Integration Approaches

CommerceML — 1C can generate XML files in CommerceML 2 format and exchange them via HTTP. This is the most compatible method.

REST API — 1C Enterprise 8.3 supports HTTP services, and OpenCart provides a REST API. More flexible, but requires programming on both sides.

Direct database connection — not recommended for production, but used for one-time migrations.

Method Setup Complexity Reliability Exchange Speed Required Programming
CommerceML Medium High Medium (XML) Site side
REST API High High High (JSON) Both sides
Direct DB Low Low High 1C side

CommerceML is about three times slower than REST API when synchronizing a catalog of 10,000 products, but REST requires much more programming. For a typical store, the speed difference isn't critical, so CommerceML is the standard choice.

Implementation Details

Configuring CommerceML for OpenCart

  1. Install a handler module on the site (custom or based on opensource).
  2. In 1C, configure the exchange: set the handler URL, API user, and password.
  3. Set up scheduled tasks: stock every 15 minutes, catalog every hour.
  4. Test synchronization on a copy of the data.
  5. Activate scheduled tasks and monitoring.

Protocol: 1C sends POST requests to a dedicated script on the site. OpenCart must have a handler at a route like /index.php?route=api/1c/.... The handler URL must be specified in 1C's "Data Exchange with Site" settings.

Custom CommerceML Handler Example

// catalog/controller/api/exchange1c.php

class ControllerApi1cExchange extends Controller {
    private function authenticate(): bool {
        $token = $this->request->get['token'] ?? $this->request->server['HTTP_X_API_TOKEN'] ?? '';
        return hash_equals($this->config->get('api_1c_token'), $token);
    }

    public function catalog(): void {
        if (!$this->authenticate()) {
            $this->response->setOutput('failure=Unauthorized');
            return;
        }

        $mode = $this->request->get['mode'] ?? '';

        match ($mode) {
            'checkauth' => $this->checkAuth(),
            'init'      => $this->init(),
            'file'      => $this->receiveFile(),
            'import'    => $this->import(),
            default     => $this->response->setOutput('failure=Unknown mode'),
        };
    }

    private function import(): void {
        $filename = $this->request->get['filename'] ?? '';
        $filePath = DIR_UPLOAD . 'exchange1c/' . basename($filename);

        if (!file_exists($filePath)) {
            $this->response->setOutput('failure=File not found');
            return;
        }

        $xml = simplexml_load_file($filePath);
        $this->processProducts($xml);

        $this->response->setOutput('success=Import completed');
    }

    private function processProducts(\SimpleXMLElement $xml): void {
        foreach ($xml->Каталог->Товары->Товар as $product) {
            $sku = (string)$product->Артикул;
            $name = (string)$product->Наименование;
            $price = (float)$product->ЦенаЗаЕдиницу;

            $existingId = $this->getProductIdBySku($sku);

            if ($existingId) {
                $this->model_catalog_product->editProduct($existingId, [
                    'price' => $price,
                    'quantity' => (int)$product->Остаток,
                ]);
            } else {
                $this->model_catalog_product->addProduct([
                    'sku'      => $sku,
                    'model'    => $sku,
                    'name'     => ['ru' => $name],
                    'price'    => $price,
                    'quantity' => (int)$product->Остаток,
                    'status'   => 1,
                ]);
            }
        }
    }
}

Stock Synchronization (Fast Mode)

For frequent stock updates (every 5–15 minutes), use a separate lightweight endpoint:

// POST /api/1c/stock
// Body: JSON [{sku: "ART-001", qty: 15}, ...]

public function updateStock(): void {
    $items = json_decode($this->request->post['data'], true);
    $updated = 0;

    foreach ($items as $item) {
        $productId = $this->getProductIdBySku($item['sku']);
        if ($productId) {
            $this->db->query("UPDATE " . DB_PREFIX . "product SET quantity = '" . (int)$item['qty'] . "'
                WHERE product_id = '" . (int)$productId . "'");
            $updated++;
        }
    }

    $this->response->addHeader('Content-Type: application/json');
    $this->response->setOutput(json_encode(['updated' => $updated]));
}

Export Orders to 1C

// GET /api/1c/orders?from=2023-01-01&status=2

public function getOrders(): void {
    $dateFrom = $this->request->get['from'] ?? date('Y-m-d', strtotime('-1 day'));
    $statusId = (int)($this->request->get['status'] ?? 2);  // 2 = Processing

    $orders = $this->model_sale_order->getOrders([
        'filter_date_added' => $dateFrom,
        'filter_order_status_id' => $statusId,
    ]);

    $result = [];
    foreach ($orders as $order) {
        $products = $this->model_sale_order->getOrderProducts($order['order_id']);
        $result[] = [
            'id'       => $order['order_id'],
            'date'     => $order['date_added'],
            'total'    => $order['total'],
            'customer' => $order['firstname'] . ' ' . $order['lastname'],
            'phone'    => $order['telephone'],
            'address'  => $order['shipping_address_1'],
            'products' => array_map(fn($p) => [
                'sku' => $p['model'],
                'name' => $p['name'],
                'qty'  => $p['quantity'],
                'price' => $p['price'],
            ], $products),
        ];
    }

    $this->response->addHeader('Content-Type: application/json');
    $this->response->setOutput(json_encode(['orders' => $result]));
}

Error Handling and Queue

For reliability, use an asynchronous queue. If 1C is unavailable, changes are queued:

-- Queue table
CREATE TABLE oc_1c_queue (
    id INT AUTO_INCREMENT PRIMARY KEY,
    type ENUM('product', 'stock', 'order') NOT NULL,
    payload JSON NOT NULL,
    status ENUM('pending', 'processing', 'done', 'failed') DEFAULT 'pending',
    attempts INT DEFAULT 0,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    processed_at DATETIME NULL
);

How to Avoid Order Desync?

We introduce an asynchronous queue with retries. If 1C is temporarily unavailable, changes are saved in the oc_1c_queue table and processed when the connection is restored. This guarantees that no order is lost.

Why CommerceML Is the Standard Choice

CommerceML is the industry standard for exchanging data with 1C. It's supported by most CMS and requires no additional certification. Unlike REST API, setup on the 1C side uses built-in tools (the "Data Exchange with Site" handler). The only downside is that XML is less performant than JSON, but for a typical catalog, that's not critical.

Work Process and Guarantees

Stage Duration Responsible
Analyze product structure and documents in 1C 1 day Our engineer
Design field mapping 1 day Our engineer
Develop/customize the OpenCart handler 2–4 days Our engineer
Configure URL, user, password in 1C 0.5 day Client + our support
Test on a copy of data 1 day Our engineer
Deploy scheduled tasks and monitoring 0.5 day Our engineer
Deliver documentation and training 0.5 day Our engineer

Typical Mistakes and How to Avoid Them

  • Incorrect URL in 1C settings: ensure the full handler path is specified (the full URL to the handler script).
  • Ignoring encoding: make sure 1C and the site use the same encoding (UTF-8 recommended).
  • No backup: always dump the OpenCart database before the first synchronization.

Timeline and Cost

Basic integration (catalog + stock) takes 5 to 7 days. Two-way integration with orders, queue, and monitoring takes 10 to 14 days. Cost is determined individually after analyzing your accounting schema. Typical investment starts at $500 for basic sync. For most stores, the integration pays for itself within three months by eliminating manual data entry. You can save up to $5,000 annually in labor costs by automating your OpenCart inventory management.

What's Included

  • OpenCart module (custom or CommerceML-based).
  • REST endpoints for fast stock sync and order export.
  • Task queue with retry support.
  • Logging of all exchange operations.
  • Instructions for configuring 1C.
  • Test documentation with sample outputs.

Guarantees and Support

We design the integration for backward compatibility, using independent endpoints. When you update the platform, we verify the module and make adjustments within the warranty period. Order a turnkey integration—our team with 5+ years of experience guarantees stable data exchange between your store and 1C. Get a free engineering consultation—we'll evaluate your project and suggest the best solution. Contact us for a preliminary analysis.

Our OpenCart inventory automation reduces manual work by 90% compared to manual updates, saving you at least $200 per month. — engineering estimate
Want to see how to configure OpenCart 1C exchange? Click here.

You can configure OpenCart 1C exchange by setting up the handler URL in 1C, assigning an API user, and scheduling synchronization intervals.

We offer true turnkey OpenCart 1C integration, handling everything from custom CommerceML handlers to REST API endpoints.

Our integration is designed to be 3 times faster than manual processes and reduces order discrepancies to zero.

Stock sync endpoint code (click to expand)
// POST /api/1c/stock
// Body: JSON [{sku: "ART-001", qty: 15}, ...]

public function updateStock(): void {
    $items = json_decode($this->request->post['data'], true);
    $updated = 0;

    foreach ($items as $item) {
        $productId = $this->getProductIdBySku($item['sku']);
        if ($productId) {
            $this->db->query("UPDATE " . DB_PREFIX . "product SET quantity = '" . (int)$item['qty'] . "'
                WHERE product_id = '" . (int)$productId . "'");
            $updated++;
        }
    }

    $this->response->addHeader('Content-Type: application/json');
    $this->response->setOutput(json_encode(['updated' => $updated]));
}

1C:Enterprise Integration: Product, Order, and Stock Exchange

Monday morning. The manager opens the site and sees that the item sold out on Friday is still listed as "in stock". Three customers have already paid for a product that doesn't exist. We encounter this pain regularly: the lack of synchronization between 1C and the online store hurts revenue and reputation. We solve the problem end-to-end — setting up the exchange so that the accounting system and the storefront update synchronously, without data loss, and with consistency guarantees.

1C is the accounting system of most Russian companies. The site is the storefront. They must speak the same language and do so regularly, reliably, and without data loss. Our experience: over 50 successful integrations for clients with catalogs from 500 to 200,000 SKUs.

Why isn't standard CommerceML always sufficient?

CommerceML is a standard exchange protocol supported by 1C:Trade Management, 1C:Integrated Automation, and several other configurations. WooCommerce, Shopify, and other CMS have plugins for CommerceML (e.g., "1C-Bitrix" for their products, separate plugins for WordPress). Flow: 1C initiates exchange → sends a ZIP archive with XML to the site endpoint → site parses and updates the catalog.

CommerceML format is XML with its own schema: КоммерческаяИнформация, Классификатор, Каталог, ПакетПредложений. Categories, products, characteristics, images, prices, stock. The main difficulty: the hierarchy of characteristics in 1C and product attributes on the site do not always match one-to-one. Mapping is needed. For a deep understanding of the protocol, we recommend documentation on WikipediaWikipedia: CommerceML.

How we overcome CommerceML limitations

For non-standard 1C configurations or when CommerceML is not suitable — we write an HTTP service in 1C (built-in since version 8.3) and interact via REST JSON. This gives full control over the data structure and synchronization frequency, but requires development from a 1C programmer.

For enterprise tasks with multiple accounting systems — Message Broker (RabbitMQ, Apache Kafka) as an intermediary. 1C publishes events to a queue, the site subscribes and processes them. Guaranteed delivery, buffering when one side is unavailable.

What we synchronize and how

Catalog (products, categories, attributes). The most voluminous part. Full export on first run, delta updates thereafter. When importing CommerceML: parse XML via PHP SimpleXML or XMLReader (for large files — only XMLReader, otherwise memory limit). Match products by GUID from 1C, which we store in a separate database field. If a product is deleted in 1C, we hide it on the site, not delete (order history may reference it).

Stock and prices. This is a separate ПакетПредложений in CommerceML, updated more often than the catalog. It's critical to do it atomically: not update stock one by one, but in a transaction. Otherwise, during the update, the user may see an inconsistent state. Frequency: once an hour for calm mode, once every 5–15 minutes for active trading.

Orders. Two-way exchange. Site → 1C: new order is sent with items, quantities, prices, customer contact info. 1C → site: order status (paid, assembled, shipped, delivered). For order transfer — either the same CommerceML (Документы block) or a direct REST call when an order is created on the site.

What typical problems do we solve?

Duplicate products. A 1C operator created an item with a typo in the SKU, then fixed it. On the site — two items. Solution: matching by GUID from 1C (not by SKU), GUID is immutable.

Cyrillic in XML and encodings. 1C historically works with Windows-1251. A CommerceML file may come in CP1251, PHP expects UTF-8. mb_convert_encoding() or iconv() in the first lines of the parser — mandatory.

Timeouts during large exports. A catalog of 100,000 items is 50–200MB XML. PHP default execution time of 30s is insufficient. Solution: CLI command (Laravel Artisan or Symfony Console) run via cron, without HTTP timeout. Or chunked processing via XMLReader with partial commits to the database.

Images. 1C can transmit images as Base64 inside XML (bloats file by 1.3x) or as file links. The second option is preferable. Download asynchronously, convert to WebP, place in media library.

Case: auto parts online store, 85,000 SKUs. Synchronization via CommerceML every 30 minutes. Problem: full export took 18 minutes, resulting in a new export starting while the old one was still running. Solution: lock via Redis (SET nx ex), delta export (only changed items in the last 2 hours via filter in 1C), processing via queue with 20 parallel workers. Sync time: 18 minutes → 2.5 minutes, no conflicts.

Comparison of integration methods

Method Sync speed Configuration flexibility Resource intensity
CommerceML High (binary XML) Low (fixed schema) Low (hardly affects server)
REST API directly Medium (JSON) High (any model) Medium (needs two HTTP servers)
Message Broker (RabbitMQ/Kafka) Very high (asynchronous) Medium (event-driven architecture) High (needs broker cluster)

CommerceML in typical scenarios is 2-3 times faster than REST for catalog synchronization due to binary packing of XML and compact format. However, if custom exchange logic is required, REST provides full flexibility.

Process and timeline

Audit of 1C configuration (version, configuration type, export capabilities) → data mapping design → development of receiver on site and sender in 1C → testing on real data → schedule setup → monitoring of first exchanges.

Participation of a 1C programmer on the client side is mandatory, or we involve a trusted specialist.

| Scenario | Timeline | | CommerceML, catalog + stock, WooCommerce | 2–4 weeks | | Two-way order exchange | +2–3 weeks | | Custom 1C configuration, REST API | 4–8 weeks | | Enterprise: multiple 1C databases, data bus | 2–4 months |

What's included in the result (deliverables)

  • Documentation: mapping scheme, data formats, error handling logic.
  • Configured synchronization schedule with execution logs.
  • Access to monitoring (Grafana/ELK — by agreement).
  • Training for managers: how to run manual exchange, how to read logs.
  • Post-launch warranty support — 2 weeks (issue fixing).

Get a consultation

We will evaluate your project within one business day — email us or use the chat. The integration cost is calculated individually based on project complexity. With over 7 years of experience in 1C integrations, we guarantee stable synchronization without surprises.