cleaning + rm unnecessary " } "

This commit is contained in:
MaxBUhe 2023-01-11 15:31:56 +01:00
parent 9ae1afa326
commit 2b864f41e8

View File

@ -1,3 +1,5 @@
[{$smarty.block.parent}]
[{strip}] [{strip}]
<script> <script>
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */ dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
@ -8,28 +10,26 @@
'event': 'purchase', 'event': 'purchase',
'eventLabel':'Checkout Step 5', 'eventLabel':'Checkout Step 5',
'ecommerce': { 'ecommerce': {
'transaction_id':'[{$_gtmOrder->oxorder__oxordernr->value}]', 'transaction_id': '[{$_gtmOrder->oxorder__oxordernr->value}]',
'affiliation':'[{$oxcmp_shop->oxshops__oxname->value}]', 'affiliation': '[{$oxcmp_shop->oxshops__oxname->value}]',
'value':'[{$_gtmOrder->oxorder__oxtotalordersum->value}]', 'value': '[{$_gtmOrder->oxorder__oxtotalordersum->value}]',
'tax':'[{math equation="x+y" x=$_gtmOrder->oxorder__oxartvatprice1->value y=$_gtmOrder->oxorder__oxartvatprice2->value }]', 'tax': '[{math equation="x+y" x=$_gtmOrder->oxorder__oxartvatprice1->value y=$_gtmOrder->oxorder__oxartvatprice2->value }]',
'shipping':'[{$_gtmOrder->oxorder__oxdelcost->value}]', 'shipping': '[{$_gtmOrder->oxorder__oxdelcost->value}]',
'currency': "[{$_gtmOrder->getFieldData('oxcurrency')}]" 'currency': '[{$_gtmOrder->getFieldData('oxcurrency')}]',
'items': 'items':
[ [
[{foreach from=$_gtmArticles item="_gtmArticle" name="gtmArticles"}] [{foreach from=$_gtmArticles item="_gtmArticle" name="gtmArticles"}]
{ {
'id':'[{$_gtmArticle->oxorderarticles__oxartnum->value}]', 'id': '[{$_gtmArticle->oxorderarticles__oxartnum->value}]',
'name': '[{$_gtmArticle->oxorderarticles__oxtitle->value}]', 'name': '[{$_gtmArticle->oxorderarticles__oxtitle->value}]',
'variant':'[{$_gtmArticle->oxorderarticles__oxselvariant->value}]', 'variant': '[{$_gtmArticle->oxorderarticles__oxselvariant->value}]',
'price': [{$_gtmArticle->oxorderarticles__oxprice->value}], 'price': [{$_gtmArticle->oxorderarticles__oxprice->value}],
'quantity':[{$_gtmArticle->oxorderarticles__oxamount->value}], 'quantity': [{$_gtmArticle->oxorderarticles__oxamount->value}],
'position':[{$smarty.foreach.gtmArticles.iteration}] 'position': [{$smarty.foreach.gtmArticles.iteration}]
}[{if !$smarty.foreach.gtmArticles.last}],[{/if}] }[{if !$smarty.foreach.gtmArticles.last}],[{/if}]
[{/foreach}] [{/foreach}]
] ]
}
} }
}) })
</script> </script>
[{/strip}] [{/strip}]
[{$smarty.block.parent}]