Get in touch
  • OpenCart
  • CRM and integrations
  • v1.1.4

KeyCRM Sync — CRM for OpenCart 2.3, 3.x & 4.x

Free CRM module for OpenCart 2.3, 3 and 4: automatic order sync to KeyCRM. No duplicates, a retry queue, a log. No licence keys.

Compatibility
OpenCart 2.3.0.0 – 2.3.0.2 · 3.0.0 – 3.0.5 · 4.0.2 – 4.1.x
PHP
7.4 or newer
Version
v1.1.4 (OpenCart 4)
v1.1.3 (OpenCart 3.x)
v1.0.1 (OpenCart 2.3)

The module in action — 36 sec

Clear even without sound: Ukrainian subtitles

What the module does

Feature Free
Two-way sync between OpenCart 4 and KeyCRM ✔
Every order is automatically created in the CRM: customer, products, shipping, payment ✔
Reverse direction: order statuses, waybill numbers and stock come back to the store ✔
Duplicate protection on repeated sends ✔
A retry queue for network or CRM failures ✔
An exchange log in the admin panel ✔
A setting for which status triggers the send ✔
Free, no limit on the number of orders ✔

What it looks like

KeyCRM Sync settings in the OpenCart admin panel
General settings: when to send orders (right after checkout or on a chosen status), skipping zero-value line items, shipping included in the order data, and the retry queue.
KeyCRM connection: API key and connection test
Connection: the API key is stored encrypted and never returned to the form. A “Test” button tells you immediately whether the key is alive.
Order sync log for KeyCRM
Sync log: which order, to which CRM, with what ID it was created there, how many attempts were made, and the error text if something went wrong.

Technical requirements

  • OpenCart 4 4.0.2 – 4.1.x, PHP 7.4+
  • OpenCart 3 3.0.0 – 3.0.5, PHP 5.6 – 8.2 — a separate cc_crm-oc3.ocmod.zip build
  • OpenCart 2.3 2.3.0.0 – 2.3.0.2, PHP 5.6+ — a separate cc_crm-oc2.ocmod.zip build
  • A KeyCRM API key — your KeyCRM account → Settings → General → API key
  • Cron on your hosting — for the retry queue and reverse sync (direct order sending works without cron too)

Version history

v1.0.1 OC 2.3 Current

A cron token with a special character (&, quotes) is no longer rejected.

v1.1.4 August 2026

A currency fix release: amounts are now sent to KeyCRM in the order’s currency (at the order’s exchange rate) instead of the store’s base currency.

v1.1.3 OC 3 11 August 2026

The 3.x build has been brought up to the level of 2.3 and 4.x.

All versions (8)
v1.0.0 OC 2.3 9 August 2026

A separate build for OpenCart 2.3: the same order sync, log, retry queue and reverse sync, but with PHP 5.6-compatible code and Bootstrap 3 templates.

v1.1.3 5 August 2026

Fixed PHP 7.4 compatibility: the event handler was declared with a mixed type hint (which only exists from PHP 8.0), so on 7.4 sync didn’t work at all.

v1.1.1–1.1.2 July 2026

Fixed the order event on OpenCart 4.0.2.x (the method separator) and the waybill-duplicate check on the PDO database driver.

v1.1.0 July 2026

Reverse sync KeyCRM → OpenCart.

v1.0.0 First release July 2026

Sending orders to KeyCRM at checkout or on a status change, duplicate-free idempotency, a retry queue via cron, a field and payment mapper, API key encryption, a sync log, automatic source…

Full module description

KeyCRM Sync for OpenCart 2.3, 3.x and 4.x is a module that keeps your store in two-way sync with KeyCRM. In the forward direction, every OpenCart order is automatically created in the CRM — with the customer, products, shipping and payment method. In the reverse direction (optional), the module pulls order statuses, waybill numbers and even stock levels from KeyCRM back into OpenCart. Managers run sales from a single CRM window, and the store stays up to date with no manual work.

