2.14.3.1.1. Mixed content

If you encounter a mixed content issue in OpenCart, try the following:

  1. Make sure that settings in site configuration files are specified correctly:
    • File config.php:
      define('HTTP_SERVER', 'https://<your site>');
      define('HTTP_IMAGE', 'https://<your site>');
      
      define('HTTPS_SERVER', 'https://<your site>');
      define('HTTPS_IMAGE', 'https://<your site>'); 
    • File admin/config.php:
      define('HTTP_SERVER', 'https://<your site>');
      define('HTTP_CATALOG', 'https://<your site>');
      
      define('HTTPS_SERVER', 'https://<your site>');
      define('HTTPS_CATALOG', 'https://<your site>');
  2. In control panel enable redirect from HTTP to HTTPS.
  3. If optimization settings are enabled, disable them. combine_* options can cause issues because they do not work with HTTPS.
  4. Make sure that redirect to address with www or without www matches the address specified in site configuration files, or is disabled.
المحتوى