Back to Dashboard

Documentation

Learn how to use Asyntai

How to Add Asyntai AI Chatbot to Zen Cart

Step-by-step guide for Zen Cart stores

Get Embed Code

Step 1: Install the Asyntai plugin

The Asyntai plugin is the easiest way. It needs no template edit and it changes no core file. It works on Zen Cart 1.5.8 and later.

  1. Download the plugin: asyntai-zencart-ai-chat.zip
  2. Unzip the file. You get a folder named zc_plugins.
  3. Upload that folder into the root of your Zen Cart store, next to index.php. The result is zc_plugins/AsyntaiAiChat/v1.0.0/.
  4. Log in to your Zen Cart admin.
  5. Go to Modules → Plugin Manager.
  6. Click Asyntai AI Chat in the list, then click Install.

Step 2: Enter your Widget ID

Your Widget ID is in your Asyntai Dashboard, under "Embed Code". It looks like asyntai_1a2b3c4d5e6f.

  1. Go to Configuration → Asyntai AI Chat in your Zen Cart admin.
  2. Paste your Widget ID into the Widget ID field.
  3. Set Enable Asyntai AI Chat to True.
  4. Click Save All Changes.

Note: Nothing loads until you enter a valid Widget ID. Use your own ID, not the one in the example.

Plugin settings

  • Enable Asyntai AI Chat: Shows or hides the widget. The default is False.
  • Widget ID: Your own Asyntai Widget ID. Nothing loads without it.
  • Widget script URL: The address of the widget script. Change it only if you host the script yourself. It must start with https:// and end with .js.
  • Pages without the widget: Page names, separated by commas, where the widget must not load. The page name is the main_page value in the address. The default hides the widget on the checkout pages.

Tip: To hide the widget for a while, set Enable Asyntai AI Chat to False. You do not have to uninstall the plugin.

Alternative: Add the code to your template

If you prefer not to install the plugin, you can add the embed code to your template file:

  1. Open your Zen Cart files by FTP or in your file manager.
  2. Go to includes/templates/YOUR_TEMPLATE/common/.
  3. Open the file tpl_main_page.php.
  4. Paste your Asyntai embed code just before the closing </body> tag:
    <script>(function(){var l=function(){var s=document.createElement("script");s.src="https://widget.asyntai.com/static/js/chat-widget.js";s.async=true;s.setAttribute("data-asyntai-id","YOUR_WIDGET_ID");document.head.appendChild(s)};if(document.readyState==="complete"){l()}else{window.addEventListener("load",l)}})();</script>
  5. Save the file.

Important: A template edit is lost when you update the template. The plugin does not have this problem, so use the plugin when you can.

Step 3: Verify the installation

Open your storefront in a new tab or in a private window. The chat button is in the bottom corner. Click it and make sure it opens and answers.

Not seeing the widget? Check three things. The plugin is Installed in the Plugin Manager. Enable Asyntai AI Chat is True. The page you are on is not in the Pages without the widget list. Then clear your browser cache, and clear the Zen Cart cache in Tools → Cache Control.

Uninstall

  1. Go to Modules → Plugin Manager.
  2. Click Asyntai AI Chat, then click Un-Install.
  3. The four settings, the configuration group and the admin menu entry are removed. No store data is touched.