Post by ojars26 » Wed May 25, 2016 5:49 am

Hi!

Older version Opencart steps 1-3 to enable SSL.
New version Opencart steps 1-5 to enable SSL

Hope it helps! :)

Step 1: Admin panel->System->Settings-(Action)Edit->Server->Use SSL->Yes "Save and Exit"
Step 2: yourshopfolder->config.php->

find line:

Code: Select all

// HTTPS
define('HTTPS_SERVER', 'http://www.yourshop.com/');
change to:

Code: Select all

// HTTPS
define('HTTPS_SERVER', 'https://www.yourshop.com/');
Step 3: yourshopfolder->admin->config.php->

find line:

Code: Select all

// HTTPS
define('HTTPS_SERVER', 'http://www.yourshop.com/admin/');
define('HTTPS_CATALOG', 'http://www.yourshop.com/');
change to:

Code: Select all

// HTTPS
define('HTTPS_SERVER', 'https://www.yourshop.com/admin/');
define('HTTPS_CATALOG', 'https://www.yourshop.com/');
Step 4: yourshopfolder->system->config->admin.php

find line:

Code: Select all

$_['site_ssl']          = false;
change to:

Code: Select all

$_['site_ssl']          = true;
Step 5: yourshopfolder->system->config->catalog.php

find line:

Code: Select all

$_['site_ssl']          = false;
change to:

Code: Select all

$_['site_ssl']          = true;
All Done! Ctrl+F5 refresh page if need!

User avatar
Newbie

Posts

Joined
Wed May 25, 2016 5:04 am

Post by readconsult » Tue May 31, 2016 11:03 pm

It seems that this latest version of OpenCart (2.2.0.0) has many bugs related to the admin settings pages not actually changing system settings in the required files. This is my first version of OC and it has been like this for months, it was probably really easy to patch... why is an update taking so long?

Newbie

Posts

Joined
Fri Feb 26, 2016 3:13 am

Post by pm-netti » Wed Jun 01, 2016 3:58 am

readconsult wrote:It seems that this latest version of OpenCart (2.2.0.0) has many bugs related to the admin settings pages not actually changing system settings in the required files. This is my first version of OC and it has been like this for months, it was probably really easy to patch... why is an update taking so long?
Substantive SSL issue in 2.2.0.0 is replace 'http' to 'https'.
This file fix it:
https://github.com/pekka2/OpenCart-Migr ... .ocmod.xml

to this way:

Code: Select all

<file path="admin/controller/sale/order.php">
<operation>
<search><![CDATA[$this->request->server['HTTPS'] ? str_replace("http", "https", $order_info['store_url']) : $order_info['store_url'];]]></search>
<add position="replace"><![CDATA[$this->request->server['HTTPS'] ? str_replace("http://", "https://", $order_info['store_url']) : $order_info['store_url'];]]></add>
</operation>
</file>
This is fixed to Opencart next version.

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by nootkan » Fri Jun 03, 2016 12:55 am

pm-netti wrote:
readconsult wrote:It seems that this latest version of OpenCart (2.2.0.0) has many bugs related to the admin settings pages not actually changing system settings in the required files. This is my first version of OC and it has been like this for months, it was probably really easy to patch... why is an update taking so long?
Substantive SSL issue in 2.2.0.0 is replace 'http' to 'https'.
This file fix it:
https://github.com/pekka2/OpenCart-Migr ... .ocmod.xml

to this way:

Code: Select all

<file path="admin/controller/sale/order.php">
<operation>
<search><![CDATA[$this->request->server['HTTPS'] ? str_replace("http", "https", $order_info['store_url']) : $order_info['store_url'];]]></search>
<add position="replace"><![CDATA[$this->request->server['HTTPS'] ? str_replace("http://", "https://", $order_info['store_url']) : $order_info['store_url'];]]></add>
</operation>
</file>
This is fixed to Opencart next version.
What file do we make the above changes to? Do I need to ignore the previous 5 steps and just follow the last post? I am also starting a new project using a ssl certificate and wish to nip the ssl issues in the bud before I start creating products etc.

