I installed a SSL certificate and all went ok except 3 images at home page. That images are from the banner: http://prntscr.com/mo9lmj
Images affected: http://prntscr.com/mo9n1j
I tried everything, like upload same images when SSL went on, and desperate because it's impossible to get the green padlock in browers due that 3 banner images...
Web: https://bit.ly/2T6bGoy
So what could i do?
Thanks so much in advance!
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
What should i try now?
Attachments
configphp.png (17.43 KiB) Viewed 1515 times
adminconfigphp.png (25.07 KiB) Viewed 1515 times
Simply edit the URLs inside the slideshow from http to https (or inside the HTML-module if this is used).
While I recommend my clients always not to use any protocol, instead define these URLs like this:
Instead:
Code: Select all
http://www.jflazartigue.es/image/galeria/acondicionador-regenerativo.jpg
Code: Select all
../image/galeria/acondicionador-regenerativo.jpg
Defining this way will not display the images in the backend, but who needs that?
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Second, as it seems, you are using an older OpenCart version.
And finally, it seems that this is an extra installed extension.
So please, provide all infos needed (e.g. OpenCart Version, installed - and used - Extension) in a readable language.
Then - maybe - someone may help you.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
It's no my intention to ask to learn any languaje lol...i'm newbie here and on Opencart, so i don't know what to do to explain better or what technical details have i to provide.
About the Opencart version: 2.0.3.1
About the banner module, i think it's the default that comes with this Opencart version? (Image attached)
"Gestion de Banners" means "Manage Banners"
Thanks again
Attachments
banner-default.png (12.25 KiB) Viewed 1451 times
The standard Banner module is located under Extensions > Module > Banner
And the banner itself are located under System > Design > Banner where you add the route manual (as already described by me earlier).
But youe images are displaying something else - a Banner extension which is not standard.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Then open catalog/controller/module/banner.php and find: HTTP_SERVER change to HTTPS_SERVER:
Code: Select all
foreach ($results as $result) {
if (file_exists(DIR_IMAGE . $result['image'])) {
$this->data['banners'][] = array(
'title' => $result['title'],
'link' => $result['link'],
'image' => HTTPS_SERVER . 'image/' . $result['image'],
);
}
}
Don't know from where you have this code, but for sure not from an OpenCart installtion.Banastres wrote: ↑Sun Jun 21, 2020 5:15 pmI had this problem recently. It's because the catalog/controller/module/banner.php is loading the HTTP_Server inside the PHP file for the URL image. This will cause mixed content errors while using SSL as you mentioned above. Make sure the HTTPS_SERVER is set in the config.php.
Then open catalog/controller/module/banner.php and find: HTTP_SERVER change to HTTPS_SERVER:The mixed content errors for the banners will now be fixed, as they will load over HTTPS.Code: Select all
foreach ($results as $result) { if (file_exists(DIR_IMAGE . $result['image'])) { $this->data['banners'][] = array( 'title' => $result['title'], 'link' => $result['link'], 'image' => HTTPS_SERVER . 'image/' . $result['image'], ); } }
Because the code inside this system reads like this:
Code: Select all
foreach ($results as $result) {
if (is_file(DIR_IMAGE . $result['image'])) {
$data['banners'][] = array(
'title' => $result['title'],
'link' => $result['link'],
'image' => $this->model_tool_image->resize($result['image'], $setting['width'], $setting['height'])
);
}
}
And this is since the 1.5.x releases.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
I didn't realize the OP was referring to 2.0~ until i checked the forum breadcrumb. The problem sound similar to mine, hence me finding the thread. For 1.5.6.4 that is what worked for me. The banner module was using HTTP_SERVER causing mixed content errors while using SSL.OSWorX wrote: ↑Sun Jun 21, 2020 6:54 pmDon't know from where you have this code, but for sure not from an OpenCart installtion.Banastres wrote: ↑Sun Jun 21, 2020 5:15 pmI had this problem recently. It's because the catalog/controller/module/banner.php is loading the HTTP_Server inside the PHP file for the URL image. This will cause mixed content errors while using SSL as you mentioned above. Make sure the HTTPS_SERVER is set in the config.php.
Then open catalog/controller/module/banner.php and find: HTTP_SERVER change to HTTPS_SERVER:The mixed content errors for the banners will now be fixed, as they will load over HTTPS.Code: Select all
foreach ($results as $result) { if (file_exists(DIR_IMAGE . $result['image'])) { $this->data['banners'][] = array( 'title' => $result['title'], 'link' => $result['link'], 'image' => HTTPS_SERVER . 'image/' . $result['image'], ); } }
Because the code inside this system reads like this:And anybody ca see, there is NO HTTP_SERVERCode: Select all
foreach ($results as $result) { if (is_file(DIR_IMAGE . $result['image'])) { $data['banners'][] = array( 'title' => $result['title'], 'link' => $result['link'], 'image' => $this->model_tool_image->resize($result['image'], $setting['width'], $setting['height']) ); } }
And this is since the 1.5.x releases.
2.0~ could have a similar scenario. I don't know. Because i don't use it.
Users browsing this forum: No registered users and 223 guests