How to enable SSL connection in Opencart?

Discussion in 'Opencart Support' started by BestWebsitesDesigner1, May 29, 2013.

  1. BestWebsitesDesigner1

    BestWebsitesDesigner1 UKBF Newcomer Free Member

    4 1
    I want to enable SSL connection in Opencart. Can anyone tell me how should I do that?
     
    Posted: May 29, 2013 By: BestWebsitesDesigner1 Member since: May 28, 2013
    #1
  2. peggyp

    peggyp UKBF Newcomer Free Member

    24 5
    First, you need to understand that, Opencart does not support the use of shared SSL. You will require to edit three different areas in OpenCart to enable SSL. Here are those 3 areas:

    Enable SSL in OpenCart Dashboard

    By login to OpenCart dashboard, you can enable SSL by visiting server tab

    Enable SSL in OpenCart in OpenCart Directory Config.php file

    Check OpenCart Installed Directory through FTP or file manager in Cpanel. Locate config.php file and click to edit it. Now locate line below //HTTPS which will look like:

    Code:
    define('HTTPS_SERVER', 'http(://)opencart.test.com/');
    define('HTTPS_IMAGE', 'http(://)opencart.test.com/image/');
    Edit them with HTTPS

    Code:
    define('HTTPS_SERVER', 'https(://)opencart.test.com/');
    define('HTTPS_IMAGE', 'https(://)opencart.test.com/image/');
    And save this file.

    Enable SSL in OpenCart Admin Folder Config.php file

    Goto admin and locate config.php file and look for //HTTPS, you will fine below lines

    Code:
    define('HTTPS_SERVER', 'http(://)opencart.test.com/admin/');
    define('HTTPS_CATALOG', 'http(://)opencart.test.com/');
    define('HTTPS_IMAGE', 'http(://)opencart.test.com/image/');
    and edit them with HTTPS

    Code:
    define('HTTPS_SERVER', 'https(://)opencart.test.com/admin/');
    define('HTTPS_CATALOG', 'https(://)opencart.test.com/');
    define('HTTPS_IMAGE', 'https(://)opencart.test.com/image/');
    and it’s done !!

    Note: i am not allowed to post URL so i have placed :)//) in URL, Kindly ignore them
     
    Posted: May 29, 2013 By: peggyp Member since: Apr 8, 2013
    #2
  3. Nico Albrecht

    Nico Albrecht UKBF Regular Full Member - Verified Business

    387 45
    check your opencart contact us form mine got broken after going to ssl and doesn't send emails anymore.
     
    Posted: Feb 24, 2018 By: Nico Albrecht Member since: May 2, 2017
    #3
  4. webhostuk

    webhostuk UKBF Ace Full Member - Verified Business

    1,348 164
    SSL URL should not affect emails, might be it was due some other modifications.
     
    Posted: Feb 24, 2018 By: webhostuk Member since: Jul 26, 2009
    #4
  5. intellectoutsource

    intellectoutsource UKBF Newcomer Free Member

    5 0
    The one of main point to care while enabling the SSL in opencart is that, you should be careful to re-direct all Urls from http to https.

    Otherwise, it may affect the store SEO.
     
    Posted: Sep 20, 2018 By: intellectoutsource Member since: Jul 9, 2018
    #5
  6. Inva

    Inva UKBF Regular Free Member

    196 29
    I dont know whether this must also be set inside OpenCart but this code should do it through .htaccess

    Code:
    # redirect http to https
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
    This will redirect all http requests to their https equivalent.
     
    Posted: Sep 20, 2018 By: Inva Member since: Aug 10, 2018
    #6