Reading list Switch to dark mode

    PrestaShop Cloudflare Turnstile {User- Guide}

    Updated 20 March 2024

    Protect your forms against spammers, bots, and hackers by integrating your PrestaShop store with Cloudflare Turnstile. A modern alternative to CAPTCHA that blocks spammers from form that a user might fill out like login, registration, or contact form.

    Note: PrestaShop Cloudflare Turnstile module is compatible with PrestaShop version 8.x.x.

    Features of PrestaShop Cloudflare Turnstile

    • Display Turnstile on back office login, customer login, registration, and contact us pages.
    • Multiple theme options for Turnstile to choose from i.e. auto, light, or dark.
    • Select the size of Turnstile as normal or compact.
    • Track the users who have successfully completed the widget.
    • PrestaShop Cloudflare Turnstile module is MultiShop Compatible.

    NOTE

    For this module, you need to add some hooks in prestashop core files –

    1.) Add Hook

    {hook h='DisplayWkCustomerLoginForm'}

    in Front-Office

    Start your headless eCommerce
    now.
    Find out More

    A.) File name – login-form.tpl

    Path – /themes/_YOUR_THEME_NAME_/templates/customer/_partials/

    Position – In Login Form with id=”login-form”, Inside {block name=’login_form_fields’} section and after {/foreach}

    2.) Add Hook

    {hook h='DisplayWkCustomerContactForm'}

    in Front-Office

    A.) File name – contactform.tpl
    Path – /modules/contactform/views/templates/hook

    Position – Inside <section class=”form-fields”> after Message filed <label>…….</label>

    B.) File name – contactform.tpl
    Path – /themes/_YOUR_THEME_NAME_/modules/contactform/views/templates/widget

    Position – Inside <section class=”form-fields”> after Message filed <div class=”form-group”>……</div>

    3.) Add Hook

    {hook h='DisplayWkAdminLoginForm'}

    in Back-Office

    File name – content.tpl

    Path – /admin/themes/default/template/controllers/login

    Position – Inside <section class=”form-fields”> after Message filed <div class=”form-group”>……</div>

    How to Install PrestaShop Cloudflare Turnstile

    • Firstly, go to the module manager in the back office and click on ‘upload a module’.
    • After that, drag and drop the module file or select the file from the system.
    • In this way, the module installation will be successful.
    image-152
    image-153
    image-154

    PrestaShop Cloudflare Turnstile Configuration

    module configuration

    Under Configuration, you can:

    • Specify the site and secret keys that you have obtained from the Cloudflare account.
    • Select Turnstile theme as auto, light, or dark.
    • Select Turnstile size as normal or compact.
    • Configure pages where you want to show Turnstile. You can show Turnstile on back office login, customer login, registration, and contact pages.

    How to get Site and Secret Keys

    For obtaining the site and secret keys, you need to login to your Cloudflare account.

    2-13

    Once you have logged in, click on Turnstile on the dashboard page.

    3-11

    Now click on the Add site button on Turnstile page.

    5-8

    After clicking on the button, you can:

    • Specify the site name for the widget to identify it in the future.
    • Enter the domain where you want to allow Turnstile.
    • Select the widget type as managed, non-interactive, or visible.

    Once you have entered the site name, domain, and selected the widget type, click on create button.

    10-3

    Upon clicking the create button, you will be redirected to Turnstile page where you can view:

    • Domain
    • Visitor Solve Rate
    • API Solve Rate
    • Selected widget type
    • Site key
    11-3

    Click on settings to view the secret key.

    12-4

    Now, click on secret key.

    13A

    Front End Workflow

    Turnstile will display on the store pages selected by the admin while configuring the module settings.

    Customer Login Page

    14A
    15-2

    Dark Theme View

    21-2

    Turnstile Size – Compact

    22-2

    In the above screenshot, it can be seen that Turnstile is low in size. This is because the admin has selected compact in the size field.

    Cutomer Registration Page

    16-2

    Customer Contact Page

    17-2

    Back Office Login Page

    23-1

    Website Analytics

    In cloudflare account, you can check analytics of your website like challenges issued, visitor solve rate, and API solve rate.

    18-3

    On clicking the website link, dashboard will open where you can view analytics.

    20-2

    Challenges Issued: This means the number of times the widget has been displayed on the website.

    Visitor Solve Rate: Percentage of users who have seen the widget and completed it.

    API Solve Rate: Percentage of users who have completed the widget and then performed the action on the page successfully like login on completing the registration.

    Support

    For any kind of technical assistance or query, please raise a ticket or send us a mail at [email protected]

    Also, please explore our Prestashop development services and a vast range of quality Prestashop addons.

    Current Product Version - 1.0.1

    Supported Framework Version - 8.x.x, 1.7.x.x

    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    Be the first to comment.

    Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home

    Table of Content