Aw: BUG: Registration Captcha / One Page Checkout
Solution for you:
1. Add in file /components/com_jshopping/templates/addon_checkoutajax/checkoutajax.php after line 55 code:
<?php if ($task == 'register') : ?>
<script type = "text/javascript">
window.addEvent('domready', function() {Recaptcha.create("YOUR_PUBLIC_KEY", "dynamic_recaptcha_1", {theme: "YOUR_THEME(Ex:white)",<?php echo getLanguageForCaptcha(); ?>tabindex: 0});});
</script>
<?php endif; ?>
then on top of this file after
$jshopConfig = JSFactory::getConfig();
add
function getLanguageForCaptcha() {
// Initialise variables
$language = JFactory::getLanguage();
$tag = explode('-', $language->getTag());
$tag = $tag[0];
$available = array('en', 'pt', 'fr', 'de', 'nl', 'ru', 'es', 'tr');
if (in_array($tag, $available))
{
return "lang : '" . $tag . "',";
}
// If the default language is not available, let's search for a custom translation
if ($language->hasKey('PLG_RECAPTCHA_CUSTOM_LANG'))
{
$custom[] ='custom_translations : {';
$custom[] ="\t".'instructions_visual : "' . JText::_('PLG_RECAPTCHA_INSTRUCTIONS_VISUAL') . '",';
$custom[] ="\t".'instructions_audio : "' . JText::_('PLG_RECAPTCHA_INSTRUCTIONS_AUDIO') . '",';
$custom[] ="\t".'play_again : "' . JText::_('PLG_RECAPTCHA_PLAY_AGAIN') . '",';
$custom[] ="\t".'cant_hear_this : "' . JText::_('PLG_RECAPTCHA_CANT_HEAR_THIS') . '",';
$custom[] ="\t".'visual_challenge : "' . JText::_('PLG_RECAPTCHA_VISUAL_CHALLENGE') . '",';
$custom[] ="\t".'audio_challenge : "' . JText::_('PLG_RECAPTCHA_AUDIO_CHALLENGE') . '",';
$custom[] ="\t".'refresh_btn : "' . JText::_('PLG_RECAPTCHA_REFRESH_BTN') . '",';
$custom[] ="\t".'help_btn : "' . JText::_('PLG_RECAPTCHA_HELP_BTN') . '",';
$custom[] ="\t".'incorrect_try_again : "' . JText::_('PLG_RECAPTCHA_INCORRECT_TRY_AGAIN') . '",';
$custom[] ='},';
$custom[] ="lang : '" . $tag . "',";
return implode("\n", $custom);
}
// If nothing helps fall back to english
return '';
}
2. On file /plugins/jshoppingcheckout/checkoutajax/checkoutajax.php after line 28 add code
JHtml::_('script', 'http://www.google.com/recaptcha/api/js/recaptcha_ajax.js');