Skip to content

Commit 440dcb4

Browse files
committed
Fixed affiliation parameter
1 parent 0caaa00 commit 440dcb4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

classes/Hook/HookDisplayFooter.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use Ps_Googleanalytics;
3131
use RecursiveArrayIterator;
3232
use RecursiveIteratorIterator;
33+
use Shop;
3334
use Tools;
3435

3536
class HookDisplayFooter implements HookInterface
@@ -77,7 +78,7 @@ public function run()
7778
{
7879
item_id: "' . $gacart['id'] . '",
7980
item_name: "' . $gacart['name'] . '",
80-
affiliation: "Google Merchandise Store",
81+
affiliation: "' . (Shop::isFeatureActive() ? $this->context->shop->name : Configuration::get('PS_SHOP_NAME')) . '",
8182
currency: "' . $this->context->currency->iso_code . '",
8283
index: ' . $key . ',
8384
item_brand: "' . $gacart['brand'] . '",
@@ -101,7 +102,7 @@ public function run()
101102
{
102103
item_id: "' . $gacart['id'] . '",
103104
item_name: "' . $gacart['name'] . '",
104-
affiliation: "Google Merchandise Store",
105+
affiliation: "' . (Shop::isFeatureActive() ? $this->context->shop->name : Configuration::get('PS_SHOP_NAME')) . '",
105106
currency: "' . $this->context->currency->iso_code . '",
106107
index: ' . $key . ',
107108
item_brand: "' . $gacart['brand'] . '",

0 commit comments

Comments
 (0)