OpenCart force to SSL

Open config.php from root of your site and change to HTTPS, example:
// HTTPS
define('HTTPS_SERVER', 'https://opencart.loc/');

after this open another config.php here: admin/config.php and change
// HTTPS
define('HTTPS_SERVER', 'https://opencart.loc/admin/');
define('HTTPS_CATALOG', 'https://opencart.loc/');

done, now your site awailable with https, you can test it.

But if you want auto update every your page with https instead http you should open .htaccess file from root of your site ( check file name, maybe you need uncomment/rename file. for example change .htaccess.txt to htaccess ) and add this after RewriteEngine On :
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]