Compare commits

..

103 Commits

Author SHA1 Message Date
7c6b0215a5 bump metadata && changelog 2023-08-23 17:16:58 +02:00
84e3895db8 extend Manufacturer 2023-08-23 17:12:18 +02:00
1e479503a7 [changed] 'an article has been removed from basket'-check 2023-08-23 17:09:49 +02:00
9e7b4653ea add deug_mode switch 2023-08-16 10:44:50 +02:00
7b1241ab97 correct naming in view_search_result 2023-08-16 09:38:03 +02:00
0f15df8364 [working-state] rebuilding meta structure 2023-08-03 15:55:07 +02:00
71b743ddcc bump changelog && version to 2.10.1 2023-08-03 15:10:38 +02:00
c0206f741f add missing param to check if isRemoveFromCart 2023-08-03 15:09:12 +02:00
22bec30621 add remove_from_cart 2023-08-03 14:57:26 +02:00
49bfd5be09 bump changelog && version to 2.10.0 2023-08-02 11:55:28 +02:00
6002540268 bump changelog && version to 2.9.2 2023-06-29 08:33:07 +02:00
cc89303595 [fix-bug] wrong category method used for check 2023-06-29 08:31:57 +02:00
7062d935f4 bump changelog && metadata to 2.9.1 2023-06-27 12:16:43 +02:00
9f1deab099 [bug-fix] non-category having articles throw exception
deny method-call on no category
2023-06-27 12:15:21 +02:00
2cc0368633 bump version and changelog to 2.9.0 2023-06-27 09:53:00 +02:00
b0a1c20419 add missing cmp-entry in cmp-list 2023-06-27 08:58:05 +02:00
54fcbf88c9 add cookiefirst necessary script-attributes 2023-06-27 08:46:51 +02:00
0ae67c823b add metadata cookiefirst entry plus multilang-usability 2023-06-27 08:46:39 +02:00
ab4232fb4a add cookiefirst to manager-list 2023-06-27 08:33:49 +02:00
0ec765955e bump version && changelog to 2.8.0 2023-06-23 15:15:42 +02:00
d505d8530a rm unnecessary code 2023-06-23 15:08:09 +02:00
fd79710158 add coupon to view_cart 2023-06-22 10:43:50 +02:00
d2ef663dd3 add paymentType to puchase-event
extend Basket-Model to add method to get payment-desc
2023-06-22 10:37:40 +02:00
fec30b1109 add coupon to puchase-event 2023-06-22 09:57:30 +02:00
5c53d83f32 [finished] item_category added to purchase-Event 2023-06-22 09:39:03 +02:00
8a7c25fad9 [working state] add method for article category steps
change naming of vars

