From 9f1deab099dbd7b5673976050465598dc81d17ad Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Tue, 27 Jun 2023 12:15:21 +0200 Subject: [PATCH 1/5] [bug-fix] non-category having articles throw exception deny method-call on no category --- Application/views/blocks/purchase.tpl | 2 ++ Application/views/blocks/view_cart.tpl | 2 ++ Application/views/blocks/view_item.tpl | 2 ++ Application/views/ga4/add_to_cart.tpl | 2 ++ Application/views/ga4/view_item_list.tpl | 2 ++ Application/views/ga4/view_search_result.tpl | 2 ++ 6 files changed, 12 insertions(+) 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}] From 7062d935f4b91ca29ee5f00d20cf3cd813deb5dd Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Tue, 27 Jun 2023 12:16:43 +0200 Subject: [PATCH 2/5] bump changelog && metadata to 2.9.1 --- CHANGELOG.md | 4 ++++ metadata.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 719e895..7871b4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ 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.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.7.0...2.8.0) - 2023-06-27 +### Fixed +- deny method call on no category + ## [2.9.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.7.0...2.8.0) - 2023-06-27 ### Added - Cookiefirst usability diff --git a/metadata.php b/metadata.php index 3c796c9..e955161 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.9.1', 'author' => 'Data Development (Inh.: Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'https://www.oxidmodule.com/', From cc89303595e917f9ba5e01ab268a3c8c45c69a41 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Thu, 29 Jun 2023 08:31:57 +0200 Subject: [PATCH 3/5] [fix-bug] wrong category method used for check --- Application/views/blocks/purchase.tpl | 2 +- Application/views/blocks/view_item.tpl | 2 +- Application/views/ga4/add_to_cart.tpl | 2 +- Application/views/ga4/view_item_list.tpl | 2 +- Application/views/ga4/view_search_result.tpl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Application/views/blocks/purchase.tpl b/Application/views/blocks/purchase.tpl index cfd3a32..8cb92b8 100644 --- a/Application/views/blocks/purchase.tpl +++ b/Application/views/blocks/purchase.tpl @@ -32,7 +32,7 @@ '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}] + [{if $gtmPurchaseItemCategory}] 'item_category': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(0)}]', 'item_category_2': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(1)}]', 'item_category_3': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(2)}]', diff --git a/Application/views/blocks/view_item.tpl b/Application/views/blocks/view_item.tpl index ff40049..6a4e87f 100644 --- a/Application/views/blocks/view_item.tpl +++ b/Application/views/blocks/view_item.tpl @@ -17,7 +17,7 @@ '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}] + [{if $gtmCategory}] 'item_category': '[{$gtmCategory->getSplitCategoryArray(0)}]', 'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1)}]', 'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2)}]', diff --git a/Application/views/ga4/add_to_cart.tpl b/Application/views/ga4/add_to_cart.tpl index e3519df..8a63023 100644 --- a/Application/views/ga4/add_to_cart.tpl +++ b/Application/views/ga4/add_to_cart.tpl @@ -30,7 +30,7 @@ 'price': [{$d3PriceObject->getPrice()}], 'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]', 'item_variant': '[{if $gtmProduct->getFieldData('oxvarselect')}][{$gtmProduct->getFieldData('oxvarselect')}][{/if}]', - [{if $gtmBasketItemCategory}] + [{if $gtmCategory}] 'item_category': '[{$gtmCategory->getSplitCategoryArray(0)}]', 'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1)}]', 'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2)}]', diff --git a/Application/views/ga4/view_item_list.tpl b/Application/views/ga4/view_item_list.tpl index 1cac129..942ad28 100644 --- a/Application/views/ga4/view_item_list.tpl +++ b/Application/views/ga4/view_item_list.tpl @@ -25,7 +25,7 @@ 'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]', 'price': [{$d3PriceObject->getPrice()}], 'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]', - [{if $gtmBasketItemCategory}] + [{if $gtmCategory}] 'item_category': '[{$gtmCategory->getSplitCategoryArray(0)}]', 'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1)}]', 'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2)}]', diff --git a/Application/views/ga4/view_search_result.tpl b/Application/views/ga4/view_search_result.tpl index 1e12f35..991d682 100644 --- a/Application/views/ga4/view_search_result.tpl +++ b/Application/views/ga4/view_search_result.tpl @@ -21,7 +21,7 @@ 'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]', 'price': [{$d3PriceObject->getPrice()}], 'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]', - [{if $gtmBasketItemCategory}] + [{if $gtmCategory}] 'item_category': '[{$gtmCategory->getSplitCategoryArray(0)}]', 'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1)}]', 'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2)}]', From 6002540268d74d6d0e133ab4070cc874de7db9fb Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Thu, 29 Jun 2023 08:33:07 +0200 Subject: [PATCH 4/5] bump changelog && version to 2.9.2 --- CHANGELOG.md | 4 ++++ metadata.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7871b4e..82dd065 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ 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.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.7.0...2.8.0) - 2023-06-29 +### Fixed +- wrong variable for category-object check + ## [2.9.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.7.0...2.8.0) - 2023-06-27 ### Fixed - deny method call on no category diff --git a/metadata.php b/metadata.php index e955161..f840ede 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.1', + 'version' => '2.9.2', 'author' => 'Data Development (Inh.: Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'https://www.oxidmodule.com/', From 49bfd5be097d16bd0207ade517e281091ddfd119 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 2 Aug 2023 11:55:28 +0200 Subject: [PATCH 5/5] bump changelog && version to 2.10.0 --- CHANGELOG.md | 10 +++++++--- metadata.php | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82dd065..f004a60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,15 +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.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.7.0...2.8.0) - 2023-06-29 +## [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.7.0...2.8.0) - 2023-06-27 +## [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.7.0...2.8.0) - 2023-06-27 +## [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 f840ede..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.2', + 'version' => '2.10.0', 'author' => 'Data Development (Inh.: Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'https://www.oxidmodule.com/',