I
I
Ivan Antonov2016-07-01 10:53:33
opencart
Ivan Antonov, 2016-07-01 10:53:33

How did setting up SSL in OpenCart 2.2.0 clear the base tag?

I set up the site and admin configs, enabled SSL mode in the OpenCart settings.
But when visiting the site, styles and pictures are not loaded, later I found out that because of the empty base tag. The template is standard. This happened only on the site itself, it works correctly in the admin panel. What could be the reason?
<base href="" />

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Antonov, 2016-07-01
@antonowano

So I haven't figured out why. But found a solution.
Changed line 29 in catalog/controller/common/header.php
to

if ($this->request->server['HTTPS']) {
    $data['base'] = HTTPS_SERVER;
} else {
    $data['base'] = HTTP_SERVER;
}

I copied this solution from admin /controller/common/header.php
That is why it seems that this is a mistake of the OpenCart developers.

W
web-mechanic, 2016-07-01
@amfetamine

most likely, once this piece of code was simply deleted by someone

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question