Not working yet: getting of category-steps
2023-06-21 15:58:46 +02:00
429069e0cf fix wrong var usage 2023-06-21 15:56:58 +02:00
50f9fbca23 renaming vars on puchase-tpl 2023-06-21 15:47:06 +02:00
cb18feba82 add missing item_list_name 2023-06-21 15:45:12 +02:00
47b8622018 implementing Category->getSplitCategoryArray() method for category-step 2023-06-21 15:43:43 +02:00
92a91d0194 implementing Category->getSplitCategoryArray() method for category-step 2023-06-21 15:33:38 +02:00
226a80f138 implementing Category->getSplitCategoryArray() method for category-step 2023-06-21 15:29:27 +02:00
5dd7b51fb5 adjust view_cart; extend Model\Category
add categories to ecommerce-DataLayer; add method to immediately get the requested Category-Steps
2023-06-21 15:23:50 +02:00
7b82476e8b adjust view_item
add categories to ecommerce-DataLayer
2023-06-21 14:24:47 +02:00
bfc2ca8ad6 adjust view_item_list
add categories to ecommerce-DataLayer
2023-06-21 14:19:48 +02:00
e48b21022c bump version && changelog to 2.7.0 2023-06-19 15:17:43 +02:00
b4bf91660e [rework] change structure of GA-event
moving the procedere into one step so there's not an accidental triggering of an GA-Push-Event which at the end overwrites the View-Item-Push-Event in the cmpEvent
2023-06-19 14:57:12 +02:00
3d62993dfc add missing consentmanager readme entry 2023-06-01 14:19:29 +02:00
679a49823c add missing changelog 1.x changes 2023-05-31 14:33:49 +02:00
106fea9c91 fix explicit manager bug
bug would make script apply anyway, even if no manager is found
2023-05-31 14:29:46 +02:00
13132e6da0 Merge branch 'rel_2_prep_porting_rel_1.x' of git.d3data.de:D3Public/GoogleAnalytics4 into rel_2_prep_porting_rel_1.x 2023-05-31 13:42:54 +02:00
5c478124bc bump version && changelog to 2.6.0 2023-05-31 13:40:51 +02:00
12613357b3 bump version && changelog to 2.6.0 2023-05-31 13:38:32 +02:00
95e0cab68c rework 'Manager Type Handling'; add ManagerHandler + ManagerTypes 2023-05-31 12:17:00 +02:00
1d194d445a rm unnecessary check 2023-05-31 12:16:10 +02:00
bf3fee5ce5 add missing article-getter 2023-05-31 10:35:18 +02:00
3c280a3adb adjust readme and switch used block-extension 2023-05-31 10:34:34 +02:00
6217524828 adjusted usercentrics script 2023-05-31 10:34:24 +02:00
5ef600ff2a added position to block-extension 2023-05-31 10:34:14 +02:00
a40d922f42 [working-state] restructuring usercentricts & consentmanager decision
consentmanager decision is working so far; next step is implementing usercentricts
2023-05-31 10:33:59 +02:00
dae5f66f81 add usercentrics chosable settings-value; add additional methods; add new multilang-idents 2023-05-31 10:33:43 +02:00
347e551194 merge rel_1.x changelog 2023-05-23 11:49:09 +02:00
000c49c56b bump version && changelog to 2.5.0 2023-05-23 11:32:20 +02:00
002cc69d2a switch metadata entries; fix getPrice-bug 2023-05-23 10:06:21 +02:00
af78809ae5 add settings-entry; add consentmanager-option 2023-05-15 15:06:25 +02:00
d531ba648b fix unnecessary convert of int to str 2023-05-12 14:08:52 +02:00
a0c650fca3 Merge branch 'rel_2.x' 2023-05-11 15:26:45 +02:00
af341a984b Merge branch 'rel_1.x'
# Conflicts:
#	CHANGELOG.md
#	metadata.php
2023-05-11 15:26:31 +02:00
122dd4cf53 genuine code cleanup; switch hard-getter to methods and use price-object 2023-05-10 15:01:56 +02:00
27798703b0 bump version && changelog to 2.4.0 2023-05-02 14:36:52 +02:00
8eb734be8a OXID UserCentrics support, general overhaul for cookie managers 2023-05-02 14:28:47 +02:00
616f31ecba Merge remote-tracking branch 'remotes/origin/rel_2.x' 2023-03-20 15:46:58 +01:00
527eec1355 bump changelog 2023-03-20 11:01:03 +01:00
1966d3008e Merge remote-tracking branch 'remotes/origin/rel_2.x_custB' into rel_2.x 2023-03-20 10:56:29 +01:00
bd51b37159 hot-fix: add missing view_item file; add metadata entry 2023-03-20 09:49:49 +01:00
718b60e12c Merge remote-tracking branch 'remotes/origin/rel_2.x' 2023-03-17 15:31:34 +01:00
d4df87bfff Merge remote-tracking branch 'remotes/origin/rel_1.x' into rel_2.x 2023-03-17 15:30:03 +01:00
63007e9b02 bump version 2023-03-10 11:25:12 +01:00
5fe656988c genuine cleaning off of unnecessary files (prevent confusion) 2023-03-10 11:22:49 +01:00
9cb3a54824 Merge remote-tracking branch 'remotes/origin/rel_2.x' 2023-02-22 14:35:22 +01:00
2f6fd8a31c bump version 2023-02-22 14:31:28 +01:00
8f9ed021d6 bump version 2023-02-22 14:07:14 +01:00
0ef3d3373a Merge remote-tracking branch 'remotes/origin/dev/view_cart/illegal_character_U+20AC' into rel_2.x 2023-02-22 14:05:56 +01:00
fd2b4a5bbe add special price formatting 2023-02-22 13:46:27 +01:00
1c0d55bdc3 Merge remote-tracking branch 'remotes/origin/rel_2.x' 2023-02-21 12:47:38 +01:00
7c1f99e678 Merge remote-tracking branch 'remotes/origin/rel_2.x' 2023-02-21 12:47:02 +01:00
126e746651 missing changelog-entry 2023-02-21 12:46:34 +01:00
1c45a16356 bump version 2023-02-21 12:27:52 +01:00
1589f202a9 add own cookie-check method; rm unnecessary help-text 2023-02-21 12:09:04 +01:00
55bd7b7fb4 adjust module_options meta-docs 2023-02-01 14:27:49 +01:00
3c1e6a11ff bump version 2023-01-27 13:47:13 +01:00
9ac78a0d43 OST:#573111 fix bug - missing use 2023-01-27 13:43:29 +01:00
e2bcb34051 bump version 2023-01-27 11:11:09 +01:00
4ea0c19d7b Merge remote-tracking branch 'remotes/origin/rel_1.x' into rel_2.x 2023-01-27 11:04:23 +01:00
56740f1f10 rm unnecessary method call in gtm_js.tpl 2023-01-27 09:19:05 +01:00
daed30a585 rm unnecessary entries in metadata 2023-01-27 09:07:22 +01:00
48d411ac3f switch head-meta-infos 2023-01-27 09:07:09 +01:00
b530366cb8 rm unnecessary lang file 2023-01-27 09:06:49 +01:00
975d07056a cleaning off branding 2023-01-27 08:59:06 +01:00
24bf113d30 switch comment in changelog of 2.0 2023-01-26 09:20:56 +01:00
ca6a810fa3 add 1.0 section to changelog 2023-01-26 09:16:51 +01:00
62b382eadf adding tech-docs; rm unnecessary sections in readme; fixing wrong links 2023-01-26 09:15:10 +01:00
45d8e45137 fix missing entries in changelog 2023-01-25 10:58:24 +01:00
70f2308575 extend changelog and readme 2023-01-25 10:48:02 +01:00
6eb15ec080 add block description 2023-01-20 14:31:39 +01:00
d722c46a74 bump metadata-version 2023-01-20 11:26:09 +01:00
d847a34e99 set compatibility to oxid 6.5 and above 2023-01-20 11:24:30 +01:00
7b55d1d57c adjust requirements 2023-01-20 11:18:48 +01:00
a25be1069c rework code to actually fit 6.0.x && 6.1x 2023-01-20 11:18:17 +01:00
5200232a32 Merge remote-tracking branch 'remotes/origin/rel_1.x' into dev_1.x_OXID_6.3 2023-01-20 11:11:17 +01:00
bcd785774b adjusting composer.json to fit corresponding shop-version 2022-12-22 08:56:45 +01:00
5ba613df30 add currency to the params 2022-12-21 11:12:35 +01:00
a1dc0a6a58 fix bug that'd fail in wave and fail iIndex 2022-12-09 14:51:45 +01:00
11 changed files with 249 additions and 151 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
.idea

