Add a Voice AI Agent to OpenCart (2026 Guide)
Add the AnveVoice voice agent to OpenCart using the admin Theme Editor to override footer.twig: exact path, saving, cache clearing and common problems.
How to add AnveVoice to an OpenCart store
OpenCart has no custom-code box in its settings. The supported route is the Theme Editor under Design, where you override the common footer template and paste the AnveVoice tag before the closing body tag. The override is stored in the database and takes effect straight away. Steps checked against the official documentation on 2026-10-14.
At a glance
- Where the code goes: Design > Theme Editor > common/footer template (a footer override, stored in the database)
- Coding needed: Pasting one line into a Twig template; no file access required
- Plan limits: None: OpenCart is self-hosted software and you edit your own templates
- Time: About 5 minutes
Before you start
Get your embed ID from app.anvevoice.app. The Free plan is $0 with 50,000 tokens a month and one bot, no card needed. You also need an OpenCart administrator login. OpenCart's layout system is easy to mistake for a script manager. The Design > Layouts screen only decides which modules appear in the Content Top, Content Bottom, Column Left and Column Right positions on each route, and its documentation says nothing about scripts. Raw JavaScript belongs in a template, which is why the Theme Editor is the right tool here.
- 1. Copy your install tag — Replace YOUR_EMBED_ID with the ID shown in your AnveVoice dashboard (app.anvevoice.app). Optional URL parameters are &position=bottom-left and &theme=dark. Code: <script src="https://anvevoice.app/embed.js?embedId=YOUR_EMBED_ID" async></script>
Method 1: override the footer in the Theme Editor
OpenCart's documentation describes the Theme Editor as an override mechanism: you pick a store and a .twig template, edit its code, enable the override and save. The edited version is kept in the database instead of in a file, so the original template on disk is untouched.
- 1. Open the Theme Editor — In the admin go to Design > Theme Editor and click Add New (or Edit if you already have an override for the footer).
- 2. Choose the store and template — Select your store (the default store, or a specific one in a multi-store setup), then in Choose Template pick the common footer template, footer.twig. Its current code loads into the editor.
- 3. Paste the tag — Scroll to the end of the template and paste the AnveVoice tag on its own line directly above the closing body tag. Do not change the surrounding Twig.
- 4. Enable and save — Set Status to Enabled and click Save. OpenCart's documentation warns that editing an active override changes the live storefront immediately, so make the edit when you are ready for visitors to see it.
- 5. Clear the template cache if needed — If the button does not appear, the docs say template caching can hide changes; clear the template cache under System > Settings > Server and reload.
Things the OpenCart docs warn about
Because overrides live in the database, include the theme table in your backups and when you migrate a store, otherwise the footer edit will not follow the shop to a new server. There is also no file locking: if two administrators edit the same override the last save wins. There is no revert button. To go back, disable the override or paste the original template code back in and save. If you override a template that belongs to an extension, an update to that extension can break the override, so prefer the core footer for this job. A syntax error in Twig can produce a blank page; enabling Debug Mode helps find the mistake.
Method 2: edit the file in a theme of your own
If you maintain your own theme extension and deploy files from version control, you can put the same line into that theme's copy of common/footer.twig and ship it with your code. This is a developer workflow and OpenCart's own documentation centres on the Theme Editor, so treat it as the manual alternative. Whichever route you pick, add the tag once; the script ignores a second copy, but a single tag is easier to maintain.
Check that it works
- 1. Open the store in a private window — Load the home page and a product page as a guest.
- 2. Click the microphone button — It appears bottom-right by default. Allow the microphone and ask something about a product; the shop must use HTTPS.
- 3. Confirm in the source — View the page source and search for anvevoice.app/embed.js to confirm the footer override is being rendered.
Common problems on OpenCart
- No button after saving: confirm Status is set to Enabled on the override and clear the template cache.
- White screen after saving: a Twig syntax error crept in. Disable the override, then re-add the tag without touching other markup.
- Button on some stores only: overrides are chosen per store, so repeat the steps for each store in a multi-store install.
- Footer edit lost after migration: the theme table was not included in the database export.
Sources
- OpenCart documentation: Theme Editor (https://docs.opencart.com/design/theme-editor.md) — checked 2026-10-14
- OpenCart documentation: Layouts (https://docs.opencart.com/design/layouts.md) — checked 2026-10-14
Related
- How to add AnveVoice to a PrestaShop store
- How to add AnveVoice to Magento and Adobe Commerce
- How to add AnveVoice to a WooCommerce store
- How to add AnveVoice to an Ecwid store
Try AnveVoice on your site
Free plan: $0, 50,000 tokens a month, no card. Get your embed ID in the dashboard, then paste one tag.