diff --git a/Application/views/blocks/purchase.tpl b/Application/views/blocks/purchase.tpl index b97219e..cfd3a32 100644 --- a/Application/views/blocks/purchase.tpl +++ b/Application/views/blocks/purchase.tpl @@ -32,11 +32,13 @@ 'affiliation': '[{$gtmBasketItem->getFieldData("oxtitle")}]', 'coupon': '[{foreach from=$gtmOrderVouchers item="gtmOrderVoucher" name="gtmOrderVoucherIteration"}][{$gtmOrderVoucher}][{if !$smarty.foreach.gtmOrderVoucherIteration.last}], [{/if}][{/foreach}]', 'item_variant': '[{$gtmBasketItem->getFieldData("oxselvariant")}]', + [{if $gtmBasketItemCategory}] '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()}]', + [{/if}] 'price': [{$gtmPurchaseItemPriceObject->getPrice()}], 'quantity': [{$gtmBasketItem->getFieldData("oxamount")}], 'position': [{$smarty.foreach.gtmArticles.iteration}] diff --git a/Application/views/blocks/view_cart.tpl b/Application/views/blocks/view_cart.tpl index 79279c0..2671fde 100644 --- a/Application/views/blocks/view_cart.tpl +++ b/Application/views/blocks/view_cart.tpl @@ -24,11 +24,13 @@ 'item_id': '[{$gtmCartArticles[$basketindex]->getFieldData('oxartnum')}]', 'item_name': '[{$gtmCartArticles[$basketindex]->getFieldData('oxtitle')}]', 'item_variant': '[{$gtmCartArticles[$basketindex]->getFieldData('oxvarselect')}]', + [{if $gtmBasketItemCategory}] 'item_category': '[{$gtmBasketItemCategory->getSplitCategoryArray(0)}]', 'item_category_2': '[{$gtmBasketItemCategory->getSplitCategoryArray(1)}]', 'item_category_3': '[{$gtmBasketItemCategory->getSplitCategoryArray(2)}]', 'item_category_4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3)}]', 'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]', + [{/if}] 'price': [{$d3oItemPrice->getPrice()}], 'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]', 'quantity': [{$basketitem->getAmount()}], diff --git a/Application/views/blocks/view_item.tpl b/Application/views/blocks/view_item.tpl index 3e4b60a..ff40049 100644 --- a/Application/views/blocks/view_item.tpl +++ b/Application/views/blocks/view_item.tpl @@ -17,11 +17,13 @@ 'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]', 'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]', 'item_variant': '[{if $gtmProduct->getFieldData("oxvarselect")}][{$gtmProduct->getFieldData("oxvarselect")}][{/if}]', + [{if $gtmBasketItemCategory}] 'item_category': '[{$gtmCategory->getSplitCategoryArray(0)}]', 'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1)}]', 'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2)}]', 'item_category_4':'[{$gtmCategory->getSplitCategoryArray(3)}]', 'item_list_name':'[{$gtmCategory->getSplitCategoryArray()}]', + [{/if}] [{assign var="d3PriceObject" value=$gtmProduct->getPrice()}] 'price': [{$d3PriceObject->getPrice()}] } diff --git a/Application/views/ga4/add_to_cart.tpl b/Application/views/ga4/add_to_cart.tpl index adc990f..e3519df 100644 --- a/Application/views/ga4/add_to_cart.tpl +++ b/Application/views/ga4/add_to_cart.tpl @@ -30,11 +30,13 @@ 'price': [{$d3PriceObject->getPrice()}], 'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]', 'item_variant': '[{if $gtmProduct->getFieldData('oxvarselect')}][{$gtmProduct->getFieldData('oxvarselect')}][{/if}]', + [{if $gtmBasketItemCategory}] 'item_category': '[{$gtmCategory->getSplitCategoryArray(0)}]', 'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1)}]', 'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2)}]', 'item_category_4':'[{$gtmCategory->getSplitCategoryArray(3)}]', 'item_list_name':'[{$gtmCategory->getSplitCategoryArray()}]', + [{/if}] 'quantity': iArtQuantity } ] diff --git a/Application/views/ga4/view_item_list.tpl b/Application/views/ga4/view_item_list.tpl index 677e007..1cac129 100644 --- a/Application/views/ga4/view_item_list.tpl +++ b/Application/views/ga4/view_item_list.tpl @@ -25,10 +25,12 @@ 'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]', 'price': [{$d3PriceObject->getPrice()}], 'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]', + [{if $gtmBasketItemCategory}] 'item_category': '[{$gtmCategory->getSplitCategoryArray(0)}]', 'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1)}]', 'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2)}]', 'item_category_4':'[{$gtmCategory->getSplitCategoryArray(3)}]', + [{/if}] 'quantity': 1 }[{if !$smarty.foreach.gtmProducts.last}],[{/if}] [{/foreach}] diff --git a/Application/views/ga4/view_search_result.tpl b/Application/views/ga4/view_search_result.tpl index 92487ed..1e12f35 100644 --- a/Application/views/ga4/view_search_result.tpl +++ b/Application/views/ga4/view_search_result.tpl @@ -21,11 +21,13 @@ 'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]', 'price': [{$d3PriceObject->getPrice()}], 'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]', + [{if $gtmBasketItemCategory}] 'item_category': '[{$gtmCategory->getSplitCategoryArray(0)}]', 'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1)}]', 'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2)}]', 'item_category_4':'[{$gtmCategory->getSplitCategoryArray(3)}]', 'item_list_name':'[{$gtmCategory->getSplitCategoryArray()}]', + [{/if}] 'quantity': 1 }[{if !$smarty.foreach.gtmProducts.last}],[{/if}] [{/foreach}]