Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Spam, Fake accounts and how to stop them.


Recommended Posts

We have a big problem with spam and fake accounts on Phoenix sites, so what can we do? Well found some time to hook Google reCAPTCHA V2 for Phoenix so everyone can make use of it.

I have installed and tested on Phoenix but as this is critical to comunincation with your customers I'm not going to post in the app's untill it's been tested by a few others. So here we go.

JcM Google reCAPTCHA V2 Phoenix V1.0

A simple add-on to let add the Google reCAPTCHA V2 to any form in Phoenix that has the hooks added to it.

It is a no core change add-on and uses site-wide hooks. Simply copy all the files over. You will need your Google reCAPTCHA so you can add them to the following file


Just open it in your editor and add the comment and keys into it


define('MODULE_CONTENT_RECAPTCHA_ERROR','Sorry you need to prove you are human first please complete the google captcha');

define('MODULE_CONTENT_RECAPTCHA_SITEKEY','Place your site key here');

define('MODULE_CONTENT_RECAPTCHA_SECRETKEY','Place your Secret key here');

That’s it it should just work. When you go to your contact_us page you should see the Google reCAPTCHA


Can be see working on this site

Thank's to @Gyakutsuki for helping to debug this.




JcM Google reCAPTCHA V2 Phoenix V1.0.zip


Link to comment
Share on other sites

Hi @JcMagpie

Does this addon work in Frozen? I know that Frozen has site-wide hooks, I guess it should work too, what do you think?
 I still don't have Phoenix installed due to the big changes it is having, so  I can not test on it.

I will await for your response before test.

Thank you


:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.


Link to comment
Share on other sites

Frozen contact_us.php definitely doesn't contain that code. Conclusion is not compatible with frozen (Only if someone knows how to include that code in Frozen contact_us.php).

I'm going to install next week last Phoenix and I will try it.

Best Regards and great weekend.


:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.


Link to comment
Share on other sites

13 minutes ago, valquiria23 said:

Conclusion is not compatible with frozen

Yes I did not think it was. You would also need to make changes to the template_top and application-top also I would think. You would have to check on github to see changes from Frozen to Phoenix for the hooks.


Link to comment
Share on other sites

Thakyou for testing. Have made a small update so that you can now add a accept terms hook as well if required. Customer can click and read short or full privacy statment and must toggle slider to proceed.The Privacy hook is optional as many site have just a simple text statment that by proceeding and using the form you agree to terms.


Agian feel free to down load and test and if it's stable will upload to app's at some point.

JcM Google reCAPTCHA V2 with Terms Phoenix V1.3.zip


Link to comment
Share on other sites

Well meant advice;

You have multiple hook files performing the catcha routine ... this can be done from one hook file.   

Take a look at the core bootstrap example where it is placing "stuff" in two different locations;

Having just one File with all the hooks (for a given "XYZ" [in this case captcha]) in it, is;

  • simpler for you in terms of support
  • simpler for user in terms of having to upload/delete etc
    let us say that the user wanted to not use your captcha anymore, and deleted the file that displays the form...the other files gets missed somehow...they have a broken site.  Not good for them [loss of potential sales], not good for you [support issues], etc etc

Hooks are a big part of Phoenix' future, so well done on being one of the pioneers of them.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...