The module is completely free. The code is open on GitHub: github.com/catcodestudio/opencart-keycrm-sync. All you need is an API key from your KeyCRM account — no subscriptions and no extra services.

How it works, step by step

  1. The customer places an order in the OpenCart store.
  2. The module builds the data for the CRM: contacts, products, shipping and payment. The phone number is normalised into the +380 format, and zero-price line items are skipped.
  3. The order is sent to KeyCRM — right at checkout or when it reaches the configured status. The order source is created in the CRM automatically on the first send.
  4. Duplicate protection: a unique key, UNIQUE(order_id, target), in the log guarantees the order won’t be duplicated even if the event fires again.
  5. Failed sends go into a retry queue — a separate cron task keeps retrying them, up to a limited number of attempts.
  6. Reverse sync (if enabled): a second cron task periodically pulls updated statuses from KeyCRM (according to your “KeyCRM status → OpenCart status” mapping), adds a comment with the waybill to the order history, and, with a separate checkbox, updates product stock by SKU.

Under the hood

  • Database-level idempotency — UNIQUE(order_id, target) in the log table: a duplicate is impossible even if an OpenCart event fires twice.
  • The API key is encrypted in the database — sodium with an HMAC fallback, never stored in plain text.
  • A sync log with a per-status record for every order and fragments of the API request/response — handy for figuring out why a particular order didn’t go through.
  • Reverse sync with no loops: it reads from KeyCRM only to fetch data, and while writing the order history it suppresses the forward-sync event — nothing is sent back to the CRM. Every run rescans a 10-minute overlap so no borderline update is missed; times are in UTC.
  • Adapter architecture — the order mapper and the dispatcher are decoupled from any specific CRM, with KeyCRM implemented as an adapter.

How to install

  1. Download cc_crm.ocmod.zip via Extensions → Installer in the OpenCart admin panel. For OpenCart 3.x, use the cc_crm-oc3.ocmod.zip build.
    For OpenCart 2.3, take the cc_crm-oc2.ocmod.zip build. The 2.3 built-in installer only copies files over FTP, so if FTP isn’t set up, unpack the archive and upload the contents of the upload/ folder to the store’s root.
  2. Go to Extensions → Modules, find KeyCRM Sync and click “Install”.
  3. Open the module’s settings and paste in the API key from your KeyCRM account.
  4. Enable sending and choose the trigger: right at checkout, or on a status change.
  5. If needed, enable reverse sync on the “Reverse sync” tab: set up the status mapping (the list of KeyCRM statuses loads right in the admin panel) and add the cron tasks.
  6. OpenCart 2.3 and 3.x: these versions have no scheduler at all, so both cron URLs (retry queue and reverse sync) are simply shown in the module settings — add them to the system crontab. There’s also a “Cron token” field next to them: fill it in so no one else can trigger these URLs.

Questions
about the module

Didn't find the answer? Message us on Telegram and we'll reply within a business day.

@catcode_support Setup, compatibility, activation
Does the module change the store's checkout or theme?

No. The module listens for order events on the server side — the customer won't see any changes in the storefront or checkout.

Will duplicate orders be created in the CRM?

No. Idempotency is guaranteed by a unique database key on the "order + CRM" pair, and KeyCRM additionally receives source_uuid = oc-{order_id}.

What happens if KeyCRM is temporarily unavailable?

The order goes into a retry queue — a cron task will send it later. The result of every attempt is visible in the sync log.

Is reverse sync mandatory?

No, it's disabled by default. Forward order sending to KeyCRM works on its own; statuses, waybills and stock are a separate option for those who need it.

How does the module update product stock?

Through KeyCRM's GET /offers/stocks: offers are matched to OpenCart products by SKU, quantities are updated, and a summary of the run is written to the log. The option is switched on with its own checkbox.

Do I need to set anything up in KeyCRM itself?

Barely anything: just the API key. The module creates the order source automatically on the first send, unless you specify a Source ID manually.

Not quite what you are looking for?

We build custom modules for WordPress, WooCommerce, OpenCart and Shopify. Tell us about the task and we'll prepare an estimate.

Order a custom module