merge rel_3.x changes to trunk
This commit is contained in:
commit
b9273276dd
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -180,6 +180,8 @@ copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_google
|
||||
copy_this/modules/d3/d3_googleanalytics/modules/controllers/d3_order_googleanalytics.php -text
|
||||
copy_this/modules/d3/d3_googleanalytics/modules/controllers/d3_thankyou_googleanalytics.php -text
|
||||
copy_this/modules/d3/d3_googleanalytics/modules/core/d3_oxutilsview_googleanalytics.php -text
|
||||
copy_this/modules/d3/d3_googleanalytics/modules/models/d3_oxbasket_googleanalytics.php -text
|
||||
copy_this/modules/d3/d3_googleanalytics/modules/models/d3_oxbasketitem_googleanalytics.php -text
|
||||
copy_this/modules/d3/d3_googleanalytics/modules/models/d3_oxorder_googleanalytics.php -text
|
||||
copy_this/modules/d3/d3_googleanalytics/picture.png -text
|
||||
copy_this/modules/d3/d3_googleanalytics/setup/d3_googleanalytics_update.php -text
|
||||
|
Binary file not shown.
@ -138,7 +138,7 @@
|
||||
|
||||
_gaq.push(['_addTrans',
|
||||
'[{$order->oxorder__oxordernr->value}]', [{* // order ID - required *}]
|
||||
'[{ $oxcmp_shop->oxshops__oxname->value}]', [{* // affiliation or store name *}]
|
||||
'[{$oxcmp_shop->oxshops__oxname->value|escape:"quotes"}]', [{* // affiliation or store name *}]
|
||||
[{if $oD3GASettings->getValue('blD3GAUseNetto')}]
|
||||
'[{math equation="s / r" s=$order->getOrderNetSum() r=$currate format="%.2f"}]', [{* // total - required - has to be gross sum *}]
|
||||
[{else}]
|
||||
@ -146,17 +146,18 @@
|
||||
[{/if}]
|
||||
'[{math equation="s - r" s=$order->getTotalOrderSum() r=$order->getOrderNetSum() format="%.2f"}]', [{* // tax *}]
|
||||
'[{math equation="s / r" s=$order->oxorder__oxdelcost->value r=$currate format="%.2f"}]', [{* // shipping *}]
|
||||
'[{ $order->oxorder__oxbillcity->value }]', [{* // city *}]
|
||||
'[{ $order->oxorder__oxbillstate->value }]', [{* // state or province *}]
|
||||
'[{ $order->oxorder__oxbillcountry->value }]' [{* // country *}]
|
||||
'[{$order->oxorder__oxbillcity->value|escape:"quotes"}]', [{* // city *}]
|
||||
'[{$order->oxorder__oxbillstate->value|escape:"quotes"}]', [{* // state or province *}]
|
||||
'[{$order->oxorder__oxbillcountry->value|escape:"quotes"}]' [{* // country *}]
|
||||
]);
|
||||
|
||||
[{foreach from=$order->getOrderArticles() item=oOrderArticle}]
|
||||
_gaq.push(['_addItem',
|
||||
'[{$order->oxorder__oxordernr->value}]', [{* // order ID - required *}]
|
||||
'[{ $oOrderArticle->oxorderarticles__oxartnum->value }]', [{* // SKU/code *}]
|
||||
'[{ $oOrderArticle->oxorderarticles__oxtitle->value }]', [{* // product name *}]
|
||||
'[{ $oOrderArticle->oxorderarticles__oxselvariant->value }]', [{* // category or variation *}]
|
||||
'[{$oOrderArticle->oxorderarticles__oxartnum->value|escape:"quotes"}]', [{* // SKU/code *}]
|
||||
'[{$oOrderArticle->oxorderarticles__oxtitle->value|escape:"quotes"}]', [{* // product name *}]
|
||||
'[{$oOrderArticle->oxorderarticles__d3_galocator->value|escape:"quotes"}]', [{* // category or variation *}]
|
||||
[{*'[{$oOrderArticle->oxorderarticles__oxselvariant->value}]', [{* // category or variation *}]
|
||||
[{if $oD3GASettings->getValue('blD3GAUseNetto')}]
|
||||
[{assign var="oPrice" value=$oOrderArticle->getPrice()}]
|
||||
'[{math equation="s / r" s=$oPrice->getNettoPrice() r=$currate format="%.2f"}]', [{* // unit price - required *}]
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
ga('ecommerce:addTransaction', {
|
||||
'id': '[{$order->oxorder__oxordernr->value}]', [{* Transaction ID. Required *}]
|
||||
'affiliation': '[{$oxcmp_shop->oxshops__oxname->value}]', [{* Affiliation or store name *}]
|
||||
'affiliation': '[{$oxcmp_shop->oxshops__oxname->value|escape:"quotes"}]', [{* Affiliation or store name *}]
|
||||
'revenue': '[{$sTotal}]', [{* Gesamtwert *}]
|
||||
'shipping': '[{$sShipping}]', [{* Versand *}]
|
||||
'tax': '[{$sTax}]' [{* Steuer *}]
|
||||
@ -31,9 +31,10 @@
|
||||
|
||||
ga('ecommerce:addItem', {
|
||||
'id': '[{$order->oxorder__oxordernr->value}]', [{* Transaktions-ID *}]
|
||||
'name': '[{$oOrderArticle->oxorderarticles__oxtitle->value}]', [{* Produktname *}]
|
||||
'sku': '[{$oOrderArticle->oxorderarticles__oxartnum->value}]', [{* SKU/Code *}]
|
||||
'category': '[{$oOrderArticle->oxorderarticles__oxselvariant->value}]', [{* Kategorie oder Ausführung *}]
|
||||
'name': '[{$oOrderArticle->oxorderarticles__oxtitle->value|escape:"quotes"}]', [{* Produktname *}]
|
||||
'sku': '[{$oOrderArticle->oxorderarticles__oxartnum->value|escape:"quotes"}]', [{* SKU/Code *}]
|
||||
'category': '[{$oOrderArticle->oxorderarticles__d3_galocator->value|escape:"quotes"}]', [{* Kategorie oder Ausführung *}]
|
||||
[{*'category': '[{$oOrderArticle->oxorderarticles__oxselvariant->value}]', [{* Kategorie oder Ausführung *}]
|
||||
'price': '[{$sPrice}]', [{* Preis pro Einheit *}]
|
||||
'quantity': '[{$oOrderArticle->oxorderarticles__oxamount->value}]' [{* Menge *}]
|
||||
});
|
||||
|
@ -30,3 +30,9 @@ class d3_order_googleanalytics_parent extends order {}
|
||||
|
||||
/** */
|
||||
class d3_oxutilsview_googleanalytics_parent extends oxUtilsView {}
|
||||
|
||||
/** */
|
||||
class d3_oxbasket_googleanalytics_parent extends oxbasket {}
|
||||
|
||||
/** */
|
||||
class d3_oxbasketitem_googleanalytics_parent extends oxBasketItem {}
|
@ -34,17 +34,18 @@ $aModule = array(
|
||||
'de' => 'Dieses Modul stellt Ihnen die schnelle und unkomplizierte Einbindung Ihres Google-Analytics-'.
|
||||
'Kontos in Ihren Shop zur Verfügung. Hierbei werden über standardisierte Schnittstellen die '.
|
||||
'Besucherdaten und eCommerce-Daten zu Google übertragen. Ebenfalls übermittelt werden Daten '.
|
||||
'der Website-Suche. Dem Modul liegen angepaßte Templates bei, mit denen auch die Trichter '.
|
||||
'ordentlich protokolliert werden.',
|
||||
'der Website-Suche.',
|
||||
'en' => 'Provides a quick and easy integration with your Google Analytics account to your shop.',
|
||||
),
|
||||
'thumbnail' => 'picture.png',
|
||||
'version' => '3.1.0.2',
|
||||
'version' => '3.2.0.0',
|
||||
'author' => 'D³ Data Development (Inh. Thomas Dartsch)',
|
||||
'email' => 'support@shopmodule.com',
|
||||
'url' => 'http://www.oxidmodule.com/',
|
||||
'extend' => array(
|
||||
'oxcmp_utils' => 'd3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics',
|
||||
'oxbasket' => 'd3/d3_googleanalytics/modules/models/d3_oxbasket_googleanalytics',
|
||||
'oxbasketitem'=> 'd3/d3_googleanalytics/modules/models/d3_oxbasketitem_googleanalytics',
|
||||
'oxorder' => 'd3/d3_googleanalytics/modules/models/d3_oxorder_googleanalytics',
|
||||
'order' => 'd3/d3_googleanalytics/modules/controllers/d3_order_googleanalytics',
|
||||
'oxutilsview' => 'd3/d3_googleanalytics/modules/core/d3_oxutilsview_googleanalytics',
|
||||
|
@ -123,26 +123,57 @@ class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_pare
|
||||
{
|
||||
$myConfig = oxRegistry::getConfig();
|
||||
$aLanguageUrls = $myConfig->getConfigParam('aLanguageURLs');
|
||||
$aUrls = array();
|
||||
/** @var oxUBase $oActView */
|
||||
$oActView = $myConfig->getTopActiveView();
|
||||
$aSslLanguageUrls = $myConfig->getConfigParam('aLanguageSSLURLs');
|
||||
|
||||
$aUrls = array();
|
||||
if ($myConfig->getConfigParam('bl_perfLoadLanguages')) {
|
||||
$aLanguages = oxRegistry::getLang()->getLanguageArray(null, true, true);
|
||||
reset($aLanguages);
|
||||
while ((list($sKey, $oVal) = each($aLanguages))) {
|
||||
$aLanguages[$sKey]->link = $oActView->getLink($oVal->id);
|
||||
$sUrl = str_replace('http://', '', $aLanguageUrls[$oVal->id]);
|
||||
|
||||
if ($aLanguageUrls[$oVal->id] != $aLanguageUrls[oxRegistry::getLang()->getBaseLanguage()]) {
|
||||
$aUrls[] = "'".$sUrl."'";
|
||||
}
|
||||
foreach ($aLanguages as $oVal) {
|
||||
$aUrls = $this->_d3AddLanguageUrlsToList($aLanguageUrls, $oVal, $aSslLanguageUrls, $aUrls);
|
||||
}
|
||||
}
|
||||
|
||||
return $aUrls;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $aLanguageUrls
|
||||
* @param $oVal
|
||||
* @param $aSslLanguageUrls
|
||||
* @param $aUrls
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function _d3AddLanguageUrlsToList($aLanguageUrls, $oVal, $aSslLanguageUrls, $aUrls)
|
||||
{
|
||||
$blIsSsl = oxRegistry::getConfig()->isSsl();
|
||||
|
||||
if ($this->_d3CheckLanguageUrlsToList($aLanguageUrls, $oVal, $blIsSsl)) {
|
||||
$sUrl = str_replace('http://', '', $aLanguageUrls[$oVal->id]);
|
||||
$aUrls[] = "'" . $sUrl . "'";
|
||||
}
|
||||
|
||||
if ($this->_d3CheckLanguageUrlsToList($aSslLanguageUrls, $oVal, !$blIsSsl)) {
|
||||
$sSslUrl = str_replace('https://', '', $aSslLanguageUrls[$oVal->id]);
|
||||
$aUrls[] = "'" . $sSslUrl . "'";
|
||||
}
|
||||
|
||||
return $aUrls;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $aLanguageUrls
|
||||
* @param $oVal
|
||||
* @param $blIsSsl
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function _d3CheckLanguageUrlsToList($aLanguageUrls, $oVal, $blIsSsl)
|
||||
{
|
||||
return $blIsSsl || $aLanguageUrls[$oVal->id] != $aLanguageUrls[oxRegistry::getLang()->getBaseLanguage()];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/**
|
||||
* This Software is the property of Data Development and is protected
|
||||
* by copyright law - it is NOT Freeware.
|
||||
*
|
||||
* Any unauthorized use of this software without a valid license
|
||||
* is a violation of the license agreement and will be prosecuted by
|
||||
* civil and criminal law.
|
||||
*
|
||||
* http://www.shopmodule.com
|
||||
*
|
||||
* @copyright © D³ Data Development, Thomas Dartsch
|
||||
* @author D³ Data Development - Daniel Seifert <ds@shopmodule.com>
|
||||
* @link http://www.oxidmodule.com
|
||||
*/
|
||||
|
||||
class d3_oxbasket_googleanalytics extends d3_oxbasket_googleanalytics_parent
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function d3GetCurrentLocatorTitle()
|
||||
{
|
||||
$sTitle = '';
|
||||
$oView = oxRegistry::getConfig()->getActiveView();
|
||||
|
||||
if (method_exists($oView, 'getBreadCrumb') &&
|
||||
($aPaths = $oView->getBreadCrumb())
|
||||
) {
|
||||
foreach ($aPaths as $aPath) {
|
||||
$sTitle .= "/".$aPath['title'];
|
||||
}
|
||||
} elseif ($oView->getClassName() == 'details' &&
|
||||
(
|
||||
($oCatPath = $oView->getCategoryTree()->getPath()) ||
|
||||
($oCatPath = $oView->getManufacturerTree()->getPath())
|
||||
)
|
||||
) {
|
||||
foreach ($oCatPath as $oCat) {
|
||||
$sTitle .= "/".$oCat->getFieldData('oxtitle');
|
||||
}
|
||||
} else {
|
||||
$sTitle = "page: ".ucfirst($oView->getClassName());
|
||||
}
|
||||
|
||||
return $sTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sProductID
|
||||
* @param float $dAmount
|
||||
* @param null $aSel
|
||||
* @param null $aPersParam
|
||||
* @param bool $blOverride
|
||||
* @param bool $blBundle
|
||||
* @param null $sOldBasketItemId
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function addToBasket(
|
||||
$sProductID,
|
||||
$dAmount,
|
||||
$aSel = null,
|
||||
$aPersParam = null,
|
||||
$blOverride = false,
|
||||
$blBundle = false,
|
||||
$sOldBasketItemId = null
|
||||
) {
|
||||
$oBasketItem = parent::addToBasket(
|
||||
$sProductID,
|
||||
$dAmount,
|
||||
$aSel,
|
||||
$aPersParam,
|
||||
$blOverride,
|
||||
$blBundle,
|
||||
$sOldBasketItemId
|
||||
);
|
||||
|
||||
if ($oBasketItem) {
|
||||
$oBasketItem->d3SetLocatorTitle($this->d3GetCurrentLocatorTitle());
|
||||
}
|
||||
|
||||
return $oBasketItem;
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* This Software is the property of Data Development and is protected
|
||||
* by copyright law - it is NOT Freeware.
|
||||
*
|
||||
* Any unauthorized use of this software without a valid license
|
||||
* is a violation of the license agreement and will be prosecuted by
|
||||
* civil and criminal law.
|
||||
*
|
||||
* http://www.shopmodule.com
|
||||
*
|
||||
* @copyright © D³ Data Development, Thomas Dartsch
|
||||
* @author D³ Data Development - Daniel Seifert <ds@shopmodule.com>
|
||||
* @link http://www.oxidmodule.com
|
||||
*/
|
||||
|
||||
class d3_oxbasketitem_googleanalytics extends d3_oxbasketitem_googleanalytics_parent
|
||||
{
|
||||
protected $_sD3LocatorTitle;
|
||||
|
||||
/**
|
||||
* @param $sLocatorTitle
|
||||
*/
|
||||
public function d3SetLocatorTitle($sLocatorTitle)
|
||||
{
|
||||
if (false == $this->_sD3LocatorTitle) {
|
||||
$this->_sD3LocatorTitle = $sLocatorTitle;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function d3GetLocatorTitle()
|
||||
{
|
||||
return $this->_sD3LocatorTitle;
|
||||
}
|
||||
}
|
@ -51,4 +51,46 @@ class d3_oxorder_googleanalytics extends d3_oxorder_googleanalytics_parent
|
||||
|
||||
return $aVoucherSerieList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $aArticleList
|
||||
*
|
||||
* @return null|void
|
||||
*/
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ function _groupExp(el) {
|
||||
<label for="sD3GAAdWordConversionId">[{oxmultilang ident="D3_GOOGLEANALYTICS_ADWORDS_CONVID"}]</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="text" class="edittext ext_edittext" size="15" maxlength="15" name="value[sD3GAAdWordConversionId]" value="[{$edit->getValue('sD3GAAdWordConversionId')}]">
|
||||
<input type="text" class="edittext ext_edittext" size="15" maxlength="50" name="value[sD3GAAdWordConversionId]" value="[{$edit->getValue('sD3GAAdWordConversionId')}]">
|
||||
[{oxinputhelp ident="D3_GOOGLEANALYTICS_ADWORDS_CONVID_DESC"}]
|
||||
</dd>
|
||||
</dl>
|
||||
@ -246,7 +246,7 @@ function _groupExp(el) {
|
||||
<label for="sD3GAAdWordConversionLabel">[{oxmultilang ident="D3_GOOGLEANALYTICS_ADWORDS_CONVLABEL"}]</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="text" class="edittext ext_edittext" size="15" maxlength="15" name="value[sD3GAAdWordConversionLabel]" value="[{$edit->getValue('sD3GAAdWordConversionLabel')}]">
|
||||
<input type="text" class="edittext ext_edittext" size="15" maxlength="50" name="value[sD3GAAdWordConversionLabel]" value="[{$edit->getValue('sD3GAAdWordConversionLabel')}]">
|
||||
[{oxinputhelp ident="D3_GOOGLEANALYTICS_ADWORDS_CONVLABEL_DESC"}]
|
||||
</dd>
|
||||
</dl>
|
||||
|
Binary file not shown.
@ -6,7 +6,7 @@ class requConfig
|
||||
|
||||
public $sModId = 'd3_googleanalytics';
|
||||
|
||||
public $sModVersion = '3.1.0.2';
|
||||
public $sModVersion = '3.2.0.0';
|
||||
|
||||
/********************** check configuration section ************************/
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
=> 3.2.0.0
|
||||
- Tracking für gekaufte Artikel enthält Daten zur Kategorie / Seite, aus der die Artikel zuerst in den Warenkorb gelegt wurden
|
||||
- Bugfix: Artikeltitel werden escaped, sofern Quotes enthalten sind
|
||||
- AutoLinker-URL enthält auch abweichende SSL-URLs
|
||||
|
||||
=> 3.1.0.2
|
||||
- Bugfix: deaktiviertes Modul kann benötigtes Objekt nicht laden
|
||||
- Bugfix: Seiten ohne Klassenangaben (z.B. 404-Seiten) versuchen Artikellisten für Remarketing zu laden
|
||||
|
Loading…
Reference in New Issue
Block a user