2014-05-09 10:40:33 +02:00
|
|
|
|
[{if $oD3GASettings->getValue('blD3GASendECommerce') && $oViewConf->getActiveClassName() == 'thankyou'}][{strip}]
|
|
|
|
|
[{assign var="order" value=$oView->getOrder()}]
|
2014-05-02 16:58:43 +02:00
|
|
|
|
|
2014-05-09 10:40:33 +02:00
|
|
|
|
ga('require', 'ecommerce', 'ecommerce.js');
|
2014-05-02 16:58:43 +02:00
|
|
|
|
|
|
|
|
|
[{assign var="currate" value=$order->oxorder__oxcurrate->value}]
|
|
|
|
|
[{if $oD3GASettings->getValue('blD3GAUseNetto')}]
|
|
|
|
|
[{math equation="s / r" s=$order->getOrderNetSum() r=$currate format="%.2f" assign="sTotal"}] [{* // total - required - has to be gross sum *}]
|
|
|
|
|
[{else}]
|
|
|
|
|
[{math equation="s / r" s=$order->getTotalOrderSum() r=$currate format="%.2f" assign="sTotal"}] [{* // total - required *}]
|
|
|
|
|
[{/if}]
|
|
|
|
|
[{math equation="s - r" s=$order->getTotalOrderSum() r=$order->getOrderNetSum() format="%.2f" assign="sTax"}]
|
|
|
|
|
[{math equation="s / r" s=$order->oxorder__oxdelcost->value r=$currate format="%.2f" assign="sShipping"}]
|
|
|
|
|
|
2014-05-09 10:40:33 +02:00
|
|
|
|
ga('ecommerce:addTransaction', {
|
|
|
|
|
'id': '[{$order->oxorder__oxordernr->value}]', [{* Transaction ID. Required *}]
|
2014-07-24 10:48:09 +02:00
|
|
|
|
'affiliation': '[{$oxcmp_shop->oxshops__oxname->value|escape:"quotes"}]', [{* Affiliation or store name *}]
|
2014-05-09 10:40:33 +02:00
|
|
|
|
'revenue': '[{$sTotal}]', [{* Gesamtwert *}]
|
|
|
|
|
'shipping': '[{$sShipping}]', [{* Versand *}]
|
|
|
|
|
'tax': '[{$sTax}]' [{* Steuer *}]
|
2014-05-02 16:58:43 +02:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
[{foreach from=$order->getOrderArticles() item=oOrderArticle}]
|
|
|
|
|
|
|
|
|
|
[{if $oD3GASettings->getValue('blD3GAUseNetto')}]
|
|
|
|
|
[{assign var="oPrice" value=$oOrderArticle->getPrice()}]
|
|
|
|
|
[{math equation="s / r" s=$oPrice->getNettoPrice() r=$currate format="%.2f" assign="sPrice"}]
|
|
|
|
|
[{else}]
|
|
|
|
|
[{assign var="sPrice" value=$oOrderArticle->oxorderarticles__oxprice->value}]
|
|
|
|
|
[{/if}]
|
|
|
|
|
|
2014-05-09 10:40:33 +02:00
|
|
|
|
ga('ecommerce:addItem', {
|
|
|
|
|
'id': '[{$order->oxorder__oxordernr->value}]', [{* Transaktions-ID *}]
|
2014-07-24 10:48:09 +02:00
|
|
|
|
'name': '[{$oOrderArticle->oxorderarticles__oxtitle->value|escape:"quotes"}]', [{* Produktname *}]
|
|
|
|
|
'sku': '[{$oOrderArticle->oxorderarticles__oxartnum->value|escape:"quotes"}]', [{* SKU/Code *}]
|
|
|
|
|
'category': '[{$oOrderArticle->oxorderarticles__d3_galocator->value|escape:"quotes"}]', [{* Kategorie oder Ausf<73>hrung *}]
|
2014-07-15 17:40:34 +02:00
|
|
|
|
[{*'category': '[{$oOrderArticle->oxorderarticles__oxselvariant->value}]', [{* Kategorie oder Ausf<73>hrung *}]
|
2014-05-09 10:40:33 +02:00
|
|
|
|
'price': '[{$sPrice}]', [{* Preis pro Einheit *}]
|
|
|
|
|
'quantity': '[{$oOrderArticle->oxorderarticles__oxamount->value}]' [{* Menge *}]
|
2014-05-02 16:58:43 +02:00
|
|
|
|
});
|
|
|
|
|
[{/foreach}]
|
|
|
|
|
|
2014-05-09 10:40:33 +02:00
|
|
|
|
ga('ecommerce:send');
|
2014-05-02 16:58:43 +02:00
|
|
|
|
[{/strip}][{/if}]
|