Shoper lets you add your own code to every page of your shop, and that is all the Yaplet widget needs. Where the code goes depends on your template: older templates have a field for it, and Storefront templates take it as your own module. You copy one block of code from Yaplet, paste it into Shoper, and the chat button appears on your shop.
This guide follows the Polish Shoper admin, as Shoper's own help shows it. Menu names are written exactly as Shoper shows them, with an English translation in brackets.
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. For a Storefront template (step 3), also switch off Include the <script> and </script> lines. Copy the code with the copy button on the code block.
The code you copied starts either with a <script> line or, if the tab didn't ask or you switched the lines off, with !function (Yaplet. Whether it needs the <script> lines depends on where you paste it, as the steps below say.
Shoper has two kinds of templates: Storefront templates and older RWD templates. Follow step 2 or step 3. If you're not sure which kind your shop uses, ask Shoper support.
2. Older (RWD) template: paste the code into your own integrations
- In your Shoper admin, go to Aplikacje i integracje → Własne integracje (Apps and integrations → Own integrations). In the previous version of the panel, this is Dodatki i integracje → Integracje własne.
- Find the Stopka strony, przed zamknięciem </body> field (Page footer, before the closing </body>). The Nagłówek strony - <head> field (Page header) works too.
- At the end of the field, paste the code you copied on a new line. Shoper requires code in this field to be wrapped in HTML tags, so it must start with a
<script>line and end with a</script>line. If what you copied starts with!function (Yapletinstead, type<script>on a new line before it and</script>on a new line after it. - If the field already holds other code, don't delete it: add the Yaplet code after it.
- Click ZAPISZ (Save).
3. Storefront template: add the code as your own module
On Storefront templates, Shoper lets you add your own JavaScript only through your own module, and only on the Shoper Premium plan. Without Shoper Premium, use Google Tag Manager instead: Shoper's template editor has a built-in Google Tag Manager module.
- Go to Wygląd i treści → Wygląd sklepu → Edycja szablonu graficznego (Look and content → Shop look → Edit graphic template) and click Edytuj układ i styl szablonu (Edit template layout and style).
- In the editor menu, click Dodaj (Add), then + Dodaj moduł własny (Add your own module).
- Give the module a name, for example Yaplet chat, and choose a category.
- For the module type, choose Moduł integracji (Integration module), and let it work on any page (dowolna strona).
- Paste the Yaplet code into the JS (JavaScript) field. This field takes JavaScript only, so the code must start with
!function (Yaplet. If what you copied starts with a<script>line, leave out that first line and the last</script>line. The other code fields are for developers; if Shoper asks you to fill them in, ask your developer or Shoper support. - Click ZAPISZ (Save).
- In the editor, open the Integracje (Integrations) tab, find your module, make sure Aktywność modułu (Module active) is ticked, and save.
4. 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 code shows up as text on your pages. In the Własne integracje field, the
<script>tags are missing. Add them as in step 2 and save. - Nothing appears and you added
<script>tags in the module's JS field. Remove them: that field takes plain JavaScript. - The module is saved but the chat is missing. Check in the editor's Integracje tab that Aktywność modułu is ticked, and save.
- There is no + Dodaj moduł własny option. Your shop is not on Shoper Premium. Use Google Tag Manager instead.
- Your browser shows an old copy of the page. Reload the page, or open your shop in a private window.
What's next
To see what the code does and where your widget ID is, read Install Yaplet.