[working state] add method for article category steps

change naming of vars

Not working yet: getting of category-steps
This commit is contained in:
MaxBUhe 2023-06-21 15:58:46 +02:00
parent 429069e0cf
commit 8a7c25fad9

View File

@ -18,16 +18,24 @@
'currency': '[{$gtmOrder->getFieldData('oxcurrency')}]', 'currency': '[{$gtmOrder->getFieldData('oxcurrency')}]',
'items': 'items':
[ [
[{foreach from=$gtmArticles item="d3BasketArticle" name="gtmArticles"}] [{foreach from=$gtmArticles item="gtmBasketItem" name="gtmArticles"}]
[{assign var="d3oArticlePrice" value=$d3BasketArticle->getPrice()}] [{assign var="gtmPurchaseItemPriceObject" value=$gtmBasketItem->getPrice()}]
{ [{assign var="gtmPurchaseItemCategory" value=$gtmBasketItem->getCategory()}]
'id': '[{$d3BasketArticle->getFieldData("oxartnum")}]', {
'name': '[{$d3BasketArticle->getFieldData("oxtitle")}]', 'item_id': '[{$gtmBasketItem->getFieldData("oxartnum")}]',
'variant': '[{$d3BasketArticle->getFieldData("oxselvariant")}]', 'item_name': '[{$gtmBasketItem->getFieldData("oxtitle")}]',
'price': [{$d3oArticlePrice->getPrice()}], 'affiliation': '[{$gtmBasketItem->getFieldData("oxtitle")}]',
'quantity': [{$d3BasketArticle->getFieldData("oxamount")}], 'coupon': '[{$gtmBasketItem->getFieldData("oxtitle")}]',
'position': [{$smarty.foreach.gtmArticles.iteration}] 'item_variant': '[{$gtmBasketItem->getFieldData("oxselvariant")}]',
}[{if !$smarty.foreach.gtmArticles.last}],[{/if}] 'item_category': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(0)}]',
'item_category_2': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(1)}]',
'item_category_3': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(2)}]',
'item_category_4': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(3)}]',
'item_list_name': '[{$gtmPurchaseItemCategory->getSplitCategoryArray()}]',
'price': [{$gtmPurchaseItemPriceObject->getPrice()}],
'quantity': [{$gtmBasketItem->getFieldData("oxamount")}],
'position': [{$smarty.foreach.gtmArticles.iteration}]
}[{if !$smarty.foreach.gtmArticles.last}],[{/if}]
[{/foreach}] [{/foreach}]
] ]
} }