Skip to content

Commit bb4a650

Browse files
committed
Fix tests
1 parent 26e5bba commit bb4a650

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

classes/Hook/HookDisplayBeforeBodyClosingTag.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public function run()
7272
return $gaTagHandler->generate($this->gaScripts);
7373
die;
7474

75-
7675
$ganalyticsDataHandler = new GanalyticsDataHandler(
7776
$this->context->cart->id,
7877
$this->context->shop->id
@@ -103,7 +102,7 @@ public function run()
103102
],
104103
],
105104
];
106-
$gaScripts .= $this->module->getTools()->renderEvent(
105+
$this->gaScripts .= $this->module->getTools()->renderEvent(
107106
'add_to_cart',
108107
$eventData
109108
);
@@ -127,25 +126,25 @@ public function run()
127126
],
128127
],
129128
];
130-
$gaScripts .= $this->module->getTools()->renderEvent(
129+
$this->gaScripts .= $this->module->getTools()->renderEvent(
131130
'remove_from_cart',
132131
$eventData
133132
);
134133
}
135134
} elseif (is_array($gacart)) {
136135
$it = new RecursiveIteratorIterator(new RecursiveArrayIterator($gacart));
137136
foreach ($it as $v) {
138-
$gaScripts .= $v;
137+
$this->gaScripts .= $v;
139138
}
140139
} else {
141-
$gaScripts .= $gacart;
140+
$this->gaScripts .= $gacart;
142141
}
143142
}
144143

145144
$ganalyticsDataHandler->manageData('', 'D');
146145
}
147146

148-
return $gaTagHandler->generate($gaScripts);
147+
return $gaTagHandler->generate($this->gaScripts);
149148
}
150149

151150
/**
@@ -218,7 +217,7 @@ private function renderCartpage()
218217
// Prepare items to our format
219218
$productWrapper = new ProductWrapper($this->context);
220219
$items = $productWrapper->prepareItemListFromProductList($cart['products'], true);
221-
220+
222221
// Render the event
223222
$eventData = [
224223
'currency' => $this->context->currency->iso_code,

classes/Hook/HookDisplayFooterProduct.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(Ps_Googleanalytics $module, Context $context)
3939
/**
4040
* run
4141
*
42-
* @return string|null
42+
* @return string|void
4343
*/
4444
public function run()
4545
{

0 commit comments

Comments
 (0)