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
  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:

    define('HTTPS_SERVER', 'http(://)');
    define('HTTPS_IMAGE', 'http(://)');
    Edit them with HTTPS

    define('HTTPS_SERVER', 'https(://)');
    define('HTTPS_IMAGE', 'https(://)');
    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

    define('HTTPS_SERVER', 'http(://)');
    define('HTTPS_CATALOG', 'http(://)');
    define('HTTPS_IMAGE', 'http(://)');
    and edit them with HTTPS

    define('HTTPS_SERVER', 'https(://)');
    define('HTTPS_CATALOG', 'https(://)');
    define('HTTPS_IMAGE', 'https(://)');
    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
  3. Nico Albrecht

    Nico Albrecht UKBF Enthusiast Full Member - Verified Business

    529 79
    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
  4. webhostuk

    webhostuk UKBF Ace Full Member - Verified Business

    1,371 166
    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
  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
  6. Inva

    Inva UKBF Regular Free Member

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

    # 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
  7. EddyRock

    EddyRock UKBF Newcomer Free Member

    11 2
    I have just done this in my OpenCart store. You can change it manually following these steps:
    1. Access "setting" table your OpenCart database, change the value of config_secure to 1.
    2. At OpenCart store's root folder, open your config.php and admin/config.php files, change all the store url to HTTPS.
    3. Register SSL certificate in your web server.
    That's it.
    Posted: Jul 23, 2019 By: EddyRock Member since: Jul 23, 2019