/** * getShopDomainSsl returns domain name according to configuration and depending on ssl activation * * @param boolean $http if true, return domain name with protocol * @param boolean $entities if true, * * @return string domain */ public static function getShopDomainSsl($http = false, $entities = false) { if (!($domain = ShopUrl::getMainShopDomainSSL())) { $domain = Tools::getHttpHost(); } if ($entities) { $domain = htmlspecialchars($domain, ENT_COMPAT, 'UTF-8'); } if ($http) { $domain = (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://') . $domain; } return $domain; }