diff --git a/Application/views/blocks/purchase.tpl b/Application/views/blocks/purchase.tpl index b97219e..8cb92b8 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 $gtmPurchaseItemCategory}] '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..6a4e87f 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 $gtmCategory}] '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..8a63023 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 $gtmCategory}] '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..942ad28 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 $gtmCategory}] '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..991d682 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 $gtmCategory}] '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}] diff --git a/CHANGELOG.md b/CHANGELOG.md index 719e895..f004a60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.9.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.7.0...2.8.0) - 2023-06-27 +## [2.10.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.9.2...2.10.0) - 2023-08-02 +### Added +- new Event "remove_from_cart" + +## [2.9.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.9.1...2.9.2) - 2023-06-29 +### Fixed +- wrong variable for category-object check + +## [2.9.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.9.0...2.9.1) - 2023-06-27 +### Fixed +- deny method call on no category + +## [2.9.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.8.0...2.9.0) - 2023-06-27 ### Added - Cookiefirst usability diff --git a/metadata.php b/metadata.php index 3c796c9..4cdb6da 100755 --- a/metadata.php +++ b/metadata.php @@ -22,7 +22,7 @@ $aModule = [ Die Entwicklung basiert auf einem Fork von Marat Bedoev - Github-Link ", 'thumbnail' => 'thumbnail.png', - 'version' => '2.9.0', + 'version' => '2.10.0', 'author' => 'Data Development (Inh.: Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'https://www.oxidmodule.com/',