From 5ad648a394e36a789936ee34d915b06c1d2ee64c Mon Sep 17 00:00:00 2001 From: RayEhrhardt Date: Thu, 30 Oct 2014 09:06:01 +0000 Subject: [PATCH 1/3] Fixed php5.3 compatibility. #3181 --- .../modules/components/d3_oxcmp_utils_googleanalytics.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php b/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php index ebba2e0..933b22e 100644 --- a/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php +++ b/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php @@ -293,7 +293,8 @@ class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_pare public function d3GetGTSLang() { $aHomeCountries = oxRegistry::getConfig()->getConfigParam('aHomeCountry'); - $sHomeCountryId = $aHomeCountries[array_keys($aHomeCountries)[0]]; + $aKeys = array_keys($aHomeCountries); + $sHomeCountryId = $aHomeCountries[current($aKeys)]; /** @var oxcountry $oCountry */ $oCountry = oxNew('oxcountry'); $oCountry->load($sHomeCountryId); @@ -326,7 +327,6 @@ class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_pare return array('aArtIdList' => $aArticleIds); } - /** * @param array $aArticleIds * @@ -335,7 +335,9 @@ class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_pare public function d3GATSGetProdIdList($aArticleIds) { if (count($aArticleIds)) { - return $aArticleIds[array_keys($aArticleIds)[0]]; + $aKeys = array_keys($aArticleIds); + + return $aArticleIds[current($aKeys)]; } else { return "not_set"; } From ecef4fededf90611d92e4124aed9a20a0797ca42 Mon Sep 17 00:00:00 2001 From: RayEhrhardt Date: Thu, 20 Nov 2014 11:04:23 +0000 Subject: [PATCH 2/3] #3246 --- .../d3/d3_googleanalytics/metadata.php | 2 +- .../models/d3_oxorder_googleanalytics.php | 42 +++++-------------- .../setup/d3_googleanalytics_update.php | 16 +++---- setup+doku/Precheck/d3precheck.php | 2 +- setup+doku/changelog.txt | 3 ++ 5 files changed, 24 insertions(+), 41 deletions(-) diff --git a/copy_this/modules/d3/d3_googleanalytics/metadata.php b/copy_this/modules/d3/d3_googleanalytics/metadata.php index 1b47b7e..24dd95e 100644 --- a/copy_this/modules/d3/d3_googleanalytics/metadata.php +++ b/copy_this/modules/d3/d3_googleanalytics/metadata.php @@ -40,7 +40,7 @@ $aModule = array( 'Trusted Shops account to your shop.', ), 'thumbnail' => 'picture.png', - 'version' => '3.3.0.0', + 'version' => '3.3.0.1', 'author' => 'D³ Data Development (Inh. Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'http://www.oxidmodule.com/', diff --git a/copy_this/modules/d3/d3_googleanalytics/modules/models/d3_oxorder_googleanalytics.php b/copy_this/modules/d3/d3_googleanalytics/modules/models/d3_oxorder_googleanalytics.php index b2d8c20..c5db052 100644 --- a/copy_this/modules/d3/d3_googleanalytics/modules/models/d3_oxorder_googleanalytics.php +++ b/copy_this/modules/d3/d3_googleanalytics/modules/models/d3_oxorder_googleanalytics.php @@ -13,11 +13,10 @@ * * For further informations, see . * - * @link http://www.oxidmodule.com - * @link http://www.shopmodule.com + * @link http://www.oxidmodule.com + * @link http://www.shopmodule.com * @copyright (C) D3 Data Development (Inh. Thomas Dartsch) */ - class d3_oxorder_googleanalytics extends d3_oxorder_googleanalytics_parent { /** @@ -57,40 +56,21 @@ class d3_oxorder_googleanalytics extends d3_oxorder_googleanalytics_parent * * @return null|void */ - protected function _setOrderArticles( $aArticleList ) + protected function _setOrderArticles($aArticleList) { parent::_setOrderArticles($aArticleList); /** @var d3_oxbasketitem_googleanalytics $oBasketItem */ foreach ($aArticleList as $oBasketItem) { - $oOrderArticle = $this->_d3getOrderArticleFromBasketItem($oBasketItem); - if ($oOrderArticle) { - $aContent['d3_galocator'] = $oBasketItem->d3GetLocatorTitle(); - $oOrderArticle->assign($aContent); - $oOrderArticle->save(); + /** @var oxorderarticle $oOrderArticle */ + foreach ($this->_oArticles as $sArticleId => $oOrderArticle) { + $blArtIdMatch = $oOrderArticle->getFieldData('oxartid') == $oBasketItem->getProductId(); + $blAmountMatch = $oOrderArticle->getFieldData('oxamount') == $oBasketItem->getAmount(); + $blPersParamMatch = (null == $oBasketItem->getPersParams() || $oOrderArticle->getFieldData('oxpersparam') == $oBasketItem->getPersParams()); + if ($blArtIdMatch && $blAmountMatch && $blPersParamMatch) { + $this->_oArticles->offsetGet($sArticleId)->assign(array('d3_galocator' => $oBasketItem->d3GetLocatorTitle())); + } } } } - - /** - * @param oxbasketitem $oBasketItem - * - * @return false|oxorderarticle - */ - protected function _d3getOrderArticleFromBasketItem($oBasketItem) - { - $aPersParams = $oBasketItem->getPersParams(); - - /** @var oxorderarticle $oOrderArticle */ - foreach ($this->_oArticles as $sArticleId => $oOrderArticle) { - if ($oOrderArticle->getFieldData('oxartid') == $oBasketItem->getProductId() && - $oOrderArticle->getFieldData('oxamount') == $oBasketItem->getAmount() && - (null == $aPersParams || $oOrderArticle->getFieldData('oxpersparam') == $aPersParams) - ) { - return $this->_oArticles->offsetGet($sArticleId); - } - } - - return false; - } } diff --git a/copy_this/modules/d3/d3_googleanalytics/setup/d3_googleanalytics_update.php b/copy_this/modules/d3/d3_googleanalytics/setup/d3_googleanalytics_update.php index 98eb091..833eb87 100644 --- a/copy_this/modules/d3/d3_googleanalytics/setup/d3_googleanalytics_update.php +++ b/copy_this/modules/d3/d3_googleanalytics/setup/d3_googleanalytics_update.php @@ -21,18 +21,18 @@ class d3_googleanalytics_update extends d3install_updatebase public $sModName = 'Google Services Schnittstelle'; - public $sModVersion = '3.3.0.0'; + public $sModVersion = '3.3.0.1'; - public $sModRevision = '196'; + public $sModRevision = '197'; // heredoc syntax using for class members is available from PHP 5.3 up public $sBaseConf = - "2kGUVVXMXJZNUlFdkwvcCtzTEJ1QkxvSW1HSm5zV3M4a1UxTU90VEtBaGNIeTZKSGVPRXJ6MDc0UTk4O -FpodEtKUEZuc2hxSDZnUEhaQmtqRFBoN3dqN21ncm9zY1FGaEdqUE15T0JoSGllSU8rWVZUbWhHSnpxM -UNXSnpyUm1GYWZaN092Rkw1T2tEZXliTml4OFFlRTZGWnY5emxKa0JjV1VTZ2I5T2FETklZOEwyd2Rnc -FF3S3pHMklCbkZyVGNvQkIvUDlQWENNTHBJQmNPKzBvSFZnUUxVSTVYOUU3OW9YeWJqRkxZZUs5YjFSS -XNCYTJ0SzNZZ1J4bUFNK25HM1FkQ3NxLzRvWkYwYjVvdXZKNXdWV0FZT0FPemsyRjI5TGJUbWZJMnU2Q -nc9"; + "J0wL0pyTiszdC83VWJsWXhPZ0RIQm93RVI4ampycUNBdTZQYnFlT1dMemIybnU0Z0wrUThLM21IS2dyY +VdZbjM2QnovWmREQ1d0cUlWS3JVY3oycklqMU5Odm5WMzg0empqNmlGMVFZVWlKeHI3QWJSaUJKMktVd +UZwTlR3S05yZGZSNEQvSkExSEphQ3JDanU3L1ZrVks5WFF2eHNMUTJkejNHQ3Z3T2YwelZTWHdNOFdWa +Vk2ZFNzRzNzVktNZjNaUjdtYkxrQVYwWDQwUXNSZkdkMUxMZUpKNnRWMVVxN0pVcHZkQWdjMWxrMTVSO +Fc2dE5iei9xdWFjMkgxOEdJSUt5QXVhbHBWTUdJNEFzMmM4cXpGVmNkeWJROU1pTitkVThlSjhEamZhe +G89"; public $sRequirements = ''; diff --git a/setup+doku/Precheck/d3precheck.php b/setup+doku/Precheck/d3precheck.php index 499530b..2303820 100644 --- a/setup+doku/Precheck/d3precheck.php +++ b/setup+doku/Precheck/d3precheck.php @@ -43,7 +43,7 @@ class requConfig public $sModId = 'd3_googleanalytics'; - public $sModVersion = '3.3.0.0'; + public $sModVersion = '3.3.0.1'; /********************** check configuration section ************************/ diff --git a/setup+doku/changelog.txt b/setup+doku/changelog.txt index d7c9a99..0ef47c0 100644 --- a/setup+doku/changelog.txt +++ b/setup+doku/changelog.txt @@ -1,3 +1,6 @@ +=> 3.3.0.1 +- Kompatibilität zu Egate Media PayPal verbessert + => 3.3.0.0 - Google Zertifierte Händler eingefügt - Hilfetexte erweitert From 72e69c51687d1725ad9e8414a5d53c8a60e8227c Mon Sep 17 00:00:00 2001 From: RayEhrhardt Date: Thu, 20 Nov 2014 11:07:58 +0000 Subject: [PATCH 3/3] Merge from 3.3.0.0 --- setup+doku/changelog.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup+doku/changelog.txt b/setup+doku/changelog.txt index 0ef47c0..3ad6649 100644 --- a/setup+doku/changelog.txt +++ b/setup+doku/changelog.txt @@ -2,13 +2,13 @@ - Kompatibilität zu Egate Media PayPal verbessert => 3.3.0.0 -- Google Zertifierte Händler eingefügt +- Google Zertifizierte Händler eingefügt - Hilfetexte erweitert - Integration ins Mobile-Theme - Optimierung der Transaktionsübergaben - getrackte Absprungrate optimiert -- Konfigurationsvariablen korrgiert -- Fehler bei "toBasket" auf Detailseie ohne Kategorieangabe korrigert +- Konfigurationsvariablen korrigiert +- Fehler bei "toBasket" auf Detailseite ohne Kategorieangabe korrigiert => 3.2.1.0 - neue Option "Opt Out anzeigen lassen"