on any page that should be served using the HTTPS address, add this code at line 1:
<?php if((!(isset($_SERVER['HTTPS']))) || ($_SERVER['HTTPS'] == "") || ($_SERVER['HTTPS'] == "off"))header("Location: https://www.<your domain here>" . $_SERVER['PHP_SELF']); ?>
on any page that should not be served through the HTTPS address, add this code at line 1:
<?php
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') header("Location: http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']); ?>
the code snippet will cause any page accessed using the HTTP address to redirect to the HTTPS address, the second will reverse it.
aside from the checkout redircet:
$Redirect_redirStr="https://www.mydomain.com/checkout.php";
no other changes will be necessary.