Skip to content

Install Looma on OpenCart ​

OpenCart has an official Looma extension. It adds the widget to your storefront by itself and hands Looma your catalogue, categories and information pages — no feed, no theme edits. Works on OpenCart 3.0.x, 4.0.x and 4.1.x and on ocStore 3.0.3.x.

If you would rather not install an extension, you can still paste the snippet by hand: that gives you the widget only, and products will have to come from a feed.

What the extension gives you ​

With the extensionManual snippet
Widget on the storefrontadded automaticallycopy code into the theme template
Productsread straight from the storeGoogle Merchant feed required
Catalogue categoriesarrive with their URLsLooma crawls the site itself
"Delivery" / "Payment" pagesbecome assistant knowledge—
Theme updatesnothing breaksthe code has to be pasted again

Prerequisites ​

  • OpenCart 3.0.x, 4.0.x, 4.1.x or ocStore 3.0.3.x with admin access;
  • HTTPS on the store — Looma only accepts an https:// address;
  • in Looma — the Owner or Administrator role and a plan with API access (only they can see the Integrations section).

Step 1. Install the extension ​

Option A: from a file ​

Where to get the file

Download the archive for your store version:

The same buttons are in Looma: Integrations → OpenCart.

Not sure which version you have? It is at the bottom of any admin page.

  1. Save the archive without renaming the file.

    Do not rename the archive

    On OpenCart 4 the file name defines the extension folder and its namespace inside the store. A renamed archive still installs, but the endpoint returns 404 and Looma cannot see the store.

  2. Go to Extensions → Installer → Upload and pick the archive.

  3. Go to Extensions → Extensions → Modules, find Looma in the list and press + (Install).

    On OpenCart 4 this step is mandatory

    Until you press it the extension route does not exist at all: the settings screen already opens, yet the connection test in Looma fails. On 3.0.x there is no such dependency, but you still need the button to get the settings screen.

  4. Press Edit next to Looma — the settings screen opens.

Option B: from the opencart.com listing ​

The extension is published in the official catalogue: Looma on opencart.com.

  1. Open the extension page and press Download.
  2. Pick the archive for your version — there are two, with the same file names as above.
  3. From there it is identical to option A, starting at step 1.

“Extensions → Marketplace” inside the store is not the way

Your store has an Extensions → Marketplace tab, and it looks like the extension could be installed straight from there. In practice it only works once your store is linked to an opencart.com account: OpenCart 4 answers “You must enter your OpenCart API information … before you can download extensions”, and on 3.0.x the search returns an empty list.

So take the file — from the extension page or straight from Looma. It is faster and needs no third-party account.

Option C: from source ​

The extension is open source (GPL-3.0), so you can build the package yourself: github.com/looma-chat/looma-opencart.

bash
git clone https://github.com/looma-chat/looma-opencart.git
cd looma-opencart
./build.sh          # two archives in dist/

This is for people who want to read the code first or keep their own build. A normal installation does not need it — the archives in options A and B are built from these very sources.

Step 2. Configure the extension in your store ​

Four things on the extension screen matter:

Address for Looma — the ready-made endpoint address; copy it in full. It differs between platform versions, which is why the extension shows it for you:

3.0.x / ocStore   https://your-store.com/index.php?route=extension/module/looma
4.0.x / 4.1.x     https://your-store.com/index.php?route=extension/looma/api

The address must be https

If the store runs on http, the extension warns you right on the screen. Looma will not accept such an address — set up a certificate first.

Connection key — invent a long random string (32 characters from a password manager, for example) and paste the same key here and in Looma. The store keeps only its hash, so the key cannot be read back from here. Lost it? Just set a new one in both places.

24 characters minimum

A shorter key will not be accepted. The easiest way is to generate one in your password manager — this key is what keeps your catalogue closed to outsiders.

Last request from Looma — the time of the last successful call. This is the key diagnostic fact: it separates "the request never arrived" from "it arrived, so look on the Looma side".

