Skip to content

Commit 55e4904

Browse files
committed
Fixed a bug on SSL_SECURE_MODE
1 parent c55abc8 commit 55e4904

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

ps_googleanalytics.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ public function hookdisplayHeader($params, $back_office = false)
280280
'userId' => $user_id,
281281
'gaAccountId' => Tools::safeOutput(Configuration::get('GA_ACCOUNT_ID')),
282282
'shops' => $shops,
283-
'gaCrossdomainEnabled' => $ga_crossdomain_enabled
283+
'gaCrossdomainEnabled' => $ga_crossdomain_enabled,
284+
'useSecureMode' => Configuration::get('PS_SSL_ENABLED')
284285
)
285286
);
286287
return $this->display(__FILE__, 'ps_googleanalytics.tpl');
@@ -349,11 +350,11 @@ public function hookdisplayFooter()
349350
{
350351
$ga_scripts = '';
351352
$this->js_state = 0;
352-
353353
if (isset($this->context->cookie->ga_cart)) {
354354
$this->filterable = 0;
355-
355+
356356
$gacarts = json_decode($this->context->cookie->ga_cart, true);
357+
357358
if (is_array($gacarts)) {
358359
foreach ($gacarts as $gacart) {
359360
if ($gacart['quantity'] > 0) {

views/templates/hook/ps_googleanalytics.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
ga('linker:autoLink', [
3939
{foreach from=$shops item=shop}
4040
{if $shop.id_shop != $currentShopId}
41-
'{if $use_secure_more}{$shop.domain_ssl|escape:'htmlall':'UTF-8'}{else}{$shop.domain|escape:'htmlall':'UTF-8'}{/if}',
41+
{if $useSecureMode}'{$shop.domain_ssl|escape:'htmlall':'UTF-8'}'{else}'{$shop.domain|escape:'htmlall':'UTF-8'}'{/if},
4242
{/if}
4343
{/foreach}
4444
]);

0 commit comments

Comments
 (0)