Jump to content

<Solved>How to make the info block links to be https?


Ensign

Recommended Posts

The only way I can see to do it is to change the getCMSLink function on lin 69 of classes/Link.php (in PrestaShop v1.3.1) from:

public function getCMSLink($cms, $alias = null)
{
   global $cookie;
   $lang_link = "";
   if ($this->allow && $cookie->id_lang != Configuration::get('PS_LANG_DEFAULT'))
       $lang_link = "lang-".Language::getIsoById($cookie->id_lang)."/";
   if (is_object($cms))
       return ($this->allow == 1) ? (_PS_BASE_URL_.__PS_BASE_URI__.$lang_link.'content/'.intval($cms->id).'-'.$cms->link_rewrite) :
       (_PS_BASE_URL_.__PS_BASE_URI__.'cms.php?id_cms='.intval($cms->id));
   if ($alias)
       return ($this->allow == 1) ? (_PS_BASE_URL_.__PS_BASE_URI__.$lang_link.'content/'.intval($cms).'-'.$alias) :
       (_PS_BASE_URL_.__PS_BASE_URI__.'cms.php?id_cms='.intval($cms));
   return _PS_BASE_URL_.__PS_BASE_URI__.'cms.php?id_cms='.intval($cms);
}



to:

public function getCMSLink($cms, $alias = null)
{
   global $cookie;
   $lang_link = "";
   if ($this->allow && $cookie->id_lang != Configuration::get('PS_LANG_DEFAULT'))
       $lang_link = "lang-".Language::getIsoById($cookie->id_lang)."/";
   if (is_object($cms))
       return ($this->allow == 1) ? (_PS_BASE_URL_SSL_.__PS_BASE_URI__.$lang_link.'content/'.intval($cms->id).'-'.$cms->link_rewrite) :
       (_PS_BASE_URL_SSL_.__PS_BASE_URI__.'cms.php?id_cms='.intval($cms->id));
   if ($alias)
       return ($this->allow == 1) ? (_PS_BASE_URL_SSL_.__PS_BASE_URI__.$lang_link.'content/'.intval($cms).'-'.$alias) :
       (_PS_BASE_URL_SSL_.__PS_BASE_URI__.'cms.php?id_cms='.intval($cms));
   return _PS_BASE_URL_SSL_.__PS_BASE_URI__.'cms.php?id_cms='.intval($cms);
}

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