merge rel_3.x changes, fix user country values in trusted store code
This commit is contained in:
commit
4b68552261
Binary file not shown.
@ -6,6 +6,21 @@
|
||||
[{if $mod_d3_googleanalytics}]
|
||||
[{* Content shouldn't rendered in disabled module!
|
||||
Because of this reason, it can't included in d3modcfgcheck block. *}]
|
||||
|
||||
[{if $oD3GASettings->getValue('sD3GATSActive') && $oD3GASettings->getValue('sD3GATSId')}]
|
||||
[{capture name="d3GATrustedStoreCode"}]
|
||||
[{strip}]
|
||||
[{include file="d3ga_universal_trustedstore.tpl"}]
|
||||
[{/strip}]
|
||||
[{/capture}]
|
||||
|
||||
[{if $oViewConf->getActiveClassName() == 'thankyou'}]
|
||||
[{$oView->logCode($smarty.capture.d3GATrustedStoreCode)}]
|
||||
[{/if}]
|
||||
|
||||
[{$smarty.capture.d3GATrustedStoreCode}]
|
||||
[{/if}]
|
||||
|
||||
[{include file="d3ga_universal_adwordscode.tpl"}]
|
||||
|
||||
[{include file="d3ga_universal_remarketing.tpl"}]
|
||||
|
@ -70,6 +70,8 @@
|
||||
|
||||
ga('send', 'pageview' [{$sD3GASendPageViewParameter}]);
|
||||
|
||||
[{include file="d3ga_universal_ecommerce.tpl"}]
|
||||
|
||||
[{if $oD3GASettings->getValue('blD3GATrackPageLoadTime')}]
|
||||
var perfData = window.performance.timing;
|
||||
var pageLoadTime = perfData.domComplete - perfData.navigationStart;
|
||||
@ -87,8 +89,6 @@
|
||||
ga('set', 'metric1', loadTime);
|
||||
[{*ga('send', 'event', 'Page Load Time', loadTime, {'nonInteraction': true});*}]
|
||||
[{/if}]
|
||||
|
||||
[{include file="d3ga_universal_ecommerce.tpl"}]
|
||||
</script>
|
||||
|
||||
[{/strip}]
|
||||
@ -99,8 +99,4 @@
|
||||
[{/if}]
|
||||
|
||||
[{$smarty.capture.d3GATrackCode}]
|
||||
[{/if}]
|
||||
|
||||
[{if $blD3GoogleAnalyticsActive && $oD3GASettings->getValue('sD3GATSActive') && $oD3GASettings->getValue('sD3GATSId')}]
|
||||
[{include file="d3ga_universal_trustedstore.tpl"}]
|
||||
[{/if}]
|
@ -1,7 +1,7 @@
|
||||
[{if $oD3GASettings->getValue('blD3GASendECommerce') && $oViewConf->getActiveClassName() == 'thankyou'}][{strip}]
|
||||
[{assign var="order" value=$oView->getOrder()}]
|
||||
|
||||
ga('require', 'ecommerce', 'ecommerce.js');
|
||||
ga('require', 'ecommerce');
|
||||
|
||||
[{assign var="currate" value=$order->oxorder__oxcurrate->value}]
|
||||
[{if $oD3GASettings->getValue('blD3GAUseNetto')}]
|
||||
|
@ -30,7 +30,7 @@
|
||||
[{assign var="oOrder" value=$oView->getOrder()}]
|
||||
[{assign var="oOrderCurrency" value=$oOrder->getOrderCurrency()}]
|
||||
[{assign var="oUser" value=$oOrder->getOrderUser()}]
|
||||
[{assign var="oUserCountry" value=$oUser->getUserCountry()}]
|
||||
[{assign var="oUserCountry" value=$oD3GACountry}]
|
||||
[{if $oD3GASettings->getValue('blD3GAUseNetto')}]
|
||||
[{assign var="sTotal" value=$oOrder->getOrderNetSum()}] [{* // total - required - has to be gross sum *}]
|
||||
[{else}]
|
||||
@ -43,21 +43,20 @@
|
||||
<span id="gts-o-id">[{$oOrder->getFieldData('oxordernr')}]</span>
|
||||
<span id="gts-o-domain">[{$oxcmp_shop->oxshops__oxurl->value}]</span>
|
||||
<span id="gts-o-email">[{$oUser->getFieldData('oxusername')}]</span>
|
||||
<span id="gts-o-country">[{$oCountry->getFieldData('OXISOALPHA2')}]</span>
|
||||
<span id="gts-o-country">[{$oUserCountry->getFieldData('oxisoalpha2')}]</span>
|
||||
<span id="gts-o-currency">[{$oOrderCurrency->name}]</span>
|
||||
<span id="gts-o-total">[{$sTotal|string_format:"%.2f"}]</span>
|
||||
<span id="gts-o-discounts">-[{$oOrder->getFieldData('oxdiscount')}]</span>
|
||||
<span id="gts-o-shipping-total">[{$oOrder->getFieldData('oxdelcost')}]</span>
|
||||
<span id="gts-o-tax-total">[{math equation="fi + se + th + fo" fi=$oOrder->getFieldData('oxartvatprice1') se=$oOrder->getFieldData('oxartvatprice2') th=$oOrder->getFieldData('oxpayvat') fo=$oOrder->getFieldData('oxdelvat') format="%.2f"}]</span>
|
||||
<span id="gts-o-est-ship-date">MERCHANT_ORDER_ID</span>
|
||||
<span id="gts-o-est-delivery-date">MERCHANT_ORDER_ID</span>
|
||||
<span id="gts-o-est-has-preorder">MERCHANT_ORDER_ID</span>
|
||||
<span id="gts-o-est-has-digital">MERCHANT_ORDER_ID</span>
|
||||
<span id="gts-o-est-ship-date">has_completed</span>
|
||||
<span id="gts-o-est-delivery-date">has_completed</span>
|
||||
<span id="gts-o-est-has-preorder">has_completed</span>
|
||||
<span id="gts-o-est-has-digital">has_completed</span>
|
||||
<!-- end order and merchant information -->
|
||||
|
||||
<!-- start repeated item specific information -->
|
||||
[{foreach from=$order->getOrderArticles() item=oOrderArticle}]
|
||||
|
||||
[{if $oD3GASettings->getValue('blD3GAUseNetto')}]
|
||||
[{assign var="oPrice" value=$oOrderArticle->getPrice()}]
|
||||
[{assign var="sPrice" value=$oPrice->getNettoPrice()}]
|
||||
|
@ -56,6 +56,7 @@ class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_pare
|
||||
$oParentView->addTplParam('sD3GASendPageViewParameter', $this->d3getSendPageViewParameters());
|
||||
$oParentView->addTplParam('sD3CurrentShopUrl', $this->d3GetCreateCurrentShopUrl());
|
||||
$oParentView->addTplParam('sD3CurrentGTSLang', $this->d3GetGTSLang());
|
||||
$oParentView->addTplParam('oD3GACountry', $this->d3GAGetUserCountry());
|
||||
|
||||
if ($oSet->getValue('blD3GASetRemarketing')) {
|
||||
$aInfos = $this->d3GetGAProdInfos();
|
||||
@ -620,4 +621,22 @@ class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_pare
|
||||
|
||||
return $aParameter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return oxcountry
|
||||
*/
|
||||
public function d3GAGetUserCountry()
|
||||
{
|
||||
/** @var thankyou $oCurrentView */
|
||||
$oCurrentView = oxRegistry::getConfig()->getActiveView();
|
||||
/** @var oxcountry $oCountry */
|
||||
$oCountry = oxNew('oxcountry');
|
||||
|
||||
if (method_exists($oCurrentView, 'getOrder')) {
|
||||
$sCountryId = $oCurrentView->getOrder()->getFieldData('oxbillcountryid');
|
||||
$oCountry->load($sCountryId);
|
||||
}
|
||||
|
||||
return $oCountry;
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user