Giter Club home page Giter Club logo

pdrecaptcha's Introduction

pdrecaptcha created by Prestademia

Modulo recaptcha v3 invisible para el formulario de contacto compatible con prestashop 1.6 y 1.7

Advertencia!

Antes de instalar el módulo revise sí existe el archivo ContactController.php dentro la ruta override/controllers/front/ de tu tienda prestashop, entonces después de revisar la ruta tienes dos opciones.

  1. Si existe el archivo, entonces debes descomprimir el modulo descargado y eliminar la carpeta override, además debes agregar en el archivo encontrado llamado ContactController.php, la siguiente linea de código dentro de la function postProcess:

     Hook::exec('actionBeforeContactSubmit');
    
  2. Si no existe el archivo, puede continuar la instalación con normalidad.

pdrecaptcha's People

Contributors

prestademia avatar

Stargazers

 avatar Sergio Rogelio Sandoval avatar webmasterMcc avatar Levi Alvarado Rivera avatar Ing. Héctor Loiz avatar Gustavo Silva avatar Dan Claudiu Gavril avatar  avatar Carlos avatar W4U avatar

Watchers

Carlos avatar  avatar

Forkers

hamsn

pdrecaptcha's Issues

Not working in prestashop verison 1.7.6.8

Thanks for the module but after some testing seems to not be working in PrestaShop version 1.7.6.8, I have change a little bit the overwritten and works like a charm for a demo web that I have, basically remove the actual overwritten and add this file in override/modules/contactform/contactform.php, in this file add the next code:

<?php

class ContactformOverride extends Contactform
{
    public function sendMessage()
    {
        //Module pdrecaptcha : Check captcha before submit
        Hook::exec('actionBeforeContactSubmit');
        if (!sizeof($this->context->controller->errors)) {
            parent::sendMessage();
        }
    }
}

Also there is a little mistake in the evaluation of scores in the pdrecaptcha.php file, in line 349 the code should looks like:

            if ((int)Configuration::get('PD_RECAPTCHA_SCORE') == 1) {
                $score = '0.9';
            } elseif ((int)Configuration::get('PD_RECAPTCHA_SCORE') == 2) {
                $score = '0.6';
            } else {
                $score = '0.3';
            }

that's all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.