News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Recaptcha not showing reg page

Started by futureclient, April 05, 2019, 10:54:47 AM

Previous topic - Next topic

futureclient

Hi,

I'm having an issue with one of my clients sites where the recaptcha isn't showing on the billing registration page, however it is showing on the standard registration page:

https://www.fragrantfinds.com/products/user/bill_address - not showing
https://www.fragrantfinds.com/products/user (/registration) - showing

When trying to submit on the bill address reg page, it comes up with the page:
"Oops!0 - Please complete the CAPTCHA"
Customers are having issues creating accounts because of this.

I remember editing the normal /registration page layout (as the text is larger), and you can see the difference on the bill reg page.

I assume I need to add some code, but I'm not sure where to go, could someone advice. I thought about setting a redirect, but this doesn't fix the issue.

Thanks :)

Joomla version -  3.9.4
VirtueMart - 3.4.2
Recaptcha -  V2

jenkinhill

Maybe replace your user override(s) with the default user template(s) to get the reCap back again and then edit again if you need to restore your old changes.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

futureclient

#2
Quote from: jenkinhill on April 05, 2019, 12:25:54 PM
Maybe replace your user override(s) with the default user template(s) to get the reCap back again and then edit again if you need to restore your old changes.

Could you tell me where this would be in the files, I literally cannot find the area which I edited the text to be bigger.

In /templates/template/html/com_virtuemart/user/edit.php however, I found this at the bottom:
  } else {
    echo $this->loadTemplate ( 'shopper' );
echo $this->captcha;
// captcha addition
/*if(VmConfig::get ('reg_captcha')){
JHTML::_('behavior.framework');
JPluginHelper::importPlugin('captcha');
$dispatcher = JDispatcher::getInstance(); $dispatcher->trigger('onInit','dynamic_recaptcha_1');
?>
<div id="dynamic_recaptcha_1"></div>
<?php
}*/
 }


I think this has something to do with it? - its disabled so..

If not could you share the location where I need to go

Regards

jenkinhill

And also edit_address.php  - for registration from cart, edit.php is for direct registration.

I'd use css overrides to change text size.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

futureclient

Quote from: jenkinhill on April 05, 2019, 16:39:10 PM
And also edit_address.php  - for registration from cart, edit.php is for direct registration.

I'd use css overrides to change text size.

Inside the edit_address.php there is a different recaptcha code:

<?php // captcha addition
if(VmConfig::get ('reg_captcha')){
JHTML::_('behavior.framework');
JPluginHelper::importPlugin('captcha');
$captcha_visible vRequest::getVar('captcha');
$dispatcher JDispatcher::getInstance(); $dispatcher->trigger('onInit','dynamic_recaptcha_1');
$hide_captcha = (VmConfig::get ('oncheckout_only_registered') or $captcha_visible) ? '' 'style="display: none;"';
?>

<fieldset id="recaptcha_wrapper" <?php echo $hide_captcha ?>>
<?php if(!VmConfig::get ('oncheckout_only_registered')) { ?>
<span class="userfields_info"><?php echo vmText::('COM_VIRTUEMART_USER_FORM_CAPTCHA'); ?></span>
<?php ?>
<div id="dynamic_recaptcha_1"></div>
</fieldset>
<?php }
// end of captcha addition


I tried removing it and also changing it to what I have on the edit.php file, but it ether didn't work or straight-up caused the "Oops!0" error.
What should I do ???

futureclient

#5
I found the issue.
I literally only had to add echo $this->captcha; into the bottom of the edit_address.php file.