Toggles — products, categories, information pages and the widget. Clearing a toggle stops the store from sharing that particular data; everything else keeps working.

Step 3. Connect the store in Looma ​

  1. Go to Integrations → Ready integrations → OpenCart.
  2. Find the site you need and press Connect.
  3. Paste the address for Looma and the connection key, then press Save.
  4. Press Test connection.

Once the test passes, the status changes to Connected and you can see which operations your store supports.

Step 4. Switch products to the store ​

This step is optional — skip it if your current feed works for you.

  1. Go to Site Settings → Products.
  2. Under "Data source" pick Direct shop connection.
  3. Choose the import language, save and press Refresh data.

Changing the source recreates the catalogue

Products are imported from scratch, so per-product view counters reset. The dashboard warns you before the switch.

After that the catalogue refreshes once a day automatically, and the "Refresh data" button runs an import right away. More detail in Direct shop connection.

The widget: nothing to copy ​

The extension adds the widget code itself, through an event on page output — the theme plays no part.

  • Right after installation there is no tag on the storefront yet — that is normal. The store learns your Looma site address from the very first request, so the tag appears after the first successful connection test.
  • If you already pasted the Looma code into the theme by hand, the extension adds nothing — it never overwrites someone else's snippet. Looma shows this on the connection screen so you know the manual snippet is what is running.
  • Turn the widget off with the "Add the widget to the storefront" toggle — useful when you manage the snippet through GTM.

Store pages in the knowledge base ​

Information pages ("Delivery", "Payment", "About us", contacts) become knowledge sources for the assistant — they are exactly what answers "how do you ship?" and "when are you open?".

Go to Integrations → OpenCart → Shop pages in the knowledge base: there is the list of pages with a checkbox on each. Clear a checkbox and the assistant stops using that page; put it back any time, with nothing to re-import. The Refresh from the shop button pulls fresh text after you edit a page in the store.

A page deleted in the store does not vanish silently: it stays in the list marked Not in the shop, because the assistant is still answering with the stored text.

Troubleshooting ​

"The shop is not responding" on the connection test. Most often the + button in Extensions → Extensions → Modules was not pressed on OpenCart 4 — without it the extension route does not exist. Also check that the address was copied in full and starts with https://.

"The shop rejected the access details". The keys in Looma and in the store differ. Set a new key in both places — the stored one cannot be read back.

"Last request from Looma" is empty. No request ever reached the store: look between Looma and the store — the route, HTTPS, a firewall, or bot protection at your hosting provider.

The widget did not appear. Check that the connection test passed at least once (before that the store does not know the site token), that the widget toggle is on, and clear the cache: Dashboard → gear icon → Refresh for Theme and SASS.

Products did not update after a change in the store. The catalogue refreshes once a day — press Refresh data in site settings instead of waiting.

If the extension is not an option ​

You can paste the widget by hand — then only the widget works, and products have to come from a Google Merchant feed.

Theme Editor (OpenCart 4.x) ​

  1. Go to Design → Theme Editor and select your active theme.

  2. Open common/header and find the closing </head> tag.

  3. Paste the installation code from the Dashboard → Site Settings → Installation right before it:

    html
    <script>
    (function(d) {
        var s = d.createElement('script');
        s.defer = true;
        s.src = 'https://widget.looma.chat/loader.js?token=YOUR_SITE_TOKEN';
        if (d.head) d.head.appendChild(s);
    })(document);
    </script>
  4. Save and check the storefront — the chat bubble should appear bottom-right.

Theme files over FTP ​

  • OpenCart 4.x: catalog/view/template/common/header.twig
  • OpenCart 3.x: catalog/view/theme/YOUR_THEME/template/common/header.twig (for the default theme — catalog/view/theme/default/…)

Paste the same code before </head> and save the file.

A theme update wipes the snippet

After every theme update you have to add the code again. That is exactly the problem the extension solves — it changes nothing in your theme.

Next Steps ​

Looma.chat — AI-powered e-commerce search & chat