Can someone suggest an alternative way to request server['HTTPS']
<p>I have installed OpenCarton on my website, and all is well until I tried to correctly set up SSL for secure areas.</p>

<p>I am currently making the site work by forcing https on for the whole site, but cannot get the secure pages to work when it is set up in the "correct" manner.</p>

<p>I am not an expert in php, so I hope you will treat as an <em>almost</em> idiot! I am learning as I go along.</p>

<p>I have researched through the OpenCart forum for a solution without success.</p>

<p>The problem is "insecure content" apparently occurring because the base href remains as http not https when visiting, for example, checkout.</p>

<p>I have already discovered that the likely cause is that my web host does not support the variable server['HTTPS'], they suggest asking OpenCart, but I have not got any useful answers there after nearly a week!</p>

<p>The following lines from /controller/common/header.php is where the problem lies. </p>

<pre><code>    if (isset($this-&gt;request-&gt;server['HTTPS']) &amp;&amp; (($this-&gt;request-&gt;server['HTTPS'] == 'on') || ($this-&gt;request-&gt;server['HTTPS'] == '1'))) {
        $this-&gt;data['base'] = $this-&gt;config-&gt;get('config_ssl');
    } else {
        $this-&gt;data['base'] = $this-&gt;config-&gt;get('config_url');
    }
</code></pre>

<p>And again further down the file:</p>

<pre><code>if (isset($this-&gt;request-&gt;server['HTTPS']) &amp;&amp; (($this-&gt;request-&gt;server['HTTPS'] == 'on') || ($this-&gt;request-&gt;server['HTTPS'] == '1'))) {
        $server = HTTPS_IMAGE;
    } else {
        $server = HTTP_IMAGE;
    }   
</code></pre>

<p>So what I need is another way to substitute these lines.</p>

<p>I have found some suggested alternatives in another post here for what looks like a similar problem, but I don't know hoe to implement them.</p>

<p>Step by step editing  would be helpful if someone has the patience.</p>

<p>I can give more info if needed but didn't want to go too far too soon.</p>

<p>Thanks</p>

<p>Robin</p>
