Manage cookies that are used for advertising, such as ad personalization, remarketing, and ad effectiveness analysis.
2.14.3.8. Configure HTTPS in OpenCart
- Check if an SSL certificate is installed in SSL settings. If the certificate is not installed, install it.
- Edit two configuration files:
- In the
config.phpfile located in the site root directory, find the line with theHTTPS_SERVERparameter:// HTTPS define('HTTPS_SERVER', 'http://example.com/');In the address specified in it, replace HTTP with HTTPS so that it looks as follows:
// HTTPS define('HTTPS_SERVER', 'https://example.com/'); - In the
config.phpfile in theadmindirectory, find lines withHTTPS_SERVERandHTTPS_CATALOGparameters:// HTTPS define('HTTPS_SERVER', 'http://example.com/admin/'); define('HTTPS_CATALOG', 'http://example.com/');Replace HTTP with HTTPS in the addresses specified in them so that they look as follows:
// HTTPS define('HTTPS_SERVER', 'https://example.com/admin/'); define('HTTPS_CATALOG', 'https://example.com/');
- Enable SSL support in the admin panel of the site itself:
- Open the site admin panel.
- Go to "System → Settings".
- To the right of the store name, click "Edit".
- Switch to the "Server" tab.
- Next to "Use SSL", select "Yes".
- Save changes by clicking "Save" in the upper-right corner of the page.
- Enable redirect to HTTPS.
- Check the site operation.
In most cases, the actions described above are sufficient to enable HTTPS on your site.
If you use OpenCart 2.2 and the described actions are not sufficient, see additional HTTPS configuration in OpenCart 2.2.