Knowledge Base

How to add CAPTCHA protection to an OpenCart site

This article describes how to add CAPTCHA protection to an OpenCart site. CAPTCHAs help protect your site from spamming by bots and other malicious actors.

For general information about what CAPTCHAs are and what they do, please see this article.

Adding CAPTCHA protection

To add CAPTCHA protection to an OpenCart site, follow the appropriate procedure for your version of OpenCart.

OpenCart 2.1

To enable CAPTCHA protection for OpenCart 2.1, follow these steps:

  1. Log in to OpenCart as the administrator.
  2. In the left pane, click the OpenCart - Extensions icon icon, and then click Captcha.
  3. In a default installation, OpenCart provides two CAPTCHA options:
    • Basic Captcha: This extension does not require registration with a third-party service.
    • Google reCAPTCHA: To use this extension, you must sign up for a Google reCAPTCHA account if you do not already have one. To do this, please visit https://www.google.com/recaptcha.
  4. For the CAPTCHA extension you want to use, click the Install (OpenCart - Install icon) icon.
  5. Click the Edit (OpenCart - Edit icon) icon:

    • If you are using the Basic Captcha extension:
      • In the Status list box select Enabled, and then click the Save (OpenCart - Save icon) icon.
    • If you are using the Google reCAPTCHA extension:

      • In the Site key text box, type the site key you obtained during registration.
      • In the Secret key text box, type the secret key you obtained during registration.
      • In the Status list box, select Enabled, and then click the Save (OpenCart - Save icon) icon.
  6. In the left pane, click the  OpenCart - Settings icon  icon, and then click Settings.
  7. Select your store, and then click the Edit (OpenCart - Edit icon) icon.
  8. Click the Option tab.
  9. Scroll to the bottom of the page, and then under Captcha, in the Captcha list box, select the extension you want to use.
  10. In the Captcha Page area, select the pages you want to protect with CAPTCHAs.
  11. Click the Save (OpenCart - Save icon) icon. The new settings take effect immediately.