Recaptcha in the middle of the registration form

  • Posts: 31
  • Thank you received: 0
7 years 5 months ago #270781

-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.7.2

Hello,

due the increasing number of accounts from some dubious russion e-mail addresses I was looking into recaptcha. I found a plugin on your site
( www.hikashop.com/21-documentation/hikash...-with-recaptcha.html )

Install went fine. Seems to work fine, but there is a small issue.

It is display between the user details and the address details on the registration page.

Is there a possibility to move it to the end of the registration process, right bevor the register button?

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 5 months ago #270786

Hi,

Supposing that you're using the new checkout of HikaShop (setting "checkout legacy" turned off" in the HikaShop configuration), you can just change the line:
$after = ($this->params->get('fieldafter','password') == 'email') ? 'top' : 'middle';
to:
$after = 'bottom';
in the file plugins/system/recaptcha2/recaptcha2.php and that will do it.

The following user(s) said Thank You: Jim

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

  • Posts: 31
  • Thank you received: 0
7 years 5 months ago #270875

That's it. Thank you.

Another question regarding spam. Is there a plugin for hikashop registration where I can bann certain domains from registration when input in e-mail field during registration.

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 5 months ago #270877

Hi,

HikaShop is compatible with the Joomla user system.
So normally, such plugin should allow you to do that even with the HikaShop registration form:
extensions.joomla.org/extension/domainrestriction/

The following user(s) said Thank You: Jim

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

  • Posts: 56
  • Thank you received: 2
6 years 8 months ago #288822

I tried what you mentioned above , but since then I think the code has changed.

So thought I'd use a quick work around using a little jQuery to make it happen:
Like so:

$('.hikashop_registration_required_info_line').after($('.recaptcha'));
n.b: the first selector is class of the div you want to append the recaptcha div to.

Tried and tested.

V.

Last edit: 6 years 8 months ago by vseva. Reason: Found a better jquery function: after()

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
6 years 8 months ago #288827

Hi,

The code indeed changed because we've added the choice "Address" in the "Display captcha after" setting of the ReCaptcha plugin.
That way, you can actually display the captcha after the address (so at the end of the registration form) without adding/changing any code.

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

  • Posts: 56
  • Thank you received: 2
6 years 8 months ago #288872

Sweet !!

I look forwards to that feature once I do bit of long needed upgrading.

Thx for the reply.

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

Time to create page: 0.071 seconds
Powered by Kunena Forum