To switch an OpenCart website to https, you need to do the following steps:
Install an SSL certificate on your server. You can get one from your hosting provider or a third-party service.
Edit the config.php file in the root and admin folders of your OpenCart installation. Change the HTTP_SERVER and HTTP_CATALOG constants to use https instead of http. For example, define('HTTP_SERVER', 'https://www.example.com/');
Go to your admin panel and click on System > Settings. Edit your store and go to the Server tab. Set Use SSL to Yes and save the changes.
Clear Caches:
Clear your OpenCart and browser caches.
Check for Mixed Content:
Ensure all resources (images, scripts, etc.) are loaded over HTTPS.