Add Joomla Recaptcha plugin to product contact form

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
7 years 2 months ago #287272

-- HikaShop version -- : 3.2.2
-- Joomla version -- : 3.8.0
-- PHP version -- : 7.1

Is there a way to integrate the joomla recaptcha to the Hikashop product contact form?

Thanks James

Please Log in or Create an account to join the conversation.

  • Posts: 83674
  • Thank you received: 13545
  • MODERATOR
7 years 2 months ago #287283

Hi,

HikaShop has its own recaptcha plugin which can work for HikaShop's registration page, Joomla's registration, HikaShop's contact page and Joomla's contact page:
www.hikashop.com/support/documentation/7...-with-recaptcha.html

Please Log in or Create an account to join the conversation.

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
7 years 2 months ago #287476

Thanks we will give that a try. What is the reason why you have developed your own recaptcha? Are you supporting joomla 1.5 installations?

Please Log in or Create an account to join the conversation.

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
7 years 2 months ago #287490

Just done a quick test on our test server and we have run into a problem. We have acymailing set up using the joomla recaptcha. If we go to a page where we have both the joomla recaptcha and hikashop recaptcha then neither are displayed. We have set up the joomla recaptcha and hikashop recaptchawith different keys.

It would appear that it is possible to have multiple recpatcha on the same page:

https://mycodde.blogspot.it/2014/12/multiple-recaptcha-demo-same-page.html

We have tried with same sitekey too but in both cases if we look in the console log we have Error: Missing required parameters: sitekey

We can set acymailing to user the acymailing captcha but it not as user friendly as the Google Recaptcha.

Is there another work around?

Please Log in or Create an account to join the conversation.

  • Posts: 26226
  • Thank you received: 4035
  • MODERATOR
7 years 2 months ago #287482

Hi,

Are you supporting joomla 1.5 installations?

HikaShop 3 do not officially support Joomla 1.5 but it should continue to work.
But, HikaShop 2.6.4 is still compatible with Joomla 1.5.
And yes, we created that plugin a very long time ago when there was no captcha plugin in Joomla.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: jameswadsworth

Please Log in or Create an account to join the conversation.

  • Posts: 83674
  • Thank you received: 13545
  • MODERATOR
7 years 2 months ago #287500

Hi,

HikaShop 3 do not officially support Joomla 1.5 but it should continue to work.
But, HikaShop 2.6.4 is still compatible with Joomla 1.5.
And yes, we created that plugin a very long time ago when there was no captcha plugin in Joomla.

Regarding the conflict with AcyMailing, I suppose that it's because both captchas use the same div id.
If you edit the file plugins/system/recaptcha2/recaptcha2.php you have that code:

<div id="g-recaptcha" class="g-recaptcha"></div>
<script type="text/javascript">
	grecaptcha.render(\'g-recaptcha\', {\'sitekey\':\''.$pubkey.'\', \'theme\':\''.$theme.'\'});
</script>
try changing g-recaptcha to something else and that should help.
Otherwise, please provide a link to the page so that we can have a look.

The following user(s) said Thank You: jameswadsworth

Please Log in or Create an account to join the conversation.

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
7 years 2 months ago #287540

We literally tried somethingelse the replacement:

<div id="somethingelse" class="somethingelse"></div>
<script type="text/javascript">
	grecaptcha.render(\'somethingelse\', {\'sitekey\':\''.$pubkey.'\', \'theme\':\''.$theme.'\'});
</script>
';
		return '
<script type="text/javascript" src="https://www.google.com/recaptcha/api.js?onload=onloadCallbackHKRecaptcha&render=explicit&hl='.$locale.'" async defer></script>
<script type="text/javascript">var onloadCallbackHKRecaptcha = function() { grecaptcha.render(\'somethingelse\', {\'sitekey\':\''.$pubkey.'\', \'theme\':\''.$theme.'\'}); }; </script>
<div id="somethingelse" class="somethingelse"></div>';

It gets the Joomla Captcha working in AcyMailing but the HikaShop recaptcha still does not show. In this case the google recaptcha does not like being called twice and throws the Error: ReCAPTCHA placeholder element must be empty.

We have tested the Joomla Captcha and it works fine multiple times on the page we will implement that.
Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 83674
  • Thank you received: 13545
  • MODERATOR
7 years 2 months ago #287549

Hi,

I don't see why it wouldn't work like that.
Could you provide a link to the page you're talking about so that we can have a look ?

Please Log in or Create an account to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum