Skip to main content

How to connect OpenCart to Stokis

Upload stokis.ocmod.zip under Extensions → Installer, install Stokis Connector under Extensions → Extensions → Modules, then paste the shop address and key from its settings page into Stokis. It works on OpenCart 3.0 and 4.

What you need before you start

OpenCart's own API cannot list products, stock and orders for another service, so Stokis reads them through a small extension that you install once.

  • An OpenCart 3.0 or 4 shop that you can sign in to as an administrator, because you will upload and install an extension.
  • A shop address that opens over https in a browser. Stokis connects over https only.
  • A Stokis account with a workspace that has no shop connected yet. One workspace holds one shop.

Download the extension for your OpenCart version

There is one file for OpenCart 4 and one for OpenCart 3. Both are named stokis.ocmod.zip. The same two downloads are on the Integrations page in Stokis.

Keep the file name exactly as it is. OpenCart accepts only a name that ends in .ocmod.zip, so a second copy that your browser saved as stokis.ocmod (1).zip is refused as an invalid file type.

Upload the file under Extensions → Installer

In the OpenCart admin open Extensions → Installer and upload the file. On OpenCart 4 the upload button is the blue one at the top right, and the extension then appears in the list, where you press the green plus to install it. OpenCart 3 installs the file as soon as the upload finishes.

The Extension Installer page of OpenCart 4.1.0.4 with a blue upload button at the top right and a list of installed extensions. Stokis Connector 1.0.0 is the last row, with an orange minus button.
OpenCart 4.1.0.4, Extensions → Installer. Stokis Connector is already installed here, so its row shows an orange minus. Before you install it the row is grey with a green plus, like the examples above it.
The Extension Installer page of OpenCart 3.0.5.1 with an Upload button, an empty progress bar and an Install History table that lists stokis.ocmod.zip.
OpenCart 3.0.5.1, Extensions → Installer. Press Upload and pick stokis.ocmod.zip. It appears under Install History when the upload is done.

Install Stokis Connector under Extensions → Modules

Uploading is only the first half. The extension starts working, and makes its key, when you install it in the list of modules.

  1. Open Extensions → Extensions and choose Modules in the extension type list.
  2. Find Stokis Connector. The list is in alphabetical order.
  3. Press the green plus button to install it. The button turns into a red minus.
  4. Press the blue pencil button to open its settings page.
The OpenCart 4.1.0.4 extension list with Modules chosen in the type list. The Stokis Connector row has a blue pencil button and a red minus button; the modules next to it that are not installed have a green plus.
OpenCart 4.1.0.4 with Modules chosen. The top of the page and the rows around Stokis Connector come from the same page; the middle of the list is left out at the dots.
The OpenCart 3.0.5.1 extension list with Modules chosen. The Stokis Connector row reads Enabled and has a blue pencil button and a red minus button.
OpenCart 3.0.5.1 with Modules chosen. This version also shows a Status column. The middle of the list is left out at the dots.

Copy the shop address and the key

The settings page shows the Shop address and the Key, each with a Copy button, and two switches. Copy both values. Copy the key whole: a key that is cut short is refused.

The Stokis Connector settings page in the OpenCart admin: the shop address and the key, each with a Copy button, a Make a new key button, the Status switch switched on and the Stock updates switch switched off.
The Stokis Connector's settings page on OpenCart 4.1.0.4, with an example address and key. OpenCart 3 shows the same fields.
  • Status is on after the install. Switching it off stops Stokis reading the shop without removing the extension.
  • Stock updates is off after the install, so Stokis can only read. See the stock section below before you switch it on.
  • Make a new key stops the old key at once. Use it if the key was shared by mistake, then paste the new key into Stokis.

Paste both values into Stokis

  1. In Stokis open Integrations and choose OpenCart.
  2. Paste the shop address into Store URL and the key into Key.
  3. Press Test connection. Stokis checks the key against your shop before anything is saved.
  4. Press Connect. The first sync starts on its own and a dialog shows each step.
The Integrations page in Stokis with OpenCart chosen: two download buttons for the extension, a Store URL field holding your-store.com and a Key field with a hidden value.
The Integrations page in Stokis with OpenCart chosen and example values. The key is hidden as you paste it.

After the first sync Stokis reads the shop again on the schedule of your plan, and Sync now reads it on the spot.

Let Stokis add received orders to your stock

This step is optional. With both switches below on, receiving a purchase order in Stokis adds the received quantity to the product's stock in OpenCart. With either one off, Stokis only reads.

  1. In OpenCart, switch Stock updates on in the Stokis Connector's settings page and save.
  2. In Stokis, switch Push stock back to store on in the Integrations page and save.

A product with Subtract Stock off, and a product sold in combinations of several options, has no stock level of its own in OpenCart. Stokis shows such a unit as Not tracked, counts its sales, and does not hold a stock figure for it.

What the extension reads

The extension adds one settings page and changes no OpenCart file, theme or template. It answers only requests signed with your key.

The extension readsStokis uses it for
Products with their options, SKU, model and priceThe product list. Each option value you sell as its own unit becomes its own product
Stock quantitiesStock levels, stock cover and reorder points
Categories and manufacturersFilters, and suppliers if you choose to use the brand as supplier
Orders from every store of the shop: status, date, total and the lines with the chosen optionsSales history and the demand forecast
Nothing about your customersNo names, emails, addresses or phone numbers leave the shop

An order counts as a sale while its status is one that your shop treats as processing or complete. OpenCart has no cost price, so products arrive without a cost.

When OpenCart does not connect

Stokis names what it found. Match the message you see.

What you seeCauseFix
The key doesn't match this shopThe key in Stokis is not the one the extension holds now. Someone pressed Make a new key, or the key was copied in partCopy the key again from the settings page and paste it into Stokis
We reached your shop, but the Stokis Connector isn't installed thereThe file was uploaded and never installed, or the address is not the shop's ownFinish the install under Extensions → Extensions → Modules and use the address the settings page shows
The Stokis Connector is switched off in your shopThe Status switch on the settings page is offSwitch it on and save
Your shop answered with a page instead of dataMaintenance mode, or a security check in front of the shop, answered in place of the extensionSwitch maintenance mode off, or let Stokis through the firewall, then test again
Stokis connects over https. Check that your address opens in your browserThe shop has no working https addressSet up https for the shop, then test again
Stock updates are switched off in your shopPush stock back to store is on in Stokis while Stock updates is off in the extensionSwitch Stock updates on in the settings page, or switch the push off in Stokis
Invalid file type, in OpenCart, when you uploadThe browser renamed the download, for example to stokis.ocmod (1).zipRename it back to stokis.ocmod.zip and upload it again

How to pause, replace the key or remove the extension

  • To pause, switch Status off in the settings page. Stokis stops reading and the extension stays installed.
  • To replace the key, press Make a new key. The old key stops working at once, so paste the new one into Stokis.
  • To remove the extension, uninstall it under Extensions → Extensions → Modules. Its key is deleted with it.
  • To disconnect on the Stokis side, press Disconnect in the Integrations page. The automatic sync stops and the saved key is removed. Your products and sales history in Stokis stay, and you can connect again later.

Questions about connecting OpenCart

OpenCart 3.0 and 4. The steps and pictures here were taken on 3.0.5.1 and 4.1.0.4. If another release does not connect, tell us the version.

Guides for other platforms