PrestaShop loads a file called custom.js from your theme on every page of your shop, and that is all the Yaplet widget needs. You or your developer paste one block of code from Yaplet into this file, and the chat button appears on your shop. This works in PrestaShop 8 and 9.
PrestaShop has no back-office setting for adding code to every page, so this is a change to your theme's files. You need access to your shop's files through FTP or your hosting's file manager. If you don't have that, send this guide to your developer.
1. Copy your Yaplet code
In the Yaplet dashboard's left menu, go to Brand → (your brand) → Chat widget → Install. If the tab asks where your website runs, choose Other website and switch off Include the <script> and </script> lines. Copy the code with the copy button on the code block.
custom.js is a JavaScript file, so the code must be plain JavaScript that starts with !function (Yaplet, with no <script> lines around it. If what you copied starts with a <script> line, leave out that first line and the last </script> line when you paste it.
2. Find your theme's folder
In the PrestaShop back office, go to Design → Theme & Logo. The first section of the page shows the name of the theme your shop uses.
On your server, each theme has its own folder inside the themes folder of your PrestaShop installation.
3. Add the code to custom.js
- In your theme's folder, open the file
assets/js/custom.js. If it isn't there (the Hummingbird theme doesn't come with one), create an empty file with exactly that name and path. - Paste the Yaplet code at the end of the file, on a new line.
- Save the file. If you edited a copy on your computer, upload it back to the same place.
If your shop uses a child theme, put the file in the child theme's folder.
4. Clear the PrestaShop cache
In the back office, go to Advanced Parameters → Performance and click Clear cache at the top of the page.
5. Check your shop
Open your shop in a new browser tab and reload the page. The Yaplet chat button appears in the bottom-right corner. Click it to check that the chat opens.
For a full checklist, see Verify your installation.
If the chat doesn't appear
- The file is in the wrong place. PrestaShop only loads
assets/js/custom.jsfrom the folder of the theme your shop uses (or its parent theme). Check the theme name in Design → Theme & Logo and the file's path. - You added
<script>tags. Remove them.custom.jstakes plain JavaScript, and the tags stop the code from running. - The shop still serves the old files. Click Clear cache again in Advanced Parameters → Performance, then reload your shop in a private window.
- The chat disappeared after a theme update. An update can change the theme's files. Check that the Yaplet code is still in
custom.js, and add it again if it's gone.
What's next
To see what the code does and where your widget ID is, read Install Yaplet.