rfourt Posted April 15, 2015 Share Posted April 15, 2015 (edited) Hello i have recently activated SSL and Force SSL.On some pages in my shop i have some hardcoded images in my theme and i add the images by using this code. img src="{$base_dir}/img/payment/nordea.png" wich gives me an error for my certificate in the browsers. The url to the image should load with https but it only loads with http. Anyone have an idea?I have cleared cache etc. PS 1.6 Edited April 17, 2015 by rfourt (see edit history) Link to comment Share on other sites More sharing options...
rfourt Posted April 16, 2015 Author Share Posted April 16, 2015 Anyone? Link to comment Share on other sites More sharing options...
rfourt Posted April 20, 2015 Author Share Posted April 20, 2015 Is there some global file where i can set so $base_dir goes to https instead of http?Or is it handled by the modules and set in there files?Thank you., Link to comment Share on other sites More sharing options...
bellini13 Posted April 20, 2015 Share Posted April 20, 2015 why not use {$base_dir_ssl} 1 Link to comment Share on other sites More sharing options...
rfourt Posted April 20, 2015 Author Share Posted April 20, 2015 Yes ive started to think of that to.. but over 100 modules and ALOT of theme code to change.. So please save me atleast 4 hours on changing all the $base_dir to base_dir_ssl when it should be .... first of all done from start by activating SSL in admin but i can live with Haxxing the normal base_dir Link to comment Share on other sites More sharing options...
bellini13 Posted April 20, 2015 Share Posted April 20, 2015 both variables are defined in \controllers\FrontController.php 'base_dir' => _PS_BASE_URL_.__PS_BASE_URI__, 'base_dir_ssl' => $protocol_link.Tools::getShopDomainSsl().__PS_BASE_URI__, Link to comment Share on other sites More sharing options...
sjaakie3 Posted June 3, 2015 Share Posted June 3, 2015 both variables are defined in \controllers\FrontController.php 'base_dir' => _PS_BASE_URL_.__PS_BASE_URI__, 'base_dir_ssl' => $protocol_link.Tools::getShopDomainSsl().__PS_BASE_URI__, ok, that works but is not a real solution. Thanks btw Link to comment Share on other sites More sharing options...
bellini13 Posted June 4, 2015 Share Posted June 4, 2015 actually, it is the designed solution. Link to comment Share on other sites More sharing options...
thx2012 Posted November 20, 2019 Share Posted November 20, 2019 On 4/20/2015 at 5:22 AM, bellini13 said: why not use {$base_dir_ssl} This worked for me.. Thanks! Link to comment Share on other sites More sharing options...
jaxbax Posted November 3, 2020 Share Posted November 3, 2020 I hardly came across this post. Although it is old, I want to help those who still have the same problem. To fix the problem, change {$ base_dir} to {if isset ($ force_ssl) && $ force_ssl}{$ base_dir_ssl}{else}{$ base_dir}{/ if} in the code sections where you want to force SSL. 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now