WDSY Posted June 3, 2011 Share Posted June 3, 2011 Im trying to figure out why i get ssl errors in chrome/safari ectI have used {$base_dir_ssl} where appropriate, but some modules use {$link->getPageLink some of these links are not using https? is there a secure version of {$link->getPageLinkThanks Link to comment Share on other sites More sharing options...
Billy Posted June 7, 2011 Share Posted June 7, 2011 Im trying to figure out why i get ssl errors in chrome/safari ectI have used {$base_dir_ssl} where appropriate, but some modules use {$link->getPageLink some of these links are not using https? is there a secure version of {$link->getPageLinkThanks getPageLink('/', false)}">{l s='Home'} getPageLink('/blog', false)}">{l s='Blog'} getPageLink('order.php', true)}">{l s='Cart'} getPageLink('contact-form.php', true)}">{l s='Contact'} Notice the true and false when pulling a page? True ='s Secure URL & False ='s Regular URL.Now I have a question! I am linking a link on different kind of website in a folder call blog with /blog in the link above. My question is how do I link an external website in my maintenance.tpl? You see in this code I am trying to direct the users to google. This is an error according to the prestashop validator. So what would be the correct code to link a external website? Please Googlethe results. 2 Link to comment Share on other sites More sharing options...
nascha Posted June 21, 2012 Share Posted June 21, 2012 Very nice thanks..I'm working fix this about 2 days. I fixed it from this. Link to comment Share on other sites More sharing options...
brandonc503 Posted January 4, 2013 Share Posted January 4, 2013 {$link->getPageLink('search', true)} isent working in 1.5.2 for blocksearch-top.tpl Link to comment Share on other sites More sharing options...
NemoPS Posted January 4, 2013 Share Posted January 4, 2013 You should use $this->context->link; In 1.5, as explained here http://doc.prestashop.com/display/PS15/Using+the+Context+Object Cheers! Link to comment Share on other sites More sharing options...
mohamadeffazuan Posted January 16, 2013 Share Posted January 16, 2013 Hi Nemo1, I change the code to $this->context->link but it still not working. Any other place that I have to amend? Pls advice. Thank you Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 15, 2014 Share Posted June 15, 2014 (edited) Old thread, but today I ran into this. It only affected SSL in Chrome, IE was fine. I have no idea why Chrome cared about the search link. In my theme blockseach-top.tpl I had to change <form method="get" action="{$link->getPageLink('search')}" id="searchbox"> To <form method="get" action="{$link->getPageLink('/search',true)}" id="searchbox"> Edited June 15, 2014 by Bill Dalton (see edit history) 3 Link to comment Share on other sites More sharing options...
rubio_ Posted August 30, 2014 Share Posted August 30, 2014 Great Bill, your post has solved my problem. Thank you so much! 1 Link to comment Share on other sites More sharing options...
SPKF Posted April 21, 2015 Share Posted April 21, 2015 (edited) Voici ma contribution pour ce super module, afin que celui-ci prenne en compte plus de page. Reste les pages search (résultat de recherche), manufacturer (la page qui listes les marques) et contact (formulaire de contact) qui ne fonctionnent pas avec la fonction getPageLink. Pour info je suis sous PS 1.5.6.2 {if $page_name == 'category'}{foreach $languages as $lang} <link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getCategoryLink($smarty.get.id_category, null, $lang.id_lang,null,null )}" /> {/foreach}{elseif $page_name == 'product'}{foreach $languages as $lang} <link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getProductLink($smarty.get.id_product, null, null, null, $lang.id_lang, null, 0, false)}" /> {/foreach}{elseif $page_name == 'cms'}{foreach $languages as $lang} <link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getCMSLink($smarty.get.id_cms, null, false, $lang.id_lang)}" /> {/foreach}{elseif $page_name == 'manufacturer'} {foreach $languages as $lang} <link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getManufacturerLink($smarty.get.id_manufacturer, null, $lang.id_lang , null)}" /> {/foreach}{elseif $page_name == 'best-sales'} {foreach $languages as $lang} <link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getPageLink('best-sales.php', null, $lang.id_lang,null,null )}" /> {/foreach}{elseif $page_name == 'prices-drop'} {foreach $languages as $lang} <link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getPageLink('prices-drop.php', null, $lang.id_lang,null,null )}" /> {/foreach}{elseif $page_name == 'new-products'} {foreach $languages as $lang} <link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getPageLink('new-products.php', null, $lang.id_lang,null,null )}" /> {/foreach}{elseif $page_name == 'sitemap'} {foreach $languages as $lang} <link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getPageLink('sitemap.php', null, $lang.id_lang,null,null )}" /> {/foreach}{elseif $page_name == 'manufacturer'} {foreach $languages as $lang} <link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getPageLink('manufacturer', true)}" /> {/foreach}{elseif $page_name == 'search'} {foreach $languages as $lang} <link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getPageLink('search',true)}" /> {/foreach}{elseif $page_name == 'contact'} {foreach $languages as $lang} <link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getPageLink('contact', true)}" /> {/foreach}{else} <link rel="alternate" hreflang="fr" href="http://www.domain.com/fr/" /> <link rel="alternate" hreflang="en-us" href="http://www.domain.com/en/" /> {/if} Edited April 21, 2015 by SPKF (see edit history) Link to comment Share on other sites More sharing options...
Gipielle Posted February 15, 2017 Share Posted February 15, 2017 Old thread, but today I ran into this. It only affected SSL in Chrome, IE was fine. I have no idea why Chrome cared about the search link. In my theme blockseach-top.tpl I had to change <form method="get" action="{$link->getPageLink('search')}" id="searchbox"> To <form method="get" action="{$link->getPageLink('/search',true)}" id="searchbox"> Thanks this solve the problem ! 1 Link to comment Share on other sites More sharing options...
Donnerberg Posted April 25, 2017 Share Posted April 25, 2017 Old thread, but today I ran into this. It only affected SSL in Chrome, IE was fine. I have no idea why Chrome cared about the search link. In my theme blockseach-top.tpl I had to change <form method="get" action="{$link->getPageLink('search')}" id="searchbox"> To <form method="get" action="{$link->getPageLink('/search',true)}" id="searchbox"> This solution WORKS. Link to comment Share on other sites More sharing options...
Gipielle Posted June 27, 2017 Share Posted June 27, 2017 We got the problem in product-list.tpl , add to cart button don't get https i think the problem is here <a class="csbutton ajax_add_to_cart_button csdefault" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title=""><span class="in_button">{l s='Add to cart'}</span></a> Link to comment Share on other sites More sharing options...
borkson Posted July 13, 2017 Share Posted July 13, 2017 (edited) We got the problem in product-list.tpl , add to cart button don't get https i think the problem is here <a class="csbutton ajax_add_to_cart_button csdefault" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title=""><span class="in_button">{l s='Add to cart'}</span></a> Hi guys, I have the same issue. Add to cart button get http instead of https. Only on main page (other pages get ssl protocol properly). Problem with product-list.tpl and group-category.tpl. Code looks the same like above. Any sugesstion how to force ssl here? EDIT: i didn't found solution but after change http://placehold.it to https in shop template main page is secure now, so "add to cart" button without https was not a problem Edited July 13, 2017 by borkson (see edit history) Link to comment Share on other sites More sharing options...
Alexandregugo Posted August 16, 2017 Share Posted August 16, 2017 I have the same problem, I can not get the links to be shown with https.<a href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" alt="{$product.name|escape:html:'UTF-8'}" />{if isset($product.new) && $product.new == 1}<span class="new">{l s='New' mod='blockleoprodcarousel'}</span>{/if}</a> Someone with a brilliant idea?Thanks Link to comment Share on other sites More sharing options...
bellini13 Posted August 17, 2017 Share Posted August 17, 2017 I have the same problem, I can not get the links to be shown with https. <a href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" alt="{$product.name|escape:html:'UTF-8'}" />{if isset($product.new) && $product.new == 1}<span class="new">{l s='New' mod='blockleoprodcarousel'}</span>{/if}</a> Someone with a brilliant idea? Thanks what exactly have you tried to do to get it to work? you have a valid SSL certificate installed? you enabled SSL in Prestashop back office? Link to comment Share on other sites More sharing options...
Alexandregugo Posted August 18, 2017 Share Posted August 18, 2017 what exactly have you tried to do to get it to work? you have a valid SSL certificate installed? you enabled SSL in Prestashop back office? Hi bellini13 thank you for answering. I have enabled ssl from the backoffice and on the server. I have also forced the redirection of ssl from the backoffice. But the links to the products of some of the modules index, and much of the rest of the page point to http links. The images, on the other hand, are loaded with https links. Google recognizes my page as with mixed content and does not appear green padlock. Link to comment Share on other sites More sharing options...
Bill Dalton Posted August 18, 2017 Share Posted August 18, 2017 Yeah I found one like that just the other day. In the "Feeder" module I found 'feedUrl' => Tools::getShopDomain and that created a link that was http not https. I fixed it in feeder.php by changing, 'feedUrl' => Tools::getShopDomain to 'feedUrl' => Tools::getShopDomainSsl May be that there is a better way, but it worked for me. Link to comment Share on other sites More sharing options...
Bill Dalton Posted August 18, 2017 Share Posted August 18, 2017 Here is another I recently found in my theme. My logo link was http, this didn't cause an error because the link to logo image was ssl. But having the link to "Home" not SSL caused a redirect to the SSL version every time. The fix in my case was to edit header.tpl Change: <a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}"> To: <a id="header_logo" href="{$content_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}"> Link to comment Share on other sites More sharing options...
debiannet Posted March 15, 2018 Share Posted March 15, 2018 (edited) Bill Dalton Thank you, I was looking for the search and logo problem from one week, I tore all hair from thinking. You're a lifesaver :)) Edited March 15, 2018 by debiannet (see edit history) 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