[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,14 +18,22 @@
'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")}]', 'item_id': '[{$gtmBasketItem->getFieldData("oxartnum")}]',
'name': '[{$d3BasketArticle->getFieldData("oxtitle")}]', 'item_name': '[{$gtmBasketItem->getFieldData("oxtitle")}]',
'variant': '[{$d3BasketArticle->getFieldData("oxselvariant")}]', 'affiliation': '[{$gtmBasketItem->getFieldData("oxtitle")}]',
'price': [{$d3oArticlePrice->getPrice()}], 'coupon': '[{$gtmBasketItem->getFieldData("oxtitle")}]',
'quantity': [{$d3BasketArticle->getFieldData("oxamount")}], 'item_variant': '[{$gtmBasketItem->getFieldData("oxselvariant")}]',
'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}] 'position': [{$smarty.foreach.gtmArticles.iteration}]
}[{if !$smarty.foreach.gtmArticles.last}],[{/if}] }[{if !$smarty.foreach.gtmArticles.last}],[{/if}]
[{/foreach}] [{/foreach}]