Checkout Registration reCAPTCHA
In order to integrate the new reCaptcha into user registration in Checkout follow these steps:
1. In modules\prodcatalogueorder\templates\login-register.html replace the old captcha:
<div class = "form-row" > <label>Enter the code<span class = "require-star" >*</span></label> <label><img src= "/index.php?action=register&form_action=show_captcha" alt= "Captcha" /></label> <input class = "text" type= "text" name= "captcha_code" value= "" /> </div> |
With the new one:
<{ if $use_recaptcha eq 'on' }> Use reCaptcha <{ if is_object ( $recaptcha )}> <div class = "form-item" > <label for = "captcha_code" >Not a Bot?:<em>*</em></label> <{ $recaptcha ->show( 'captcha1' )}> </div> <{/ if }> <{/ if }> |
2. In 'register_frm' add this hidden field:
<input type= "hidden" name= "return_here_on_error" value= "on" > |
3. Lastly, in order to display the error messages use this code somewhere outside 'register_frm' form:
<{ if (isset( $error_msg ))}> Errors: <div> <{ $error_msg }> </div> <{/ if }> |
Please note that '$use_recaptcha' is controlled in config of 'Register' module: