Jump to content

Where/how are links within PrestaShop Rendered?


Recommended Posts

I have set my SSL certificate so that the whole site is secure. However when you hover over a link - the URL you see is HTTP(see attached) - but the URL you are sent to is HTTPS. Similarly, if you look at the page's source code - the links are HTTP not HTTPS.

 

This concerns my boss. He is afraid that because PrestaShop is redirecting these links to HTTPS, Google will get lost during the re-direct process and rank our pages lower than they might otherwise.

 

So I was wondering how does PrestaShop form these links? If it was me I would probably have a subroutine/function/module somewhere that creates these links and then returns them to the code that called the function. If I knew where that function was, I could probably tell it to write the links with HTTPS not HTTP and that might make my boss feel better.

 

Does anyone know how and where PrestaShop creates links? Thanks!

 

Lynnette

post-261481-0-97003400-1337106505_thumb.png

Link to comment
Share on other sites

I have set my SSL certificate so that the whole site is secure.

 

How exactly did you this? By default, only some pages are SSL secured e.g. when one is logged in My Account, or checkout etc. There is no way to serve the entire site over SSL without making a lot of changes to the core files/modules etc.

 

So I was wondering how does PrestaShop form these links?

In many different classes and modules. They are scattered all over.

 

If it was me I would probably have a subroutine/function/module somewhere that creates these links and then returns them to the code that called the function
Then ensure every class, module, code nnippet etc would use that function to display links? Yeah...in a perfect world. Not the case with PS. Some, on purpose, call a function that will create a non HTTPS link, others hard-code HTTP string into the code, some rely on relative links etc etc. Then there is the elusive bug where SSL is turned off intermittently. Good luck.
Link to comment
Share on other sites

How exactly did you this? By default, only some pages are SSL secured e.g. when one is logged in My Account, or checkout etc. There is no way to serve the entire site over SSL without making a lot of changes to the core files/modules etc.

 

Well I had never configured an SSL certificate before and I just gave it our domain name (www.bosombuddies.info). Then in PrestaShop it asks what the SSL url is and I put our domain name there and - TaDa! - I had secured the whole site. I am thinking I should probably go back and reconfigure the certificate so only the checkout and account parts are secure, but right now my boss would like to remain in this configuration.

 

Thanks for the info about the code!

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...