AI Agent Installation & Integration Use this guide to install the AI Agent widget on PrestaShop. Copy the Embed Code from your portal as described in Installation Overview . Two embed methods are supported: 1.
Script-based loader (recommended): Adds an AI Agent bubble. The chat opens in an iframe popover when the visitor clicks the bubble.
2.
Iframe-based embed: Loads the AI Agent directly as an iframe appended to the page body (best for a dedicated page).
Best placement# Script-based loader: Add it in the active theme template that outputs the closing </body> so it loads across the storefront.
Iframe-based embed: Add it only on a specific page where you want a direct embedded chat experience.
The embed code appends to document.body, so placing it near </body> is safest.
Script-based loader (AI Agent Bubble)# 2.
Locate the active theme file responsible for closing the page layout (the file that prints </body>).
3.
Paste the Script-based loader code just above </body>.
5.
Clear PrestaShop cache (if enabled).
6.
Open the storefront and test.
If your theme provides a built-in custom script area or a module for global scripts, use that instead of editing theme files directly.
Iframe-based embed (Direct AI Agent Chat)# This method appends the iframe to the page body and is best used on a dedicated page. 1.
Open the page where you want the embedded AI Agent (for example a CMS page).
2.
Switch to HTML/source mode (if your editor supports it).
3.
Paste the Iframe-based embed code.
4.
Save and test on the storefront.
To control size, adjust iframe.style.width and iframe.style.height in the code (example: 600px, 80vh, 100vh).
Even if pasted inside a CMS page editor, the iframe is appended to the page body (because the code uses document.body.appendChild(...)).
Verify installation# 1.
Open the storefront in an incognito/private window.
2.
Confirm the bubble or embedded AI Agent loads.
3.
Send a test message and confirm replies.
Troubleshooting# Confirm you edited the active theme used by the storefront.
Clear PrestaShop cache and hard refresh (Ctrl+Shift+R / Cmd+Shift+R).
Check if a performance module is combining/minifying scripts in a way that breaks execution.
Check browser console for blocked requests.
Confirm the code is copied exactly from the portal and uses the correct values.
Ensure the code is added only once in the theme.
Check if any modules are also injecting the same embed code.
Modified at 2026-02-19 07:26:15