Reading list Switch to dark mode

    Prestashop Google reCAPTCHA

    Updated 26 December 2023

    Prestashop Google reCAPTCHA : reCAPTCHA is a system designed to establish that the user is a human. Prestashop Google reCaptcha displays images to identify humans as part of their normal validation procedures. It protects your website from spam and abuse and ensures higher security of your Prestashop store.

    Note: Module is compatible with PrestaShop version 8.x.x. and also multishop compatible.

    Check the overview of the plugin in the video mentioned-below –

    ccyReh34pJo

    Features

    • The reCAPTCHA improves the security of your store.
    • It will be a simple solution to keep away spam bots and hackers.
    • Admin can display google recaptcha on the following form pages – login page, registration page, contact page or Back-office Login page.
    • Admin can select single/multiple reCaptcha positions in the configuration page.
    • Admin can select the reCaptcha background.
    • Module translation is available in following languages: French (fr), Arabic(ar), Spanish(es), German(de), Italian(It), Russian(ru), Japanese(ja), Dutch(nl), Bulgarian (bg), Portuguese (pt)

    Installation

    1. Go to the back  office-> modules -> modules & services -> Upload a module.
    2. Upload zip file of “Google reCAPTCHA” module.
    3. The module will automatically get installed on your Prestashop.

    Click to upload the module

    Drop or select the module file

    Searching for an experienced
    Prestashop Company ?
    Find out More

    Module installed on the prestashop

    Note : Custom code need to add

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

    1.) Add Hook

    {hook h='DisplayWkCustomerLoginForm'}

    in Front-Office

    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/widget

    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 Login Form with id=”login_form”, After Password field <div class=”form-group”>……</div>

    4.) Add Hook –

    Hook::exec('actionWkAdminLoginControllerSubmit');

    in Back-Office

    File name – AdminLoginController.php
    Path – /controllers/admin/

    Position – Inside processLogin() function, after ‘password’ validation check and before this line – “if (!count($this->errors)) {”

    We override some prestashop core files –

    1. Classes/form – CustomerForm.php
    function name – validate()

    2. Classes/form – CustomerLoginForm.php
    function name – submit()

    3. modules/contactform – contactform.php
    function name – sendMessage()

    Configuration

    After successful installation, admin has to configure the module.

    Click to go to configuration page of the module

    Admin will provide all the Google reCAPTCHA credential details here.

    Configure settings of the module

    How to Create reCAPTCHA Credentials

    To get the Credentials of reCaptcha, Admin has to create/signup to their accounts from the link: https://www.google.com/recaptcha Click to access reCaptcha credentials

    Admin needs to either create a new account or login to its existing account to move ahead.

    Sign in to the google account

    Once logged in, admin needs to fill necessary information to get the reCAPTCHA credentials.Add the domain & fill the reCaptcha Label

    Once all the details are filled in, the credentials for reCAPTCHA will be generated.API keys for reCaptcha

    You need to enter the above generated credentials in the module configuration.

    FRONT END

    Once the module has been configured successfully, reCAPTCHA will be shown on the Login Page, Registration page and Contact page as per the configuration set by admin.

    reCAPTCHA at Login Page

    On the Customer Login page, reCAPTCHA will be shown to the customers before signing-in. According to the module configuration set by the admin reCAPTCHA will be displayed in light or dark background.

    recaptcha form on the login page

    Changed theme background for reCaptcha form

    Click to verify the reCaptcha images

    reCAPTCHA at Registration Page

    Similarly, On the Customer Registration Page, reCAPTCHA will be displayed to validate the user.

    reCaptcha form on the account registration page

    reCAPTCHA on Contact Page

    Similarly, On the Contact Page, reCAPTCHA will be displayed to validate the user.

    reCaptcha form on the contact us page

    Admin End

    Admin can apply reCAPTCHA display on Prestashop Back-Office Login Page also.

    reCaptcha form on the admin login page

    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 vast range of quality Prestashop addons.

    Current Product Version - 4.0.4

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

    Blog Version - 8.x.x, 1.7.x.x
    • Version 8.x.x, 1.7.x.x
    • Version 1.6.x.x
    . . .

    Leave a Comment

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


    2 comments

  • Luo
    • Mehul Gupta (Moderator)
  • 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