Get SSL-Links everywhere on the Shop

We enabled SSL today on our Server. Now many of the Links in the Shop are pointing from the https:// page to the http:// version. Shop version is 4.8.5

In many Locations this could be fixed, but for some things I cannot find the function to get the SSL-Link instead of the normal one.
Instead of “$oViewConf->getHomeLink()” for instance, I used “$oViewConf->getSslSelfLink()”, which seems to do the job.

But for instance on an article list page, all article links are non-ssl.
From the listitem_infogrid.tpl:


[{block name="widget_product_listitem_infogrid"}]
    [{assign var="product"              value=$oView->getProduct()      }]
    [{assign var="owishid"              value=$oView->getWishId()          }]
    [{assign var="toBasketFunction"     value=$oView->getToBasketFunction()}]
    [{assign var="recommid"             value=$oView->getRecommId()        }]
    [{assign var="showMainLink"         value=$oView->getShowMainLink()    }]
    [{assign var="blDisableToCart"      value=$oView->getDisableToCart()   }]
    [{assign var="iIndex"               value=$oView->getIndex()          }]
    [{assign var="altproduct"           value=$oView->getAltProduct()      }]

    [{if $showMainLink}]
        [{assign var='_productLink' value=$product->getMainLink()}]
    [{else}]
        [{assign var='_productLink' value=$product->getLink()}]
    [{/if}]
...

“$_productLink” is always a non-SSL link. I couldn’t find the right function to fix this. I hope someone can point me to a solution, as I couldn’t find it even when I looked through the oxid source code.

I cleared /tmp and of course made the entry in the config.inc.php. Also, some SSL-Links are there (for instance CSS and JS files are included with https), so in principle this should work.

you want to use the shop on https ?
Just change the config.inc.php !

Yeah that’s what I did. What I’m saying is that this didn’t work.
In the config.inc.php we set $this->sSSLShopURL = ‘https://www.domain.tld’; (with the right domain of course), and some things are in fact loaded using https:// since then, but not all of them.
Maybe I am missing some other config param?

[Edit]
It seems that all the SEO-Links for SSL-Pages are also broken. It always uses force_sid= and cl GET params instead of SEO-URLs.

the item above ($this->sShopURL = standard url) should also be set to https !

But be aware: this is usually not necessary and page speed will drop down!

1 Like

But that would mean there would be no option to fall back to normal http in case the visitor cannot, for whatever reason, support TLS or just not the particular algorithms supported by the server, wouldn’t it?
That’s not really what we want either.

a server doesn’t support algorithms - just pages.
And a visitor who has a browser which is not supporting SSL/TLS (like as I remenber less than IE4) - forget it :smiley:

PS: if you change the protocol for the shop to https you should add in .htaccess a 301 redirect !

“$_productLink” is always a non-SSL link. I couldn’t find the right function to fix this. I hope someone can point me to a solution, as I couldn’t find it even when I looked through the oxid source code.

<form name=“tobasket[{$iIndex}]” [{if $blShowToBasket}]action=“[{ $oViewConf->getSelfActionLink() }]” method=“post”[{else}]action=“[{if $oViewConf->getSelfActionLink()|strstr:“https”}][{$_productLink|replace:“http”:“https”}][{else}][{$_productLink}][{/if}]” method=“get”[{/if}]>

Hello,
I wrote a simple module for that and pushed on GitHub: https://github.com/marcelglaeser/OXID_mg_ssllink