diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_trustedstore.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_trustedstore.tpl index a5bc056..7a05f39 100644 --- a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_trustedstore.tpl +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_trustedstore.tpl @@ -5,7 +5,7 @@ gts.push(["id", "[{$oD3GASettings->getValue('sD3GATSId')}]"]); gts.push(["badge_position", "BOTTOM_RIGHT"]); - gts.push(["locale", "de_DE"]); + gts.push(["locale", "[{$sD3CurrentGTSLang}]"]); [{* gts.push(["google_base_offer_id", "foo"]); gts.push(["google_base_subaccount_id", "foo"]); @@ -26,18 +26,29 @@ [{if $oViewConf->getActiveClassName() == 'thankyou'}] [{* https://support.google.com/trustedstoresmerchant/answer/6063087?hl=de&ref_topic=6063044 *}] + + [{assign var="oOrder" value=$oView->getOrder()}] + [{assign var="oOrderCurrency" value=$oOrder->getOrderCurrency()}] + [{assign var="oUser" value=$oOrder->getOrderUser()}] + [{assign var="oUserCountry" value=$oUser->getUserCountry()}] + [{if $oD3GASettings->getValue('blD3GAUseNetto')}] + [{assign var="sTotal" value=$oOrder->getOrderNetSum()}] [{* // total - required - has to be gross sum *}] + [{else}] + [{assign var="sTotal" value=$oOrder->getTotalOrderSum()}] [{* // total - required *}] + [{/if}] +
diff --git a/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php b/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php index 24d0dc5..6a8059f 100644 --- a/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php +++ b/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php @@ -55,6 +55,7 @@ class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_pare $oParentView->addTplParam('sAFEGetMoreUrls', $this->afGetMoreUrls()); $oParentView->addTplParam('sD3GASendPageViewParameter', $this->d3getSendPageViewParameters()); $oParentView->addTplParam('sD3CurrentShopUrl', $this->d3GetCreateCurrentShopUrl()); + $oParentView->addTplParam('sD3CurrentGTSLang', $this->d3GetGTSLang()); if ($oSet->getValue('blD3GASetRemarketing')) { $aInfos = $this->d3GetGAProdInfos(); @@ -99,6 +100,14 @@ class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_pare return 'auto'; } + return $this->d3GetCurrentShopUrl(); + } + + /** + * @return string + */ + public function d3GetCurrentShopUrl() + { return oxRegistry::getConfig()->getActiveShop()->getFieldData('oxurl'); } @@ -275,6 +284,21 @@ class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_pare return 'Siteview'; } + /** + * @return string + */ + public function d3GetGTSLang() + { + $aHomeCountries = oxRegistry::getConfig()->getConfigParam('aHomeCountry'); + $sHomeCountryId = $aHomeCountries[array_keys($aHomeCountries)[0]]; + /** @var oxcountry $oCountry */ + $oCountry = oxNew('oxcountry'); + $oCountry->load($sHomeCountryId); + + return strtolower(oxRegistry::getLang()->getLanguageAbbr()).'_'. + strtoupper($oCountry->getFieldData('OXISOALPHA2')); + } + /** * @return string */