Merge remote-tracking branch 'remotes/origin/rel_2.x' into dev_3.x__OX7_twig
Dieser Commit ist enthalten in:
@ -12,9 +12,6 @@ use OxidEsales\Eshop\Core\Module\Module;
|
||||
use OxidEsales\Eshop\Core\Registry;
|
||||
use OxidEsales\Eshop\Core\Str;
|
||||
use OxidEsales\Eshop\Core\ViewConfig;
|
||||
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
|
||||
use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\ModuleSettingService;
|
||||
use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\ModuleSettingServiceInterface;
|
||||
|
||||
class GA4AdminUserInterface_main extends \OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController
|
||||
{
|
||||
|
@ -3,9 +3,9 @@
|
||||
return [
|
||||
'charset' => 'UTF-8',
|
||||
|
||||
'D3MXDMODULES' => $aLangCache['d3mxd3modules'] ?? 'Google Analytics 4',
|
||||
'D3MXGOOGLEANALYTICS4' => 'Google Analytics 4',
|
||||
'D3MXGOOGLEANALYTICS4SET' => 'Einstellungen',
|
||||
'd3mxgoogleanalytics4' => 'Google Analytics 4',
|
||||
'd3mxd3modules' => $aLangCache['d3mxd3modules'] ?? 'Google Analytics 4',
|
||||
'd3mxgoogleanalytics4set' => 'Einstellungen',
|
||||
|
||||
// Base Translations
|
||||
'D3BASECONFIG' => 'Grundeinstellungen',
|
||||
|
19
CHANGELOG.md
19
CHANGELOG.md
@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [unreleased](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/3.0.0.1...rel_3.x) - 2025-x
|
||||
|
||||
## [3.1.0.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/3.0.0.1...3.1.0.0) - 2025-06-29
|
||||
### Changed
|
||||
- data getter and saver to 'state fo the art'
|
||||
### Added
|
||||
- Twig usability
|
||||
- previous major-version addings
|
||||
|
||||
## [3.0.0.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/3.0.0.0...3.0.0.1) - 2024-03-19
|
||||
### Fixed
|
||||
- reset of cmp-selection
|
||||
@ -16,6 +23,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- installability OXID 7
|
||||
- don't submit item prices, if user doesn't have "show price" right
|
||||
|
||||
## [2.24.0.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.23.0.2...2.24.0.0) - 2025-06-12
|
||||
### Fixed
|
||||
- return payment-object instead of string
|
||||
- missing semicolon
|
||||
- irritating admin-list module-group-name
|
||||
### Added
|
||||
- 'item_oxid' parameter
|
||||
- 'item_brand' parameter
|
||||
- setting to use literal category-title
|
||||
- setting to replace chars in item_category-parameter
|
||||
- setting to list article-variants into parameter-array
|
||||
|
||||
## [2.23.0.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.23.0.1...2.23.0.2) - 2025-03-19
|
||||
### Fixed
|
||||
- reset of cmp-selection
|
||||
|
@ -4,10 +4,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace D3\GoogleAnalytics4\Modules\Application\Model;
|
||||
|
||||
|
||||
use OxidEsales\Eshop\Application\Model\Payment;
|
||||
use OxidEsales\Eshop\Core\Registry;
|
||||
|
||||
class gtmPayment extends gtmPayment_parent
|
||||
{
|
||||
/**
|
||||
@ -15,6 +11,6 @@ class gtmPayment extends gtmPayment_parent
|
||||
*/
|
||||
public function gtmGetSelectedPaymentName(): string
|
||||
{
|
||||
return $this->getFieldData('oxpayments__oxdesc') ?: 'No payment name available';
|
||||
return (string)$this->getFieldData('oxpayments__oxdesc')?: 'No payment name available';
|
||||
}
|
||||
}
|
||||
|
@ -216,9 +216,33 @@ class ViewConfig extends ViewConfig_parent
|
||||
'sessionid' => session_id(),
|
||||
//'httpref' => $_SERVER["HTTP_REFERER"] ?? "unknown"
|
||||
];
|
||||
|
||||
$dataLayer = $this->d3AdditionalGlobalAnalyticsVariables($dataLayer);
|
||||
|
||||
return json_encode([$dataLayer], JSON_PRETTY_PRINT);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $dataLayerGlobals
|
||||
* @return array
|
||||
*/
|
||||
public function d3AdditionalGlobalAnalyticsVariables(array $dataLayerGlobals) :array
|
||||
{
|
||||
/** @var User $oUser */
|
||||
$oUser = Registry::getSession()->getUser();
|
||||
if ($oUser and $oUser->getFieldData('OXUSERNAME')){
|
||||
$sUsername = $oUser->getFieldData('OXUSERNAME') ?: "";
|
||||
$iCustNr = $oUser->getFieldData('OXCUSTNR') ?: "";
|
||||
$iZipCode = $oUser->getFieldData('OXZIP') ?: "";
|
||||
|
||||
return array_merge($dataLayerGlobals, [
|
||||
'custnr' => $iCustNr,
|
||||
'email' => $sUsername,
|
||||
'zipcode' => $iZipCode
|
||||
]);
|
||||
}
|
||||
return $dataLayerGlobals;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
|
@ -34,13 +34,13 @@
|
||||
"require": {
|
||||
"php": "^8.0",
|
||||
"oxid-esales/oxideshop-ce": "7.0 - 7.2",
|
||||
"google/apiclient":" ^2.0",
|
||||
"phpstan/phpstan": "^1.10"
|
||||
"google/apiclient":" ^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^3.9"
|
||||
"friendsofphp/php-cs-fixer": "^3.9",
|
||||
"phpstan/phpstan": "^1.10"
|
||||
},
|
||||
"autoload": {
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"D3\\GoogleAnalytics4\\": ""
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
'item_category4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3, true)}]',
|
||||
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
|
||||
[{/if}]
|
||||
'price': [{$gtmItemPriceObject->getPrice()}],
|
||||
[{oxhasrights ident="SHOWARTICLEPRICE"}]'price': [{$gtmItemPriceObject->getPrice()}],[{/oxhasrights}]
|
||||
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
|
||||
'quantity': [{$basketitem->getAmount()}],
|
||||
'position': [{$smarty.foreach.gtmCartContents.index}]
|
||||
|
@ -44,7 +44,7 @@
|
||||
'item_category4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3, true)}]',
|
||||
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
|
||||
[{/if}]
|
||||
'price': [{$d3oItemPrice->getPrice()}],
|
||||
[{oxhasrights ident="SHOWARTICLEPRICE"}]'price': [{$d3oItemPrice->getPrice()}],[{/oxhasrights}]
|
||||
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
|
||||
'quantity': [{$basketitem->getAmount()}],
|
||||
'position': [{$smarty.foreach.gtmCartContents.index}]
|
||||
|
@ -43,7 +43,7 @@
|
||||
'item_category4': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(3, true)}]',
|
||||
'item_list_name': '[{$gtmPurchaseItemCategory->getSplitCategoryArray()}]',
|
||||
[{/if}]
|
||||
'price': [{$gtmPurchaseItemPriceObject->getPrice()}],
|
||||
[{oxhasrights ident="SHOWARTICLEPRICE"}]'price': [{$gtmPurchaseItemPriceObject->getPrice()}],[{/oxhasrights}]
|
||||
'quantity': [{$gtmBasketItem->getFieldData("oxamount")}],
|
||||
'position': [{$smarty.foreach.gtmArticles.iteration}]
|
||||
}[{if !$smarty.foreach.gtmArticles.last}],[{/if}]
|
||||
|
@ -29,7 +29,7 @@
|
||||
'item_category4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3, true)}]',
|
||||
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
|
||||
[{/if}]
|
||||
'price': [{$d3oItemPrice->getPrice()}],
|
||||
[{oxhasrights ident="SHOWARTICLEPRICE"}]'price': [{$d3oItemPrice->getPrice()}],[{/oxhasrights}]
|
||||
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
|
||||
'quantity': '[{$rmItem->getFieldData('d3AmountThatGotRemoved')}]',
|
||||
'position': [{$smarty.foreach.gtmRemovedItems.index}]
|
||||
|
@ -34,7 +34,7 @@
|
||||
'item_category4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3, true)}]',
|
||||
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
|
||||
[{/if}]
|
||||
'price': [{$d3oItemPrice->getPrice()}],
|
||||
[{oxhasrights ident="SHOWARTICLEPRICE"}]'price': [{$d3oItemPrice->getPrice()}],[{/oxhasrights}]
|
||||
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
|
||||
'quantity': [{$basketitem->getAmount()}],
|
||||
'position': [{$smarty.foreach.gtmCartContents.index}]
|
||||
|
@ -18,8 +18,8 @@
|
||||
{
|
||||
'item_oxid': '[{$gtmProduct->getFieldData("oxid")}]',
|
||||
'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]',
|
||||
'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]',
|
||||
'price': [{$d3PriceObject->getPrice()}],
|
||||
'item_name': '[{$gtmProduct->getRawFieldData("oxtitle")}]',
|
||||
[{oxhasrights ident="SHOWARTICLEPRICE"}]'price': [{$d3PriceObject->getPrice()}],[{/oxhasrights}]
|
||||
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
||||
[{if $gtmCategory}]
|
||||
'item_category': '[{$gtmCategory->getSplitCategoryArray(0, true)}]',
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren