nenes25 / eicaptcha Goto Github PK
View Code? Open in Web Editor NEWCaptcha module for prestashop
Captcha module for prestashop
Hello,
Thank you so much for this module!
It is working on my prestashop 1.6.1.1 with default theme and V0.4.5 Module Version.
The only thing is that product comment still keep the default prestashop captcha… I do not know why.
One other strange thing is that the captcha is correctly installed and displayed on the contact form on my computer
The problem is that it is not displayed when I visit the contact form from a mobile phone (iPhone).
I have make a test and I have been able to send a message…
It is also impossible for me to have it displayed on the "Send to a Friend Form"
Captcha is diplayed correctly on registration form on booth devices…
Someone have the same problem?
Some help on these issues?
in checkout registration form dont compare captcha
I'm using eicaptcha on a custom contact form page built with Custom Contact Page v 1.2, where I can put a google map of my shop.
The captcha works fine on account creation page, but it doesn't appear on the contact form page.
Below the error showed on debug console:
Uncaught Error: ReCAPTCHA placeholder element must be an element or id
at Object.Qr [as render] (recaptcha__it.js:393)
at onloadCallback (contattaci:250)
at recaptcha__it.js:397
at Br (recaptcha__it.js:388)
at recaptcha__it.js:397
at recaptcha__it.js:408
If I disable google maps, recaptcha starts to work.
1.4.0.17
v0.3.1
Yes, custom made
Hi,
I've got this message in the reCaptcha admin site :
We detected that your site is not verifying reCAPTCHA solutions. This is required for the proper use of reCAPTCHA on your site. Please see our developer site for more information.
However, the plugin seems to work (reCaptcha is visible on the contact form and my spam problem almost disappeared)
1.7.2.4
0.4.11
TechOne - https://themeforest.net/item/techone-modern-prestashop-theme/20383869
i Installed version 0.4.11 -> fill the keys but the captcha does not display on contact form
When I switch on classic theme the captcha still does not work.
1.4.8.2
0.3.1
No
Hello,
First, thanks for this awesome module!
Since March 31, 2018, Google forced upgrade to reCAPTCHA v2.
Here, 3 lines of the changelog :
The last version compatible with Prestashop 1.4 is the 0.3.1. I think it could be interesting to add a release from the commit ac0dadc in the release page.
What do you think about it?
p.s. I manually cloned the repo, checkout to ac0dadc and added the module with the code of this commit to my Prestashop 1.4. Everything is working perfectly, with reCAPTCHA v2 API.
Hello,
0.4.10 version
problem with js with the sendtoafriend module
stf_secure_key is not defined on console
when you click the send button, so it doesn't send the message
thank you
1.7.1.0
v2.0.2
leo_martin (version 1.0.0, by Leotheme Team)
https://www.cordonne.com.ar/contactanos
First, thanks for the module. It helped us with a spam attack.
This is my first issue in Github.
We have a problem when some field is empty in the contact form or captcha checkbox is not clicked, and then, click on send button. This error appear:
If all fields have a value in the contact form and captcha checkbox is clicked, it is working fine.
Can I help me, please?
Thanks!
1.6.1.18
0.4.14
Yes: https://livedemo00.template-help.com/prestashop_45426
On one of my installations i'm getting error with module check: "the module is not registered in hook header" - thing is, that eicaptcha is listed normally on positions in displayCustomerAccountForm and displayHeader hooks, am i missing something here?
I'm running Prestashop 1.6.0.9
I Download the latest eicaptcha version 0.4.12
After the Installation i had on the Modules Page the following error:
[PrestaShop] Fatal error in module Module.php(1224) : eval()'d :
Can't use function return value in write context
Any Idea's?
Bonjour
Le js est bien présent dans le header et le div captcha-box est correctement créé mais reste désespérément vide.
Je n'ai pas d'autre submit sur la page pouvant parasiter la chose ni d'erreur js dans la console.
Une idée svp ?
Merci d'avance
Pierre
PS 1.5 - Theme spécifique mais les sélecteurs sont corrects - eicaptcha v0.4.12
1.6.1.13
0.4.12
This version throws different 500 errors:
[20-Feb-2018 10:28:28 Europe/Madrid] PHP Parse error: syntax error, unexpected 'return' (T_RETURN), expecting function (T_FUNCTION) in /home/gamaguimp/public_html/override/controllers/front/ContactController.php on line 94
[20-Feb-2018 10:31:52 Europe/Madrid] PHP Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /home/gamaguimp/public_html/override/controllers/front/ContactController.php on line 101
After review each one, the module is not showing any captcha and is not inserting any html.
Hi,
There is a strange mention to vendor/autoload.php in eicaptch/eicaptcha.php on line 382
require_once(__DIR__ . '/vendor/autoload.php');
but this file do not exist in the module files...
The captcha box is added with this code :
//Add div where the captcha will be displayed
$(".submit").before("<div id="captcha-box">");
the part ".submit" should be configurable.
Hello. Please tell me how to add captcha to the non-standard template?
On the standard is added and if you change the template then Captcha is not.
Hi there,
I decided to test this Prestashop addon, as it seems it's the only free plugin integrating Google Nocaptcha Recaptcha.
While apparently working as expected, unfortunately it's not effective in fighting spam. That's because the recaptcha integration is made through ajax and not upon form submission. So it's sufficient to disable javascript to be able to bypass the captcha validation. Of course spam bots totally ignore javascript and ajax, so they are able to send spam as if no captcha was present.
1. Generates failure message during install:
Problem: In function install()
- missing "!" before $this->registerHook('contactFormAccess')
Solution: add missing !
..
2. Configuration form does not display saved values (and shows notices about missing keys if display_errors=true)
Problem: in renderForm()
- missing code that would set key fields_value
in HelperForm()
.
Solution: add missing code:
$helper->tpl_vars = array(
'fields_value' => array(
'CAPTCHA_PUBLIC_KEY' => Configuration::get('CAPTCHA_PUBLIC_KEY', Tools::getValue('CAPTCHA_PUBLIC_KEY')),
'CAPTCHA_PRIVATE_KEY' => Configuration::get('CAPTCHA_PRIVATE_KEY', Tools::getValue('CAPTCHA_PRIVATE_KEY')),
'CAPTCHA_FORCE_LANG' => Configuration::get('CAPTCHA_FORCE_LANG', Tools::getValue('CAPTCHA_FORCE_LANG')),
'CAPTCHA_ENABLE_ACCOUNT' => (int)Configuration::get('CAPTCHA_ENABLE_ACCOUNT', (int)Tools::getValue('CAPTCHA_ENABLE_ACCOUNT')),
'CAPTCHA_ENABLE_CONTACT' => (int)Configuration::get('CAPTCHA_ENABLE_CONTACT', (int)Tools::getValue('CAPTCHA_ENABLE_CONTACT')),
'CAPTCHA_THEME' => (int)Configuration::get('CAPTCHA_THEME', (int)Tools::getValue('CAPTCHA_THEME')),
),
..
3. add note that code requires PHP directive allow_url_fopen = On
4. (optional) Rename field titles to be more in line with google's own metodology - add (..)
;
Also swap those 2 fields, so matches order given by https://www.google.com/recaptcha/admin (helps avoid confusion when users copy-paste values):
"Captcha public key" => "Captcha public key (Site key)"
"Captcha private key" => "Captcha private key (Secret key)"
5. (optional) Given that Composer isn't always available - add note about manually downloading recaptcha-master.zip
( https://github.com/google/recaptcha/ ), extracting src
to module dir, and changing loader code:
//require_once(__DIR__ . '/vendor/autoload.php');
require_once(__DIR__ .'/src/autoload.php');
J'ai essayé d'autres versions de eicaptcha, mais toujours pareil ou bien erreur après installation (que je peux corriger en supprimant le module par ftp et sa référence dans la Base de données)
1.6.0.9
0.4.14
No, default theme
After installing the plugin the contact form does not send messages. Captcha works fine though.
Check module installation says:
1- the module is not registered in hook header
2- no class_index.php found
For n.1: what should I do?
For n.2: I deleted previous "class_index.php" file as suggested but it's not automatically recreated. I tried disabling/cleaning cache but with no luck.
Thanks,
Marco
1.7.3
2.0.4
no - only default
When I check "Check module installation" i got Errors: "contacform.php override does not exists
"
When I check file on the server there is a file in folder overrride/modules/contactform with
<?php
class ContactformOverride extends Contactform
{
public function sendMessage() {
Hook::exec('actionContactFormSubmitBefore');
if ( !sizeof($this->context->controller->errors)) {
parent::sendMessage();
}
}
}
Is there all OK?
[PrestaShop] Fatal error in module file :/home/nanodemo/domains/inovatyvus.lt/public_html/classes/module/Module.php(1242) : eval()'d code:
Can't use function return value in write context
In Prestashop forums it's written that this error is being produced when trying to install modules, made for version 1.7, when having shop v 1.6.xx.
Tried all the versions 0.4.10/0.4.11/0.4.12 from Github depository, all produce the same error. Any ideas?
Hi everyone,
I've just installed this module and integrated with recaptcha api.
But I've got a problem I can't solve.
When I hit the "submit " button it get's stuck in a white screen (error 500 I think) without any response.
I doesn't "return" to the "message sent correctly" screen and it doesn't create the message inside the backoffice either.
[POST https://www.vinoexpres.com/es/contactanos 500 ()]
Could anybody help me please? This is in vinoexpres .com
Thanks in advanced
prestashop > 1.7
2.0.2
Martinlupe
Le recaptcha s'affiche bien, pas de probleme de se cote la, Cependant il n'est pas necessaire de confirmer le recaptcha le message s'envoie quand meme.
Merci probleme resolu avec l'issue#16
-- Mise en place du module avec l'option debug activer
-- Probleme resolu sans rien faire (Magie?)
Merci quand meme
Hello, thank you for the capthca module
I was trying to implement it into my prestashop website (ver. 1.6.0.9), I keep getting the following error:
Uncaught Error: ReCAPTCHA placeholder element must be an element or id
After googling this error, I found out that it is usually caused by the recapthca API being called more than once.
How I installed the module:
I cloned your repo, unzipped it into the modules folder, installed and enabled the module from the prestashop dashboard, pasted my public and secret codes and that is it. I did not edit the contact-form.tpl file (do I need to input the html manually? from what i could tell, i dont have to)
Could you please help me resolve this issue?
Thanks a lot
Hello,
Since introduction of function langSettings in eicaptcha.php this module can not be installed on PrestaShop running on PHP versions lower than 5.5.
This is because of the line
254 if (empty(Configuration::get('CAPTCHA_FORCE_LANG'))) {
.
It passes a function as a parameter to empty
, but prior to PHP v5.5 empty
can only accept variables as parameter. This causes error Can't Use Function Return Value In Write Context
when trying to open modules list from PS BO (PS 1.6).
I believe changing the line to
254 if (!Configuration::get('CAPTCHA_FORCE_LANG')) {
makes the module compatible with versions lower than 5.5 (tested with 5.4).
Line 254 in c4d022b
When i fill quest checkout data it redirects to payment without sending data or checking agreement (no email etc) and returning to cart..strange before it was ok
PS v. 1.6.1.5
Module version 0.4.11
Theme name: Transformer
Hi again,
I've been using this for over a month, and noticed an issue with module sending alert messages to administrators - after eicaptcha was installed, we do not receive emails notifying about new orders and products running out of stock (which are sent by alerts module).
Eicaptcha settings at the moment:
Enable Captcha for contact form:
Enabled
Enable Captcha for account creation:
Disabled
Force Captcha language:
Theme:
Light
Many issues seems to be related with the fact that the module is not well installed
A new functionnality could check the following prerequires directly from the module configuration
1.6.1.5
0.4.11
oui ( theme prestashop : theme1258 version 1.0 )
Bonjour, et merci pour ce plugin !!
installation du plugin, OK
mis les clés ( public / privé ) OK
vider le systeme de cache OK
Mais je n'ai toujours pas le captcha dans mon formulaire de contact.
le div reste vide http://incontinence-chrono.fr/nous-contacter
Pourriez vous m'aider ?
En vous remerciant.
Hi,
1.6.1.4
0.4.14
specialdev212-bootstrap / modified ...
blank Contact page after module install.
Contact page tpl has been modified to include a Google Map (iframe) and some text.
ContactController is also overriden by the FormMaker module.
Module deactivation doesn't help.
When trying to uninstall i get the following error :
[PrestaShop] Fatal error in module file :/path[...]/htdocs/classes/module/Module.php:
Uncaught exception 'ReflectionException' with message 'Class ContactControllerOverrideOriginal_remove5aaa387f3689a does not exist' in /path[...]/htdocs/classes/module/Module.php:2944
Stack trace:
#0 /path[...]/htdocs/classes/module/Module.php(2944): ReflectionClass->__construct('ContactControll...')
#1 /path[...]/htdocs/classes/module/Module.php(2749): ModuleCore->removeOverride('ContactControll...')
#2 /path[...]/htdocs/classes/module/Module.php(647): ModuleCore->uninstallOverrides()
#3 /path[...]/htdocs/modules/eicaptcha/eicaptcha.php(76): ModuleCore->uninstall()
#4 /path[...]/htdocs/controllers/admin/AdminModulesController.php(681): EiCaptcha->uninstall()
#5 /path[...]/htdocs/
The module won't uninstall.
Built-in installation checkup says everything is ok :
Success
the module is compatible with your version the module is well registered in hook header the module is well registered in hook displayCustomerAccountForm the module is well registered in hook contactFormAccess Overrides are enabled on your website ContactController.php override exists ContactController.php override is present in class_index.php
Aditionnal informations
Prestashop version 1.6.1.4 Theme name specialdev212-bootstrap Php version 5.6.31-1+0~20170711121957.3+jessie~1.gbp94bb71
Do you have any idea on how i could at least get the contact page running again ? Or at best, with the module working ?
Thanks anyway for sharing your work !
Versión de PrestaShop: 1.7.2.4
Captcha dont appear on creation step, but required!
Prestashop 1.7.2.4
"branch 17" (2.0.2)
nerva
It works correctly and is displayed in the contact form. But it does not validate the recaptcha. Example, fill all fields and do not check the recaptcha and when I give to send the form is sent. You should not let me send the form with the recaptcha not checked.
Can you make the form validate whether it is checked or not the recaptcha?
installed 0.4.14 ok. reCaptcha appears on contact form and seems to work. But email not sent when you submit the form. Disable for the contact form and emails can be sent.
Have now also tried ver. 0.4.13 with same issue.
1.6.1.0
v0.4.3
Warehouse
Can you help me please? I have this error:
Uncaught Error: ReCAPTCHA placeholder element must be empty
at Object.Qr [as render] (VM5826 recaptcha__pt_pt.js:396)
at onloadCallback (contacte-nos:1296)
at VM5826 recaptcha__pt_pt.js:400
at Br (VM5826 recaptcha__pt_pt.js:391)
at VM5826 recaptcha__pt_pt.js:400
at VM5826 recaptcha__pt_pt.js:411
I'm using composer/installers package to insall prestashop package from composer
.
It would be great if you can create a package.json
file and publish proper versions of your module on Packagist.
I suggest this way:
{
"name": "nenes25/eicaptcha",
"type": "prestashop-module",
"require": {
"composer/installers": "~1.0"
}
}
The prestashop-module
type is not abitrary, this is recognized by composer/installers
package.
Regards.
In contact form, appear the captcha, but no need check, can send mesasage anyway
Once eicaptacha is activated, recapatcha is working well but whenever once puts an order, order does not appear in the order list, it is not even stored in database. However the payment go through (For instance paypal payment is debited) but there is no way to discover or guess what the customer has ordered : no trace of the order! Deactivating eicaptacha module solves the issue.
1.7.2.2 - Your prestashop version
2.0.4 - Eicaptcha Version
classic/modified - Do you use a specific theme
Issue description
Hi
I put the contact form on the cms page in the following way:
/themes/classic/templates/cms/page.tpl
I added:
{if $ cms.id == 8}
{widget name = "contactform"}
{/} If
id == 8 - id cms with contact form
/themes/classic/modules/contactform/views/templates/widget/contactform.tpl
<form action="{$urls.pages.contact}" method="post" {if $contact.allow_file_upload}enctype="multipart/form-data"{/if}>
I exchange for:
{if isset ($ cms) && $ cms.id == 8}
<form action = "{$ link-> getCMSLink (8)}" method = "post" {if $ contact.allow_file_upload} enctype = "multipart / form-data" {/ if}>
} Else {
<form action = "{$ urls.pages.contact}" method = "post" {if $ contact.allow_file_upload} enctype = "multipart / form-data" {/ if}>
{/} If
But unfortunately the recaptcha is not displayed in the contact form on the cms page.
Is there any possibility that eicaptcha would also work on the cms page?
Hello,
Our module does not work (contact form) when form refresh/repost data submited.
Regards,
1.7.3.0
2.0.4
Venas
Hi,
I have installed it, and looks like is working fine, like I have read in another comment, when I check the module appears the error "contacform.php override does not exists", but it is working ok.
What I need now, is to install it for product comments, I tried with your install notes for that, but these notes are for 1.6, in 1.7 doesn't appears that folders.
Thanks in advance!
1.6.1.4
0.4.12
theme1209 version 1.0
The module is installed and configured but captcha box not appear.
In account creation if work correctly.
1.7.2
2.03 - 2.04
Pos_Aboss
Can't install the module, it just gives me a 500 error, i can install every other module just fine. Is just this one that gives me the problem.
Just letting you know this is not working on PS V1.6.0.14
1.6.1.13
0.4.12
no
The module is installed OK, and I tested it OK. If I try sending a message without checking the field, an error message appears. Everything seems to be working right, but a russian robot is still sending messages (I received them today)! Please give a look at my form: https://xadrezshop.com/xadrezshop/entrar-em-contato-conosco
PS 1.6.1.6
0.4.13
Amaltea 1.0
I'd like to try this fantastic module because need to update captcha to V2. I added to modules but can't install it. This is the error:
[PrestaShop] Fatal error in module file :/home/movilpla/public_html/classes/module/Module.php(2794) : eval()'d code:
require_once(): Failed opening required '/home/movilpla/public_html/classes/module/../../../modules/recaptcha/lib/recaptchalib.php' (include_path='/home/movilpla/public_html/tools/htmlpurifier/standalone:.:/opt/alt/php55/usr/share/pear:/opt/alt/php55/usr/share/php')
Also another captcha before maybe let some junk files, I uninstalled and removed it, but one captcha still appears on contact form in my site https://www.movilplanet.eu
Please somebody or creator can help me? Congratulations, very good joob and thanks!
1.6.1.13
module for PS 1.6 and above
no
I downloaded the zip file, and used the function ADD NEW MODULE in prestashop administration (Modules menu). I selected the zip file and sent it. But after that, the module does not appear in the modules list. After sending the module, what I have to do?
If a user has javascript disabled (for example, a bot) eicaptcha does not check captcha to see if it is valid or not. An option would be nice to force you having to fill in the captcha as we have a number of sites being hammered by bots who don't have Javascript enabled.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.