add first implementation

This commit is contained in:
Daniel Seifert 2014-10-13 13:23:06 +00:00
parent 14a8039b65
commit 681c834ca9
9 changed files with 321 additions and 0 deletions

3
.gitattributes vendored
View File

@ -164,6 +164,7 @@ changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_univer
changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_custom.tpl -text
changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl -text
changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_remarketing.tpl -text
changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_trustedstore.tpl -text
copy_this/.noencode -text
copy_this/modules/d3/d3_googleanalytics/IntelliSenseHelper.php -text
copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics.php -text
@ -172,6 +173,7 @@ copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics
copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_licence.php -text
copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_list.php -text
copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_main.php -text
copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_trustedstore.php -text
copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalyticslog.php -text
copy_this/modules/d3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalyticslog_list.php -text
copy_this/modules/d3/d3_googleanalytics/core/smarty/plugins/function.d3getArticleFromOrderArticle.php -text
@ -194,6 +196,7 @@ copy_this/modules/d3/d3_googleanalytics/views/admin/en/d3_googleanalytics_lang.p
copy_this/modules/d3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_adwords.tpl -text
copy_this/modules/d3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_campaigns.tpl -text
copy_this/modules/d3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_main.tpl -text
copy_this/modules/d3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_trustedstore.tpl -text
setup+doku/Google[!!-~]AdWords-Einrichtung.pdf -text svneol=unset#unset
setup+doku/Google[!!-~]Analytics-Einrichtung.pdf -text svneol=unset#unset
setup+doku/Google[!!-~]Analytics-Installation.pdf -text

View File

@ -99,4 +99,8 @@
[{/if}]
[{$smarty.capture.d3GATrackCode}]
[{/if}]
[{if $blD3GoogleAnalyticsActive && $oD3GASettings->getValue('sD3GATSActive') && $oD3GASettings->getValue('sD3GATSId')}]
[{include file="d3ga_universal_trustedstore.tpl"}]
[{/if}]

View File

