Jump to content

[SOLVED] Make certain pages Http instead of Https?


Shaun

Recommended Posts

Pretty new to Prestashop and have been loving it thus far. However, I just installed a SSL and configured PayPal API and have successfully tested going all the way through to the PayPal gateway.

So, everything is working as it should be but with one problem...When my browser address bar is showing the Https, there is a small warning icon in Opera and Firefox (have not tested IE yet) . I believe from reading some threads in the forum that this is because some pages are reading from Http instead of Https.

Is there a tutorial for newbies like me to be able to know where we can indicate what pages and/or items should be either Http or Https? if no tutorial exists, please can someone offer some advice and be specific where the files are located and where the code should be inserted?
It can be frustrating trying to guess what files people are talking about and where code suggestions should be inserted for people like myself trying to get better at Prestashop.
Many thanks in advance...

http://www.theguiltshop.com/prestashop/
work in progress....

Link to comment
Share on other sites

Depends what the warning is but the most common one would be where you have a mix of secure and insecure items on a page (like background images and such). If you are using Firefox with the absolutely awesome WebDeveloper addon you can use "Information->View Page Info" to look at the media for the page and see what files are being called via http. Once you nail them down, it is just a case of finding the references in the templates and adjusting the paths accordingly (say making them relative instead of absolute or adding in a Smarty prefix based on how the page was accessed).

Cheers

Link to comment
Share on other sites

that's the 3 million dollar answer is where are they being called from? i went thru alot of the code and the URLs are not showing http://. so where is it in the code. It's pretty much all the images including the back office is not taking after my SSL was installed. I hope someone can give me a clear answer on how that can be resolved.

Thanks

Link to comment
Share on other sites

You need to list what image files are causing the problem. When I look at your site, the first SSL page has the following file referenced via HTTP:

https://www.theguiltshop.com/prestashop/authentication.php?back=order.php?step=1

http://www.theguiltshop.com/prestashop/img/logo.jpg

This file reference comes from "./themes/prestashop/header.tpl":




$img_ps_dir gets set in init.php in two places depending on the situation:

./init.php:120:         'img_ps_dir' => $protocol_content.$server_host._PS_IMG_,
./init.php:160:         'img_ps_dir' => _PS_IMG_,



Are you using a stock template? If not, the problem is in your template. If you are using everything stock, something appears to be messing with the http versus https test logic in init.php.

Cheers

Link to comment
Share on other sites

Thank you for your quick response. However I don't know how or what tool you are using to track down the call reference for that particular jpg. I am not a programmer, so bear with me for my line of questioning. Did you look up "view source" in the browser option? Because I can't find how that is done. I don't know the steps to track the source of the code just by looking at the url of the image. Another question is even if i find the culprit. How can that be hacked into the code to make that work?

The folder is already under the SSL protection. This is beyond my scope of comprehension i'm afraid. I keep having this nagging feeling that i'm not the one with this glitch. I'm using the default theme by the way. Any further explanation would be gladly appreciated.

Thank you

Link to comment
Share on other sites

Codegrunt if you compare the header.tpl from that site to that from a fresh download it is slightly wrong.

The section you quoated

This file reference comes from “./themes/prestashop/header.tpl”:

{$shop_name|escape:'htmlall':'UTF-8'}



Loosk like this in that site
                



As you can see here

I would adivse downloading a fresh install and copying the theme files into your server.

Link to comment
Share on other sites

Many thanks to all for your replies and advice. I downloaded the Firefox WebDeveloper add-on because of CodeGrunt's advice and am happy I did as it definitely helps a newbie like me slowly start seeing how things tie together.

So, after backing up my DB, I decided to first try Jhnstcks advice on replacing the header.tpl in the themes folder. I copied the themes header.tpl from the PS 1.2.4 folder to my site and overwrote the existing header.tpl file and voila, the pages that I wanted to be secure, were now secure.
I went through the entire checkout process with no problems, the address bar showed green for secure along with the gold lock icon. Happy Days!!!
I think this thread can be considered closed, unless someone would now like to explain why the code contained in a header.tpl file, can dictate whether a page is secure or non-secure?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...