Install SSL Certificate in OpenCart

Installing a SSL certificate is a breeze in the open source e-commerce system OpenCart.

  • First make sure you purchase a SSL or Secure Certificate and that it is activated for your domain where OpenCart is installed.
  • Next, login to to the admin section of your OpenCart site at http://www.example.com/admin/.
  • Then go to System > Settings, Click the Server tab, and check the radio button to use SSL.
  • Next you will need to connect to your domain with an FTP program such as FileZilla or access the config.php files in your cPanel.
  • Edit the config.php file and change the “http” to “https” on the following two lines.  Then save the file.
define('HTTPS_SERVER', 'https://www.example.com/');
define('HTTPS_IMAGE', 'https://www.example.com/image/');
  • Next open the /admin/ directory and edit the config.php similar to the previous step. Then save this file.
define('HTTPS_SERVER', 'https://www.example.com/');
define('HTTPS_IMAGE', 'https://www.example.com/image/');
  • That’s it! SSL is setup.

Important Notes:

  • It is important to remember that OpenCart does not require that all pages use “https” in the URL like most e-commerce solutions.  It does, however, force it when a user signs in or during the checkout process.
  • Also, if you get errors that say something about “unsecured content” then somewhere on your page you have a hardcoded url to images, CSS files, or other content of “http.”  To solve, view the source on the page where you are receiving the error and search for “http”.  You’ll notice that most are “https”.  Fix all the occurrences that are not “https”.

Related Stuff

Eliot is a software developer by trade and a entrepreneur by spirit. He has built web software for the likes of YMCA, UPS, FedEx, Ford and Harcourt, and helped launch mobile apps like Coupon Policy, TourWrist, and Pocket Legal.

Join him as he learns and shares his experiences of marketing his own products online.

Subscribe via RSS
@EliotDill

Leave a Reply