@ -0,0 +1,64 @@
[{* https://support.google.com/trustedstoresmerchant/answer/6063080?hl=de&ref_topic=6063044 *}]
<!-- BEGIN: Google Certified Shops -->
<script type="text/javascript">
var gts = gts || [];
gts.push(["id", "[{$oD3GASettings->getValue('sD3GATSId')}]"]);
gts.push(["badge_position", "BOTTOM_RIGHT"]);
gts.push(["locale", "de_DE"]);
[{*
gts.push(["google_base_offer_id", "foo"]);
gts.push(["google_base_subaccount_id", "foo"]);
gts.push(["google_base_country", "foo"]);
gts.push(["google_base_language", "foo"]);
*}]
(function() {
var gts = document.createElement("script");
gts.type = "text/javascript";
gts.async = true;
gts.src = "https://www.googlecommerce.com/trustedstores/api/js";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(gts, s);
})();
</script>
<!-- END: Google Certified Shops -->
[{if $oViewConf->getActiveClassName() == 'thankyou'}]
[{* https://support.google.com/trustedstoresmerchant/answer/6063087?hl=de&ref_topic=6063044 *}]
<!-- START Google Trusted Stores Order -->
<div id="gts-order" style="display:none;" translate="no">
<!-- start order and merchant information -->
<span id="gts-o-id">MERCHANT_ORDER_ID</span>
<span id="gts-o-domain">MERCHANT_ORDER_ID</span>
<span id="gts-o-email">MERCHANT_ORDER_ID</span>
<span id="gts-o-country">MERCHANT_ORDER_ID</span>
<span id="gts-o-currency">MERCHANT_ORDER_ID</span>
<span id="gts-o-total">MERCHANT_ORDER_ID</span>
<span id="gts-o-discounts">MERCHANT_ORDER_ID</span>
<span id="gts-o-shipping-total">MERCHANT_ORDER_ID</span>
<span id="gts-o-tax-total">MERCHANT_ORDER_ID</span>
<span id="gts-o-est-ship-date">MERCHANT_ORDER_ID</span>
<span id="gts-o-est-delivery-date">MERCHANT_ORDER_ID</span>
<span id="gts-o-est-has-preorder">MERCHANT_ORDER_ID</span>
<span id="gts-o-est-has-digital">MERCHANT_ORDER_ID</span>
<!-- end order and merchant information -->
<!-- start repeated item specific information -->
<!-- item example: this area repeated for each item in the order -->
<span class="gts-item">
<span class="gts-i-name">ITEM_NAME</span>
<span class="gts-i-price">ITEM_NAME</span>
<span class="gts-i-quantity">ITEM_NAME</span>
[{*
<span class="gts-i-prodsearch-id">ITEM_NAME</span>
<span class="gts-i-prodsearch-store-id">ITEM_NAME</span>
<span class="gts-i-prodsearch-country">ITEM_NAME</span>
<span class="gts-i-prodsearch-language">ITEM_NAME</span>
*}]
</span>
<!-- end item 1 example -->
<!-- end repeated item specific informations -->
</div>
<!-- END Google Trusted Stores Order -->
[{/if}]

View File

@ -0,0 +1,25 @@
<?php
/**
* This module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For further informations, see <http://www.gnu.org/licenses/>.
*
* @link http://www.oxidmodule.com
* @link http://www.shopmodule.com
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
*/
class d3_cfg_googleanalytics_trustedstore extends d3_cfg_mod_main
{
protected $_sThisTemplate = 'd3_cfg_googleanalytics_trustedstore.tpl';
protected $_sModId = 'd3_googleanalytics';
}

View File

@ -6,6 +6,7 @@
<TAB id="d3tbclgoogleanalytics_main" cl="d3_cfg_googleanalytics_main" />
<TAB id="d3tbclgoogleanalytics_adwords" cl="d3_cfg_googleanalytics_adwords" />
<TAB id="d3tbclgoogleanalytics_campaigns" cl="d3_cfg_googleanalytics_campaigns" />
<TAB id="d3tbclgoogleanalytics_trustedstore" cl="d3_cfg_googleanalytics_trustedstore" />
<TAB id="d3tbcl_licence" cl="d3_cfg_googleanalytics_licence" />
</SUBMENU>
<SUBMENU id ="d3mxlog" cl="d3_cfg_googleanalyticslog" list="d3_cfg_googleanalyticslog_list">

View File

@ -61,6 +61,8 @@ $aModule = array(
'd3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_licence.php',
'd3_cfg_googleanalytics_list' => 'd3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_list.php',
'd3_cfg_googleanalytics_main' => 'd3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_main.php',
'd3_cfg_googleanalytics_trustedstore' =>
'd3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalytics_trustedstore.php',
'd3_cfg_googleanalyticslog' => 'd3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalyticslog.php',
'd3_cfg_googleanalyticslog_list' =>
'd3/d3_googleanalytics/controllers/admin/d3_cfg_googleanalyticslog_list.php',
@ -81,6 +83,8 @@ $aModule = array(
'd3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_remarketing.tpl',
'd3ga_universal_campaigncode.tpl' =>
'd3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_campaigncode.tpl',
'd3ga_universal_trustedstore.tpl' =>
'd3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_trustedstore.tpl',
'd3_cfg_googleanalytics_main.tpl' =>
'd3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_main.tpl',
@ -88,6 +92,8 @@ $aModule = array(
'd3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_adwords.tpl',
'd3_cfg_googleanalytics_campaigns.tpl' =>
'd3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_campaigns.tpl',
'd3_cfg_googleanalytics_trustedstore.tpl' =>
'd3/d3_googleanalytics/views/admin/tpl/d3_cfg_googleanalytics_trustedstore.tpl',
),
'events' => array(
'onActivate' => 'd3install::checkUpdateStart',

View File

@ -31,6 +31,7 @@ $aLang = array(
'd3mxgoogleanalytics_settings' => 'Einstellungen',
'd3tbclgoogleanalytics_main' => 'Analytics',
'd3tbclgoogleanalytics_adwords' => 'AdWords',
'd3tbclgoogleanalytics_trustedstore' => 'Google zertifizierter Shop',
'D3_GOOGLEANALYTICS_CFG_TITLE' => 'Google Analytics Schnittstelle - Einstellungen',
@ -275,6 +276,9 @@ $aLang = array(
'ein, den Sie vom Anbieter erhalten haben. Kopieren Sie auch ein eventuell vorhandenes "script"-Tag mit. '.
'Dieser Code wird 1:1 in den Seitenquelltext eingef&uuml;gt und nicht geparst.',
'D3_GOOGLEANALYTICS_TS_ACTIVE' => 'Trusted Store aktivieren',
'D3_GOOGLEANALYTICS_TS_ID' => 'Trusted Store-ID',
'D3_GOOGLEANALYTICS_METADATA_TITLE' => 'Google Analytics Schnittstelle',
'D3_GOOGLEANALYTICS_METADATA_DESC' => 'Dieses Modul stellt Ihnen die schnelle und '.
'unkomplizierte Einbindung Ihres Google-Analytics-Kontos in Ihren Shop zur Verf&uuml;gung. Hierbei werden '.

View File

@ -31,6 +31,7 @@ $aLang = array(
'd3mxgoogleanalytics_settings' => 'Settings',
'd3tbclgoogleanalytics_main' => 'Analytics',
'd3tbclgoogleanalytics_adwords' => 'AdWords',
'd3tbclgoogleanalytics_trustedstore' => 'Google Trusted Shop',
'D3_GOOGLEANALYTICS_CFG_TITLE' => 'Google Analytics Connector - Settings',
@ -274,6 +275,9 @@ $aLang = array(
'ein, den Sie vom Anbieter erhalten haben. Kopieren Sie auch ein eventuell vorhandenes "script"-Tag mit. '.
'Dieser Code wird 1:1 in den Seitenquelltext eingef&uuml;gt und nicht geparst.',
'D3_GOOGLEANALYTICS_TS_ACTIVE' => 'activate Trusted Store',
'D3_GOOGLEANALYTICS_TS_ID' => 'Trusted Store-ID',
'D3_GOOGLEANALYTICS_METADATA_TITLE' => 'Google Analytics Schnittstelle',
'D3_GOOGLEANALYTICS_METADATA_DESC' => 'Dieses Modul stellt Ihnen die schnelle und '.
'unkomplizierte Einbindung Ihres Google-Analytics-Kontos in Ihren Shop zur Verf&uuml;gung. Hierbei werden '.

View File

@ -0,0 +1,210 @@
[{include file="headitem.tpl" title="D3_GOOGLEANALYTICS_CFG_TITLE"|oxmultilangassign}]
<script type="text/javascript">
<!--
[{if $updatelist == 1}]
UpdateList('[{$oxid}]');
[{/if}]
function UpdateList( sID)
{
var oSearch = parent.list.document.getElementById("search");
oSearch.oxid.value=sID;
oSearch.fnc.value='';
oSearch.submit();
}
function EditThis( sID)
{
var oTransfer = document.getElementById("transfer");
oTransfer.oxid.value=sID;
oTransfer.cl.value='';
oTransfer.submit();
var oSearch = parent.list.document.getElementById("search");
oSearch.actedit.value = 0;
oSearch.oxid.value=sID;
oSearch.submit();
}
function _groupExp(el) {
var _cur = el.parentNode;
if (_cur.className == "exp") _cur.className = "";
else _cur.className = "exp";
}
-->
</script>
<style type="text/css">
<!--
fieldset {
border: 1px inset black;
background-color: #F0F0F0;
}
legend {
font-weight: bold;
}
dl dt {
font-weight: normal;
width: 55%;
}
.ext_edittext {
padding: 2px;
}
td.edittext {
white-space: normal;
}
-->
</style>
[{if $readonly}]
[{assign var="readonly" value="readonly disabled"}]
[{else}]
[{assign var="readonly" value=""}]
[{/if}]
<form name="transfer" id="transfer" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="actshop" value="[{$shop->id}]">
<input type="hidden" name="editlanguage" value="[{$editlanguage}]">
</form>
<form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="save">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="editval[oxid]" value="[{$oxid}]">
<table border="0" width="98%">
<tr>
<td valign="top" class="edittext">
<div class="groupExp">
<div class="">
<a class="rc" onclick="_groupExp(this); return false;" href="#">
<span style="font-weight: bold;">
[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN"}]
</span>
</a>
<dl>
<dt>
<label for="sD3GATSActive">[{oxmultilang ident="D3_GOOGLEANALYTICS_TS_ACTIVE"}]</label>
</dt>
<dd>
<input type="hidden" name="" value="0">
<input id="sD3GATSActive" class="edittext ext_edittext" type="checkbox" value="1" [{if $edit->getValue('sD3GATSActive')}]checked[{/if}] name="value[sD3GATSActive]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_TS_ACTIVE_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="sD3GATSId">[{oxmultilang ident="D3_GOOGLEANALYTICS_TS_ID"}]</label>
</dt>
<dd>
<input id="sD3GATSId" class="edittext ext_edittext" type="text" size="15" maxlength="20" value="[{$edit->getValue('sD3GATSId')}]" name="value[sD3GATSId]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_TS_ID_DESC"}]
</dd>
</dl>
[{*
<dl>
<dt>
<label for="blD3GAAnonymizeIP">[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_ANONYMIZEIP"}]</label>
</dt>
<dd>
<input type="hidden" name="value[blD3GAAnonymizeIP]" value="0">
<input id="blD3GAAnonymizeIP" class="edittext ext_edittext" type="checkbox" value="1" [{if $edit->getValue('blD3GAAnonymizeIP')}]checked[{/if}] name="value[blD3GAAnonymizeIP]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_ANONYMIZEIP_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="blD3GASampleRate">[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_SAMPLERATE"}]</label>
</dt>
<dd>
<input type="hidden" name="value[iD3GASampleRate]" value="0">
<input type="text" id="iD3GASampleRate" class="edittext ext_edittext" value="[{if $edit->getValue('iD3GASampleRate')}][{$edit->getValue('iD3GASampleRate')}][{else}]100[{/if}]" size="5" maxlength="3" name="value[iD3GASampleRate]"> [{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_SAMPLERATE_1"}]
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_SAMPLERATE_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="blD3GATrackPageLoadTime">[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_TRACKPAGELOADTIME"}]</label>
</dt>
<dd>
<input type="hidden" name="value[blD3GATrackPageLoadTime]" value="0">
<input id="blD3GATrackPageLoadTime" class="edittext ext_edittext" type="checkbox" value="1" [{if $edit->getValue('blD3GATrackPageLoadTime')}]checked[{/if}] name="value[blD3GATrackPageLoadTime]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_TRACKPAGELOADTIME_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="blD3GASiteSpeedSampleRate">[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_SITESPEEDSAMPLERATE"}]</label>
</dt>
<dd>
<input type="hidden" name="value[iD3GASiteSpeedSampleRate]" value="0">
<input type="text" id="iD3GASiteSpeedSampleRate" class="edittext ext_edittext" value="[{if $edit->getValue('iD3GASiteSpeedSampleRate')}][{$edit->getValue('iD3GASiteSpeedSampleRate')}][{else}]1[{/if}]" size="5" maxlength="3" name="value[iD3GASiteSpeedSampleRate]"> [{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_SITESPEEDSAMPLERATE_1"}]
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_SITESPEEDSAMPLERATE_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="blD3GAUseRemarketing">[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_USEREMARKETING"}]</label>
</dt>
<dd>
<input type="hidden" name="value[blD3GAUseRemarketing]" value="0">
<input id="blD3GAUseRemarketing" class="edittext ext_edittext" type="checkbox" value="1" [{if $edit->getValue('blD3GAUseRemarketing')}]checked[{/if}] name="value[blD3GAUseRemarketing]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_USEREMARKETING_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="blD3GAUseOptOut">[{oxmultilang ident="D3_GOOGLEANALYTICS_MAIN_USEOPTOUT"}]</label>
</dt>
<dd>
<input type="hidden" name="value[blD3GAUseOptOut]" value="0">
<input id="blD3GAUseOptOut" class="edittext ext_edittext" type="checkbox" value="1" [{if $edit->getValue('blD3GAUseOptOut')}]checked[{/if}] name="value[blD3GAUseOptOut]">
[{oxinputhelp ident="D3_GOOGLEANALYTICS_MAIN_USEOPTOUT_DESC"}]
</dd>
</dl>
*}]
</div>
</div>
<table width="100%">
<tr>
<td class="edittext ext_edittext" align="left"><br>
<span class="d3modcfg_btn icon status_ok">
<input type="submit" name="save" value="[{oxmultilang ident="D3_CFG_MOD_GENERAL_SAVE"}]">
<span></span>
</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
[{assign var="incpath" value=$oViewConf->getModulePath('d3modcfg_lib')|cat:"views/admin/tpl/d3_cfg_mod_inc.tpl"}]
[{include file="d3_cfg_mod_inc.tpl"}]
<script type="text/javascript">
if (parent.parent) {
parent.parent.sShopTitle = "[{$actshopobj->oxshops__oxname->getRawValue()|oxaddslashes}]";
parent.parent.sMenuItem = "[{oxmultilang ident="d3mxgoogleanalytics"}]";
parent.parent.sMenuSubItem = "[{oxmultilang ident="d3tbclgoogleanalytics_main"}]";
parent.parent.sWorkArea = "[{$_act}]";
parent.parent.setTitle();
}
</script>