Skip to main content

Guida all’installazione

Installare il pulsante di recesso su PrestaShop

Finché non sarà disponibile un modulo Clawzia dedicato per PrestaShop, aggiungete il codice con un modulo per codice personalizzato o nel vostro tema figlio.

Prima di iniziare

  1. Create your shop in Clawzia

    Sign up with your email address, create the shop, choose its country and default language and enter the email address that receives withdrawal notifications.

  2. Allow your shop’s domains

    Add every domain your shop runs on to the allowed domains, for example with and without www and the platform address of your shop. On other domains the widget only shows a link to the hosted form, with the EU directive’s wording in English.

  3. Copy your code

    Copy the code from the Install page of your dashboard (for the plugins, only the public key, which starts with pk_). The public key is not a secret.

  4. Multistore: consentite ogni dominio dei negozi

    Con più negozi in un’unica installazione PrestaShop, aggiungete il dominio di ogni negozio ai domini consentiti.

Con un modulo per codice personalizzatoRecommended

  1. Scegliete un modulo per codice personalizzato

    Usate un modulo che aggiunge HTML e JavaScript personalizzati all’hook displayBeforeBodyClosingTag (PrestaShop 1.7 e 8). I moduli che accettano solo contenuto HTML, come i blocchi di testo, rimuovono i tag script e non funzionano.

  2. Incollate il codice per tutte le pagine

    Incollate nel modulo il codice della dashboard e attivatelo per tutte le pagine.

    Install code (example)
    <script src="https://clawzia.com/widget.js" data-shop="pk_YOUR_SHOP_KEY" defer></script>
    <noscript><a href="https://clawzia.com/w/k/pk_YOUR_SHOP_KEY">[withdrawal wording from your dashboard]</a></noscript>

    Your personal code with your shop key is in the dashboard after sign-up. The second line (noscript) links visitors without JavaScript to your hosted withdrawal form. Its link text is the legal wording for your shop’s country, which the dashboard or our plugins print for you: never type or translate it yourself. If the code in your dashboard has no noscript line, leave it out.

    Screenshot follows: Un modulo per codice personalizzato con il codice.

  3. Svuotate la cache

    Svuotate la cache di PrestaShop per far comparire il nuovo codice.

    Where: Advanced Parameters → Performance → Clear cache

Con un tema figlioAlternative

  1. Modificate il template del layout

    Nel vostro tema figlio (così che gli aggiornamenti del tema non lo sovrascrivano), aggiungete il codice subito prima di </body> in templates/layouts/layout-both-columns.tpl. Per i negozi con più lingue, aggiungete la lingua della pagina al tag script: data-lang="{$language.iso_code}".

    Install code (example)
    <script src="https://clawzia.com/widget.js" data-shop="pk_YOUR_SHOP_KEY" defer></script>
    <noscript><a href="https://clawzia.com/w/k/pk_YOUR_SHOP_KEY">[withdrawal wording from your dashboard]</a></noscript>

    Your personal code with your shop key is in the dashboard after sign-up. The second line (noscript) links visitors without JavaScript to your hosted withdrawal form. Its link text is the legal wording for your shop’s country, which the dashboard or our plugins print for you: never type or translate it yourself. If the code in your dashboard has no noscript line, leave it out.

    Screenshot follows: Il file del template con il codice prima del tag body di chiusura.

  2. Svuotate la cache

    Svuotate la cache di PrestaShop per far usare il template modificato.

    Where: Advanced Parameters → Performance → Clear cache

Verificate l’installazione

  1. Open your shop in a private window

    The withdrawal link appears at the end of your footer, or as a floating button, depending on the position you chose in the dashboard.

  2. Try it with the keyboard

    Press Tab until the link is focused, then Enter: the two-step withdrawal form opens. Close it with Esc.

  3. Check that the code is there once

    View the page source and search for data-shop="pk_. The script tag should appear exactly once per page.

  4. Send a test withdrawal

    Send a withdrawal with your own email address and the order reference TEST. Check the confirmation email and its receipt link, then close the request in your dashboard.

  5. If the link does not appear

    If your site sends a Content Security Policy, allow https://clawzia.com in script-src and connect-src. Exclude widget.js from script combining, minifying and “delay JavaScript” features of optimisation plugins and CDNs.

Pronti a installare?

Create il vostro negozio per ottenere il codice, poi seguite i passaggi qui sopra.