Registration form not checking Recaptcha validation

If you are runnig Joomla 3.x and Virtuemart 3.x please post to this forum your questions or support tickets about One Page Checkout

Registration form not checking Recaptcha validation

Postby removed1623589245 » Wed Feb 25, 2015 11:19 pm

I've installed Virtuemart 3, Joomla 3, this OPC extension and the New Recaptcha plugin.
https://techjoomla.com/the-new-recpatch ... oomla.html

Now I want to add this new Recaptcha plugin to the registration form.
/components/com_onepage/helpers|registration_templates.php

I can get the plugin displayed in the form, but if I push the "register" button and just registers ok without having filled in the Recaptcha.
So there's no check in the form if the Recaptcha is a success.

- Can anyone give me advise how I achieve this form to check if the Recaptcha has a succesfull input?
or
- Can anyone give me a code how to show the register button after a successfull Recaptcha input?

Thank you in advance!
removed1623589245
 
Posts: 3
Joined: Mon Dec 22, 2014 6:09 pm

Re: Registration form not checking Recaptcha validation

Postby admin » Thu Feb 26, 2015 4:20 pm

hello jorg, we did changes in captcha handling at registration in latest releases.

as far as your captcha shows, the form is then processed with opc's controller here:
\components\com_onepage\controllers\opc.php

in function:
function opcregister()

which does:
$this->checkVM2Captcha('index.php?option=com_virtuemart&view=user');

which calls:
either VM code (if enabled by VmConfig::get ('reg_captcha'))

$recaptcha = JRequest::getVar ('recaptcha_response_field');
JPluginHelper::importPlugin('captcha');
$dispatcher = JDispatcher::getInstance();
$res = $dispatcher->trigger('onCheckAnswer',$recaptcha);


or generic code:

JPluginHelper::importPlugin('captcha');
$dispatcher = JDispatcher::getInstance();
$code = '';
$returnValues = $dispatcher->trigger('onCheckAnswer', array($code));

let us know if you find any issues with this.

also pls check your captcha plugin - which event it listens on...

best regards,stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

Re: Registration form not checking Recaptcha validation

Postby removed1623589245 » Fri Feb 27, 2015 11:10 pm

Dear admin,

Thank you for your response.
I think I found the answer to my problem, with a quite simple solution...

I installed the 3rd party extension "the New Recaptcha", because of the new version of Google's Captcha (Recaptcha v2).
Since the new Joomla version (v3.4), which came this week), the default captcha plugin in Joomla is now Recaptcha v2!
So I uninstalled the 3rd party extension and set Joomla's default captcha as the captcha-default in the Main Settings and User Settings.
I also upgraded my OPC version from (2.0.280) to (2.0.284.260215).
This fixed my problem!

There are only 2 things...
- the layout I made in the file registration_templates.php is gone (too bad, but is not the end of the world)
- the update deleted all the files in the folders "/components/com_onepage/views/add_shopper" and "/components/com_onepage/views/registration_complete".
Because of this I get an error when I try to register with all fields filled in OK. It says it cannot load the template file for "/components/com_onepage/views/registration_complete/".
I solved this by copying the files from an backup of the old version...

Hope this helps the people with the same problem....
removed1623589245
 
Posts: 3
Joined: Mon Dec 22, 2014 6:09 pm

Re: Registration form not checking Recaptcha validation

Postby admin » Tue Mar 03, 2015 4:01 pm

hello jorg, all of the files that you modified come with opc's core.

i strongly suggest to use opc's renamed theme to do the styling:
- /compoentns/com_onepage/themes/YOUR OPC THEME/onepage.registration.tpl.php (this file is now part of the bandbox theme, so you may want to copy it from there) This file is loaded from the registration_templates.php so you can drop it's previous content to the theme file
- add_shopper (which is used for vendor's adding new shoppers only)
- registration_complete

can be fully overriden with your joomla themes (as they are not really part of the checkout) and thus you should use joomla's overrides into:

/templates/YOUR JOOMLA THEME/html/com_onepage/registration_complete/default.php
/templates/YOUR JOOMLA THEME/html/com_onepage/add_shopper/default.php (this file loads onepage.registration.tpl.php if found, if not it uses default html from registration_templates.php but it's not recommended to use the core file)
/templates/YOUR JOOMLA THEME/html/com_onepage/add_shopper/default_header.php (for the CSS and javascripts)



in short all of your modifications can survive opc updates with:
/componetns/com_onepage/themes/YOUR OPC THEME/onepage.registration.tpl.php
/templates/YOUR JOOMLA THEME/html/com_onepage/add_shopper/default_header.php
/templates/YOUR JOOMLA THEME/html/com_onepage/add_shopper/default.php


if are missing any vars or anything else, let us know and we can add it there.

best regards, stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm


Return to One Page Checkout for Virtuemart 3 on Joomla 3.x

cron