renaming vars on puchase-tpl

This commit is contained in:
MaxBUhe 2023-06-21 15:47:06 +02:00
parent cb18feba82
commit 50f9fbca23
2 changed files with 37 additions and 37 deletions

View File

@ -3,22 +3,22 @@
[{strip}]
<script>
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
[{assign var="_gtmOrder" value=$oView->getOrder()}]
[{assign var="_gtmArticles" value=$_gtmOrder->getOrderArticles()}]
[{assign var="gtmOrder" value=$oView->getOrder()}]
[{assign var="gtmArticles" value=$gtmOrder->getOrderArticles()}]
dataLayer.push({
'event': 'purchase',
'eventLabel':'Checkout Step 5',
'ecommerce': {
'transaction_id': '[{$_gtmOrder->getFieldData("oxordernr")}]',
'transaction_id': '[{$gtmOrder->getFieldData("oxordernr")}]',
'affiliation': '[{$oxcmp_shop->getFieldData("oxname")}]',
'value': [{$_gtmOrder->getTotalOrderSum()}],
'tax': [{math equation="x+y" x=$_gtmOrder->getFieldData("oxartvatprice1") y=$_gtmOrder->getFieldData("oxartvatprice2") }],
'shipping': [{$_gtmOrder->getFieldData("oxdelcost")}],
'currency': '[{$_gtmOrder->getFieldData('oxcurrency')}]',
'value': [{$gtmOrder->getTotalOrderSum()}],
'tax': [{math equation="x+y" x=$gtmOrder->getFieldData("oxartvatprice1") y=$gtmOrder->getFieldData("oxartvatprice2") }],
'shipping': [{$gtmOrder->getFieldData("oxdelcost")}],
'currency': '[{$gtmOrder->getFieldData('oxcurrency')}]',
'items':
[
[{foreach from=$_gtmArticles item="d3BasketArticle" name="gtmArticles"}]
[{foreach from=$gtmArticles item="d3BasketArticle" name="gtmArticles"}]
[{assign var="d3oArticlePrice" value=$d3BasketArticle->getPrice()}]
{
'id': '[{$d3BasketArticle->getFieldData("oxartnum")}]',

View File

@ -63,7 +63,7 @@ $aModule = [
[
'template' => 'page/checkout/thankyou.tpl',
'block' => 'checkout_thankyou_main',
'file' => '/Application/views/blocks/checkout_s5.tpl'
'file' => '/Application/views/blocks/purchase.tpl'
],
// Lists
// view_item_list