We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5debadb commit f36aaccCopy full SHA for f36aacc
1 file changed
classes/Hook/HookDisplayFooter.php
@@ -28,6 +28,8 @@
28
use PrestaShop\Module\Ps_Googleanalytics\Wrapper\ProductWrapper;
29
use Ps_Googleanalytics;
30
use Tools;
31
+use RecursiveIteratorIterator;
32
+use RecursiveArrayIterator;
33
34
class HookDisplayFooter implements HookInterface
35
{
@@ -70,6 +72,11 @@ public function run()
70
72
$gacart['quantity'] = abs($gacart['quantity']);
71
73
$gaScripts .= 'MBG.removeFromCart(' . json_encode($gacart) . ');';
74
}
75
+ } elseif (is_array($gacart)) {
76
+ $it = new RecursiveIteratorIterator(new RecursiveArrayIterator($gacart));
77
+ foreach($it as $v) {
78
+ $gaScripts .= $v;
79
+ }
80
} else {
81
$gaScripts .= $gacart;
82
0 commit comments