How do we add reCaptcha to the newsletter subscriber box?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 Jahre weitere
We are getting a large number of fake newsletter subscribers.  How do we prevent that?  We have the activation emails enabled but that isn't helping.  We have reCaptcha enabled but it does not appear to be added to the subscriber box.  We are on v4.0.
2 Jahre weitere
Anyone?
2 Jahre weitere
Did anyone find a solution for this ?
1 Jahr weitere
yes i would like to know as well i get about 50 a day! annoying... where is the support for nopcommerce?
1 Jahr weitere
I assume you are referring to the Newsletter Subscribe section in the Footer.  (Since, from what I recall, the only other place to subscribe would be the checkbox when a customer is registering.)

I think adding Captcha in the footer would not look nice, so maybe a there should be a Setting like "Only allow newsletter subscribe for registered customers".  If you want to do similar, the workaround is to use Resolve in the .cshtml page to check the condition - e.g. (not tested, and depends on your version of nopCommerce, and whether you are using a 3rd party theme):

In \Views\Shared\Components\Footer\Default.cshtml, there is
@await Component.InvokeAsync("NewsletterBox")
Wrap that in conditional -
@if (EngineContext.Current.Resolve<IWorkContext>().CurrentCustomer.IsInCustomerRole("Registered"))
  {
     @await Component.InvokeAsync("NewsletterBox")
  }
1 Jahr weitere
Very good point. I'll try this and yes in the footer. Sorry I guess I should of been more details lol. Thanks for the reply.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.