View File

@ -31,11 +31,11 @@ $aLang = [
// for cookie manager settings
'SHOP_MODULE_GROUP_d3_gtm_settings_cookiemanager' => 'Cookie Manager Einstellungen',
'SHOP_MODULE_d3_gtm_settings_hasOwnCookieManager' => 'Cookie Manager nutzen?',
'HELP_SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER' => 'Mehr Informationen zu den genannten Coookie-Manager finden Sie auf den folgenden Home-Pages<br><br>
'HELP_SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER' => 'Mehr Informationen zu den genannten Coookie-Manager finden Sie auf den folgenden Home-Pages<br>
<a href="https://consentmanager.net/">Consentmanager</a><br>
<a href="https://usercentrics.com/">Usercentrics</a><br>
<a href="https://cookiefirst.com">Cookiefirst</a><br>
<hr>
Bei weiteren Fragen stehen wir gern zur Verfügung! Kontaktieren Sie uns einfach unter <a href="https://www.d3data.de/">https://www.d3data.de/</a>',
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER' => 'Nutzen Sie eine der folgenden Einbindungen?<br>
Dann wählen Sie bitte die zutreffende aus.',

View File

@ -1,46 +1,46 @@
[{$smarty.block.parent}]
[{assign var="gtmProducts" value=$oView->getArticleList()}]
[{assign var="gtmCategory" value=$oView->getActiveCategory()}]
[{assign var="breadCrumb" value=''}]
[{block name="d3_ga4_view_item_list_block"}]
[{if $gtmProducts|@count}]
[{capture assign=d3_ga4_view_item_list}]
[{strip}]
dataLayer.push({ecommerce: null});
dataLayer.push({
'event':'view_item_list',
'event_name': 'view_item_list',
'ecommerce': {
'item_list_id': '[{$oView->getCategoryId()}]',
'item_list_name': '[{foreach from=$oView->getBreadCrumb() item=sCrum}][{if $sCrum.title }][{$breadCrumb|cat:$sCrum.title|cat:" > "}][{/if}][{/foreach}]',
'items': [
[{foreach from=$gtmProducts name="gtmProducts" item="gtmProduct"}]
[{assign var="d3PriceObject" value=$gtmProduct->getPrice()}]
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
[{if !$gtmCategory}][{assign var="gtmCategory" value=$gtmProduct->getCategory()}][{/if}]
{
'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]',
'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}]
]
}[{if $oViewConf->isDebugModeOn()}],
'debug_mode': 'true'
[{/if}]
});
[{/strip}]
[{/capture}]
[{oxscript add=$d3_ga4_view_item_list}]
[{/if}]
[{$smarty.block.parent}]
[{assign var="gtmProducts" value=$oView->getArticleList()}]
[{assign var="gtmCategory" value=$oView->getActiveCategory()}]
[{assign var="breadCrumb" value=''}]
[{block name="d3_ga4_view_item_list_block"}]
[{if $gtmProducts|@count}]
[{capture assign=d3_ga4_view_item_list}]
[{strip}]
dataLayer.push({ecommerce: null});
dataLayer.push({
'event':'view_item_list',
'event_name': 'view_item_list',
'ecommerce': {
'item_list_id': '[{$oView->getCategoryId()}]',
'item_list_name': '[{foreach from=$oView->getBreadCrumb() item=sCrum}][{if $sCrum.title }][{$breadCrumb|cat:$sCrum.title|cat:" > "}][{/if}][{/foreach}]',
'items': [
[{foreach from=$gtmProducts name="gtmProducts" item="gtmProduct"}]
[{assign var="d3PriceObject" value=$gtmProduct->getPrice()}]
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
[{if !$gtmCategory}][{assign var="gtmCategory" value=$gtmProduct->getCategory()}][{/if}]
{
'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]',
'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}]
]
}[{if $oViewConf->isDebugModeOn()}],
'debug_mode': 'true'
[{/if}]
});
[{/strip}]
[{/capture}]
[{oxscript add=$d3_ga4_view_item_list}]
[{/if}]
[{/block}]

View File

@ -4,18 +4,115 @@ 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).
## [1.11.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.11.0...1.11.1) - 2023-08-17
### Fixed
- metadata class entry
## [1.11.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.10.0...1.11.0) - 2023-08-16
## [2.11.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.10.1...2.11.0) - 2023-08-23
### Added
- remove_from_cart
- auto debug_mode setter
- manufacturer extension for breadcrumb
- manufacturer extension
- working debug_mode
### Changed
- check for 'article has been removed'
- general template cleanup
## [2.10.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.10.0...2.10.1) - 2023-08-03
### Added
- missing param to identify the event
## [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
## [2.8.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.7.0...2.8.0) - 2023-06-23
### Added
- Method to get the in order used Payment-Name
- Method to get the current Article Category
- Following Entries to dedicated event-templates
- coupon
- paymentType
- item_list_name
- item_category
### Changed
- all used template-files have a more dedicated name
- general code cleanup
## [2.7.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.6.0...2.7.0) - 2023-06-19
### Changed
- add_to_cart event template-structure
## [2.6.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.5.0...2.6.0) - 2023-05-31
### Added
- add settings to explicit choose an external service (usercentrics/ consentmanager)
- position to block-extension
- extended instructions to check for in readme
### Fixed
- usercentrics script
- missing right articleList-getter
### Changed
- view_item_list-template block extension
- cookieManager handling
### Removed
- additional check for cookieManagerType
## [2.5.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.4.0...2.5.0) - 2023-05-23
### Added
- additional settings to explicitly indicate that consentmanager is used
### Fixed
- unnecessary converting of int to str
- missing PriceObject-bug
### Changed
- genuine code cleanup
## [2.4.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.3.3...2.4.0) - 2023-05-02
### Added
- "OXID Cookie Management powered by usercentrics" compatibility
- usercentrics defined script attributes
- cookie-manager evaluation
### Changed
- genuine clean up of base-js-files
## [2.3.3](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.3.2...2.3.3) - 2023-03-20
### Fixed
- metadata file path for view_item
## [2.3.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.2.2...2.3.2) - 2023-03-17
### Added
- Aggrosoft-Cookie-Consent compatibility
### Fixed
- wrong function for pageview on thankyou page
### Deleted
- unused files
## [2.2.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.2.1...2.2.2) - 2023-02-22
### Fixed
- price formatting in view_cart
## [2.2.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.1.1...2.2.1) - 2023-02-21
### Added
- cookie handling
## [2.1.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.1...2.1.1) - 2023-01-27
### Fixed
- add missing class import
## [2.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.0...2.1) - 2023-01-27
### Added
- block section for add_to_basket js
- template block order positions
## [2.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.1...2.0) - 2023-01-20
### Added
- using of ContainerFactory in ViewConfig
## [1.10.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.9.0...1.10.0) - 2023-06-27
### Added
- Following Entries to dedicated event-templates

View File

@ -12,7 +12,7 @@ Für den geregelten Ablauf sind folgende Blöcke nötig:
- Datei: page/search/search.tpl
- GA4 Event: view_search_results
- Artikelliste
- Blockname: page_list_productlist
- Blockname: page_list_productlist (muss hinzugefügt werden)
- Datei: page/list/list.tpl
- GA4 Event: view_item_list
- Detailseite
@ -23,10 +23,6 @@ Für den geregelten Ablauf sind folgende Blöcke nötig:
- Blockname: details_productmain_tobasket
- Datei: page/details/inc/productmain.tpl
- GA4 Event: add_to_cart
- aus dem WK entfernen
- Blockname: checkout_basket_main
- Datei: page/checkout/basket.tpl
- GA4 Event: remove_from_cart
- Warenkorb
- Blockname: checkout_basket_main
- Datei: page/checkout/basket.tpl

View File

@ -24,5 +24,4 @@ namespace D3\GoogleAnalytics4\Modules\Application\Model{
namespace D3\GoogleAnalytics4\Modules\Application\Controller{
class BasketController_parent extends \OxidEsales\Eshop\Application\Controller\BasketController {}
class ThankYouController_parent extends \OxidEsales\Eshop\Application\Controller\ThankYouController {}
}

View File

@ -52,7 +52,8 @@ class BasketController extends BasketController_parent
$sBasketItemId = Registry::getRequest()->getRequestEscapedParameter('bindex');
$aProducts[$sProductId] = ['am' => $dAmount,
$aProducts[$sProductId] = [
'am' => $dAmount,
'sel' => $aSel,
'persparam' => $aPersParam,
'basketitemid' => $sBasketItemId
@ -63,9 +64,7 @@ class BasketController extends BasketController_parent
$toRemoveArticleIdList = [];
$artIdOnArtAmountList = [];
if (Registry::getRequest()->getRequestEscapedParameter('removeBtn') !== null
or Registry::getRequest()->getRequestParameter('updateBtn') !== null) {
if ($this->isArticleRemovedState($aProducts)) {
//setting amount to 0 if removing article from basket
foreach ($aProducts as $sProductId => $aProduct) {
if ((isset($aProduct['remove']) && $aProduct['remove']) or intval($aProduct['am']) === 0) {
@ -100,4 +99,29 @@ class BasketController extends BasketController_parent
$this->addTplParam('toRemoveArticles', $oArtList);
}
}
/**
* @return bool
*
* checks, if we're in the short state of "an Article has been removed"
* We check by looking for the "'removeBtn' is not null", as a sign for it has been triggered/ clicked
* if that doesn't work, we check if there's an Article in the Products array, that has "'am' = 0"
* Which also shows we're in that state rn
*/
protected function isArticleRemovedState(array $productsArray) :bool
{
if (Registry::getRequest()->getRequestEscapedParameter('removeBtn')
or Registry::getRequest()->getRequestEscapedParameter('updateBtn')
){
return true;
}else{
foreach ($productsArray as $aProduct) {
if (intval($aProduct['am']) === 0) {
return true;
}
}
}
return false;
}
}

View File

@ -1,22 +0,0 @@
<?php
namespace D3\GoogleAnalytics4\Modules\Application\Controller;
use OxidEsales\Eshop\Application\Model\Country;
class ThankYouController extends ThankYouController_parent
{
/**
* @return Country
*/
public function d3GAGetUserCountry()
{
$sCountryId = $this->getOrder()->getFieldData('oxbillcountryid');
/** @var Country $oCountry */
$oCountry = oxNew(Country::class);
$oCountry->load($sCountryId);
return $oCountry;
}
}

View File

@ -17,6 +17,8 @@ use D3\GoogleAnalytics4\Application\Model\ManagerTypes;
use OxidEsales\Eshop\Application\Controller\FrontendController;
use OxidEsales\Eshop\Core\Config;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Bridge\ModuleSettingBridgeInterface;
class ViewConfig extends ViewConfig_parent
{
@ -29,7 +31,10 @@ class ViewConfig extends ViewConfig_parent
{
if ($this->sContainerId === null)
{
$this->sContainerId = $this->getConfig()->getConfigParam('d3_gtm_sContainerID');
$this->sContainerId = ContainerFactory::getInstance()
->getContainer()
->get(ModuleSettingBridgeInterface::class)
->get('d3_gtm_sContainerID', 'd3googleanalytics4');
}
return $this->sContainerId;
}
@ -152,7 +157,10 @@ class ViewConfig extends ViewConfig_parent
{
if ($this->blGA4enabled === null)
{
$this->sContainerId = $this->getConfig()->getConfigParam('d3_gtm_blEnableGA4');
$this->sContainerId = ContainerFactory::getInstance()
->getContainer()
->get(ModuleSettingBridgeInterface::class)
->get('d3_gtm_blEnableGA4', 'd3googleanalytics4');
}
return $this->blGA4enabled;

View File

@ -1,56 +1,56 @@
{
"name": "d3/google-analytics4",
"description": "Google Tag Manager with new Google Analytics 4 for OXID eShop v6",
"type": "oxideshop-module",
"keywords": [
"oxid",
"modules",
"eShop",
"d3",
"google",
"ga4",
"googleanalytics",
"gtm",
"configuration"
],
"homepage": "https://www.d3data.de",
"license": [
"GPL-3.0"
],
"authors": [
{
"name": "Marat Bedoev",
"email": "hello@mb-dev.pro"
},
{
"name": "D3 Data Development (Inh. Thomas Dartsch)",
"email": "info@shopmodule.com",
"homepage": "https://www.d3data.de"
}
],
"support": {
"email": "support@shopmodule.com"
},
"extra": {
"oxideshop": {
"blacklist-filter": [
"*.md",
"composer.json",
".php-cs-fixer.php",
"*.xml",
"*.neon"
],
"target-directory": "d3/googleanalytics4"
}
},
"require": {
"php": ">=7.1",
"oxid-esales/oxideshop-ce": "v6.0 - 6.3",
"google/apiclient":" ^2.0"
},
"autoload": {
"psr-4": {
"D3\\GoogleAnalytics4\\": "../../../source/modules/d3/googleanalytics4"
}
}
{
"name": "d3/google-analytics4",
"description": "Google Tag Manager with new Google Analytics 4 for OXID eShop v6",
"type": "oxideshop-module",
"keywords": [
"oxid",
"modules",
"eShop",
"d3",
"google",
"ga4",
"googleanalytics",
"gtm",
"configuration"
],
"homepage": "https://www.d3data.de",
"license": [
"GPL-3.0"
],
"authors": [
{
"name": "Marat Bedoev",
"email": "hello@mb-dev.pro"
},
{
"name": "D3 Data Development (Inh. Thomas Dartsch)",
"email": "info@shopmodule.com",
"homepage": "https://www.d3data.de"
}
],
"support": {
"email": "support@shopmodule.com"
},
"extra": {
"oxideshop": {
"blacklist-filter": [
"*.md",
"composer.json",
".php-cs-fixer.php",
"*.xml",
"*.neon"
],
"target-directory": "d3/googleanalytics4"
}
},
"require": {
"php": ">=7.1",
"oxid-esales/oxideshop-ce": "^6.5",
"google/apiclient":" ^2.0"
},
"autoload": {
"psr-4": {
"D3\\GoogleAnalytics4\\": "../../../source/modules/d3/googleanalytics4"
}
}
}

View File

@ -1,13 +1,11 @@
<?php
use D3\GoogleAnalytics4\Modules\Application\Controller\BasketController;
use D3\GoogleAnalytics4\Modules\Application\Controller\ThankYouController;
use D3\GoogleAnalytics4\Modules\Application\Model\Basket as Basket;
use D3\GoogleAnalytics4\Modules\Application\Model\Category as Category;
use D3\GoogleAnalytics4\Modules\Application\Model\Manufacturer as Manufacturer;
use D3\GoogleAnalytics4\Modules\Core\ViewConfig;
use OxidEsales\Eshop\Application\Controller\BasketController as OEBasketController;
use OxidEsales\Eshop\Application\Controller\ThankYouController as OEThankYouController;
use OxidEsales\Eshop\Application\Model\Basket as OEBasket;
use OxidEsales\Eshop\Application\Model\Category as OECategory;
use OxidEsales\Eshop\Application\Model\Manufacturer as OEManufacturer;
@ -28,17 +26,16 @@ $aModule = [
Die Entwicklung basiert auf einem Fork von Marat Bedoev - <a href='https://github.com/vanilla-thunder/oxid-module-gtm'>Github-Link</a>
",
'thumbnail' => 'thumbnail.png',
'version' => '1.11.0',
'version' => '2.11.0',
'author' => 'Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'https://www.oxidmodule.com/',
'extend' => [
OEViewConfig::class => ViewConfig::class,
OECategory::class => Category::class,
OEBasket::class => Basket::class,
OEBasketController::class => BasketController::class,
OEManufacturer::class => Manufacturer::class,
OEThankYouController::class => ThankYouController::class
OEBasket::class => Basket::class,
OEBasketController::class => BasketController::class
],
'templates' => [],
'blocks' => [