Hi,
I’am running Shoppica 2 version 2.2.4 on OC 1.5.6.
Like the topic says. Running var_dump on $tbData->isHTTPS, it returns bool(false) even when on HTTPS.
How do i resolve this?
|
|
The $tbData->isHTTPS variable is set from tb_themes\shoppica2\library\Utils.php -> public static function isRequestHTTPS() . This is the recommended way of detecting secure pages, but you can change the code if you like. For example you can try to replace the function with: public static function isRequestHTTPS()
{
$isSecure =
(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
|| (!empty($_SERVER['SERVER_PORT']) && intval($_SERVER['SERVER_PORT']) == 443);
if ((!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
|| !empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') {
$isSecure = true;
}
return $isSecure;
}
If this does not work, you can try with custom implementation. Please, not that Shoppica2 is not supported anymore.
Regards,
Themeburn Team
|
|