New member

Posts

Joined
Mon May 26, 2014 5:21 am

Post by pm-netti » Fri Jun 03, 2016 8:11 pm

nootkan wrote:
pm-netti wrote:
readconsult wrote:It seems that this latest version of OpenCart (2.2.0.0) has many bugs related to the admin settings pages not actually changing system settings in the required files. This is my first version of OC and it has been like this for months, it was probably really easy to patch... why is an update taking so long?
Substantive SSL issue in 2.2.0.0 is replace 'http' to 'https'.
This file fix it:
https://github.com/pekka2/OpenCart-Migr ... .ocmod.xml

to this way:

Code: Select all

<file path="admin/controller/sale/order.php">
<operation>
<search><![CDATA[$this->request->server['HTTPS'] ? str_replace("http", "https", $order_info['store_url']) : $order_info['store_url'];]]></search>
<add position="replace"><![CDATA[$this->request->server['HTTPS'] ? str_replace("http://", "https://", $order_info['store_url']) : $order_info['store_url'];]]></add>
</operation>
</file>
This is fixed to Opencart next version.
What file do we make the above changes to? Do I need to ignore the previous 5 steps and just follow the last post? I am also starting a new project using a ssl certificate and wish to nip the ssl issues in the bud before I start creating products etc.
If some did this change:
find line:

Code: Select all

// HTTPS
define('HTTPS_CATALOG', 'http://www.yourshop.com/');
change to:

Code: Select all

// HTTPS
define('HTTPS_CATALOG', 'https://www.yourshop.com/');
Then inevitably collides with this, when SSL is 'yes':
In admin page sale/order javascript try open page 'httpss://www.yourshop.com/...'.
Recommed install bugs fix file.

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by i2Paq » Fri Jun 10, 2016 10:13 pm


Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by bappidasgupta » Sat Apr 28, 2018 2:46 pm

Implementing SSL using Opencart 2.2.0.0 and Free CloudFlare Account

1. Register a CloudFlare account.

2. Add your domain with free plan.

3. Change domain nameserver with the ones provided by CloudFlare.

4. Click on Crypto menu option and do the following
  • Order SSL certificate.
  • Set Always use HTTPS to ON.
  • Set Require Modern TLS to ON.
  • Set Automatic HTTPS Rewrites to ON.
5. On OpenCart 2.2.0.0 admin panel, browse to System/Settings/Server option and set Use SSL to Yes.

6. On CPanel/Webmin
1. Edit .htaccess file in root folder

Code: Select all

   RewriteCond %{HTTP_HOST} ^domain.com$
   RewriteRule ^/?$ "http\:\/\/www\.domain\.com" [R=301,L]
with

Code: Select all

RewriteCond %{HTTPS_HOST} ^domain.com$
   RewriteRule ^/?$ "https\:\/\/www\.domain\.com" [R=301,L]
2. Edit config.php in root folder

Code: Select all

define('HTTPS_SERVER', 'http://www.domain.com/');
with

Code: Select all

define('HTTPS_SERVER', 'https://www.domain.com/');
3. Edit config.php in root/admin folder

Code: Select all

define('HTTPS_SERVER', 'http://www.domain.com/admin/');
   define('HTTPS_CATALOG', 'http://www.domain.com/');
with

Code: Select all

   define('HTTPS_SERVER', 'https://www.domain.com/admin/');
   define('HTTPS_CATALOG', 'https://www.domain.com/');

4. Edit admin.php, catalog.php, default.php and install.php in root/system/config folder

Code: Select all

   $_['site_ssl']          = false;
with

Code: Select all

  $_['site_ssl']          = true;

5. Edit catalog/controller/common/header.php and replace

Code: Select all

   $server = $this->config->get('config_ssl');
with

Code: Select all

$server = str_replace('http:', 'https:', $this->config->get('config_url'));

Newbie

Posts

Joined
Sat Apr 28, 2018 2:10 pm
Who is online

Users browsing this forum: No registered users and 10 guests