Google Sitemap Addon Https:// Fix.

How do we fix the Google Sitemap Addon so It generates all https: url's for those of us who have migrated to having our entire sites https:// secure…??

Shouldn't it detect and do this automatically?

[quote name='CarStickersDecals' timestamp='1412096050' post='193139']

How do we fix the Google Sitemap Addon so It generates all https: url's for those of us who have migrated to having our entire sites https:// secure…??

[/quote]



Open the app/addons/google_sitemap/func.php and replace:



if (count($languages) == 1) {
$links[] = fn_url($link, 'C', 'http', CART_LANGUAGE);
} else {
foreach ($languages as $lang_code => $lang) {
$links[] = fn_url($link . '&sl=' . $lang_code, 'C', 'http', $lang_code);
}
}




with



if (count($languages) == 1) {
$links[] = fn_url($link, 'C', 'https', CART_LANGUAGE);
} else {
foreach ($languages as $lang_code => $lang) {
$links[] = fn_url($link . '&sl=' . $lang_code, 'C', 'https', $lang_code);
}
}




Hope that helps.

[quote name='tbirnseth' timestamp='1412137746' post='193162']

Shouldn't it detect and do this automatically?

[/quote]



You would think. But nope. Seems quite a bit needs changed within Cs-Cart to migrate…

Talking to a few buddy's I know who work for the devil (Google) https:// is where its all going…

So might as well get ahead of the game…

Thank you eComLabs… That worked… All the links are now https:// except the primary home page url… Not sure why… I'm sure there a many other settings to fix with in Cs-Cart… How about the config.local.php… Do we need to change anything in there??

Well, for portability and longevity, I would replace

'http' with

defined('HTTPS') ? 'https' : 'http'

As the protocol parameter and then submit a bug to bugtracker with that solution.

As for the home page, just replace the



$location = Registry::get('config.http_location');




with



$location = Registry::get('config.https_location');




I missed it.