Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - CleanMart (SKU# FLEX-00015)

TOPIC: ReCaptcha 2.0

ReCaptcha 2.0 7 years 9 months ago #14329

Hi,
have you investigated and solved the ReCaptcha 2.0 issue?

If you have somehow identified the problem I might be able to work on it and write a patch.

Thanks,
Bruno
The administrator has disabled public write access.

ReCaptcha 2.0 7 years 9 months ago #14342

Hi,

Yes i did. Actually it was easier than i expected. So, here is what you need to do to enable reCaptcha2.0

To fix it on "modal popup"

- Open this PHP file:
/templates/YOUR_TEMPLATE/html/com_virtuemart/askquestion/form.php

- Look for these lines:
<?php // captcha addition
	if(VmConfig::get ('ask_captcha')){
		JHTML::_('behavior.framework');
		JPluginHelper::importPlugin('captcha');
		$dispatcher = JDispatcher::getInstance(); $dispatcher->trigger('onInit','dynamic_recaptcha_1');
		?>
		<div id="dynamic_recaptcha_1"></div>
	<?php 
	}
	// end of captcha addition 
?>

- replace them with these:
<?php // captcha addition
	echo $this->captcha;
// end of captcha addition 
?>

To fix it on "TAB" on product details page

Open these PHP files:
/templates/YOUR_TEMPLATE/html/com_virtuemart/productdetails/default.php
/templates/YOUR_TEMPLATE/html/com_virtuemart/productdetails/flexv2.php

- In both files, look for these lines:
<?php // captcha addition
	if(VmConfig::get ('ask_captcha')){
		JHTML::_('behavior.framework');
		JPluginHelper::importPlugin('captcha');
		$dispatcher = JDispatcher::getInstance(); $dispatcher->trigger('onInit','dynamic_recaptcha_1');
		?>
		<div id="dynamic_recaptcha_1"></div>
	<?php 
	}
	// end of captcha addition 
?>

- replace them with these:
<?php // captcha addition
	echo shopFunctionsF::renderCaptcha('ask_captcha');
// end of captcha addition 
?>


and you will be good to go.

Regards.
The administrator has disabled public write access.

ReCaptcha 2.0 7 years 9 months ago #14344

I tried your solution but it doesn't work.
Nor in modal window, nor in the tabbed version...

I couldn't find the renderCaptcha function in any file.
I'm using VM 3.0.12, I guess you are using a more recent version.

In any case I found out that it's a Joomla problem and you may find a solution here:
forum.joomla.org/viewtopic.php?f=710&t=874688&start=30#p3385872

Thanks,
Bruno
Last Edit: 7 years 8 months ago by Bruno Ortolani.
The administrator has disabled public write access.

ReCaptcha 2.0 7 years 8 months ago #14349

Hi,

I tested this approach on VM3.0.16 + J3.5.1 and it works just fine. Why do you use VM3.0.12 anyway (or J3.4.x)? Is there a specific reason? You should better upgrade Virtuemart to VM3.0.16 and Joomla to J3.5.1

regards.
The administrator has disabled public write access.
Time to create page: 0.202 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo