Closed framethrower closed 3 years ago
Hi, Thanks for the feedback , i'll check if and how it is possible to fix it without touching core files.
Regards,
Hello, I've done something like this - a bypass.
Added input in hookDisplayCustomerAccountForm.tpl for compatibility with order-opc.js:
<input type="hidden" id="recaptcha-hidden" name="g-recaptcha-response" />
And rewrite a little eicaptcha.js to assign value:
$("#submitAccount, #submitGuestAccount").on("click", function () {
var recap = grecaptcha.getResponse();
$('#recaptcha-hidden').val(recap);
//Affichage du message de chargement
if ($(".load").length)
$(".load").html("").html(waiting_message);
else
$(this).after("<div class=\"load\">" + waiting_message + "</div>");
//Vérification du captcha
if (!recap) {
$.ajax({
method: "POST",
url: checkCaptchaUrl,
data: "action=display_captcha_error",
success: function (msg) {
$(".load").html("");
/* This doesn't work for me
$(errorSelector).remove();
//There's no #account-creation_form, but #opc_new_account
$(formSelector).before(msg);
$("html, body").animate({scrollTop:$(errorSelector).offset().top },"slow");
*/
formSelector = $(".load");
$(formSelector).html("<br>" + msg);
}
});
//Optional: commented for keep processing
//return false;
}
else {
$(".load").html("");
}
});
I'm not getting results with any of these fixes. Maybe something to do with the response format (the error box doesn't update for example). Anyone else?
Hi,
Please see #100 , for a quick fix i've removed the captcha on the opc checkout page. A new relase will be publish once i've some confirmations that everything works well ;)
Regards,
Looks good to me. Thanks again!
Your prestashop version
1.6.1.23
Eicaptcha Version
0.4.16, but that's not important
Do you use a specific theme
(Customized) default-bootstrap
Issue description
We are using (a somewhat customized) One-Page-Checkout.
There is one issue that could be resolved using metacreo's workaround.
But another issue is, that "#g-recaptcha-response"-textarea is not processed in /themes/default-bootstrap-77designz/js/order-opc.js. That means that the response from google will not be available in $_POST in hookActionBeforeSubmitAccount() in eicaptcha.php
I had to insert the following line on line 178 of order-opc.js:
I'm not sure how to fix this issue from within the eicaptcha-module, as the core template is at fault here. I noticed that regular text-inputs are not affected. But i don't know if the google recaptcha can be convinced to use a text-input instead of a textarea.
Just wanted to let you know.
Thx for your work! :)