How to enable SSL connection in OpenCart 1.5

Please keep in mind OpenCart does not support the use of the shared SSL certificate.

To enable SSL in OpenCart, there are three areas to edit: The System Settings in the OpenCart Dashboard, the config.php file in the directory where you installed OpenCart, and the config.php file in your OpenCart Admin folder.

Enabling SSL in the OpenCart Dashboard

  1. Log into the OpenCart Dashboard
  2. Go to System > Settings
  3. Click on the Server tab
  4. Check the radio button to use SSL

Enabling SSL in the OpenCart directory config.php file

  1. Log into cPanel and go to File Manager
  2. Navigate to your OpenCart installation directory
  3. Open (Edit or Code Editor) the configuration file (config.php)
  4. Look for the lines below // HTTPS that looks similar to this:

    define('HTTPS_SERVER', 'http://mydomain.com/');
    define('HTTPS_IMAGE', 'http://mydomain/image/');

  5. Edit the HTTPS settings to reflect your SSL URL path. For example:

    define('HTTPS_SERVER', 'https://mydomain.com/');
    define('HTTPS_IMAGE', 'https://mydomain/image/');

  6. Save changes and close the config.php file

Enabling SSL in the OpenCart Admin folder config.php file

  1. Go to the “Admin” folder
  2. Open (Edit or Code Editor) the configuration file (config.php)
  3. Look for the lines below // HTTPS that looks similar to this:

    define('HTTPS_SERVER', 'http://mydomain.com/admin/');
    define('HTTPS_CATALOG', 'http://mydomain.com/');
    define('HTTPS_IMAGE', 'http://mydomain.com/image/');

  4. Edit the HTTPS settings to reflect your SSL URL path. For example:

    define('HTTPS_SERVER', 'https://mydomain.com/admin/');
    define('HTTPS_CATALOG', 'https://mydomain.com/');
    define('HTTPS_IMAGE', 'https://mydomain.com/image/');

  5. Save changes and close the config.php file
Now, anytime you login to your dashboard or a visitor purchases a product it will force the SSL for security purposes.
  • 3 Users Found This Useful
Was this answer helpful?