[Changed] OXID 7 file adjustments
This commit is contained in:
parent
8bbf7e4fa7
commit
c539c898d9
@ -12,7 +12,7 @@ use OxidEsales\Eshop\Core\ViewConfig;
|
||||
|
||||
class GA4AdminUserInterface_main extends \OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController
|
||||
{
|
||||
protected $_sThisTemplate = 'ga4/admin/d3ga4uimain.tpl';
|
||||
protected $_sThisTemplate = '@' . Constants::OXID_MODULE_ID . '/admin/d3ga4uimain';
|
||||
|
||||
public function render()
|
||||
{
|
||||
|
0
Application/views/admin/de/module_options.php → Application/views/admin_smarty/de/module_options.php
Executable file → Normal file
0
Application/views/admin/de/module_options.php → Application/views/admin_smarty/de/module_options.php
Executable file → Normal file
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/add_payment_info.tpl"}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/begin_checkout.tpl"}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/purchase.tpl"}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/remove_from_cart.tpl"}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/view_cart.tpl"}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/view_item.tpl"}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/view_item_list.tpl"}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/view_search_result.tpl"}]
|
@ -1,48 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{block name="d3_ga4_remove_from_cart_block"}]
|
||||
[{if $hasBeenReloaded}]
|
||||
[{assign var="d3BasketPrice" value=$oxcmp_basket->getPrice()}]
|
||||
[{capture assign=d3_ga4_remove_from_cart}]
|
||||
[{strip}]
|
||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||
dataLayer.push({
|
||||
'isRemoveFromCart': true,
|
||||
'event': 'remove_from_cart',
|
||||
'eventLabel':'remove_from_cart',
|
||||
'ecommerce': {
|
||||
'actionField': "step: 1",
|
||||
'currency': "[{$currency->name}]",
|
||||
'value': [{$d3BasketPrice->getPrice()}],
|
||||
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
|
||||
'items': [
|
||||
[{foreach from=$toRemoveArticles->getArray() name=gtmRemovedItems item=rmItem key=rmItemindex}]
|
||||
[{assign var="d3oItemPrice" value=$rmItem->getPrice()}]
|
||||
[{assign var="gtmBasketItemCategory" value=$rmItem->getCategory()}]
|
||||
{
|
||||
'item_id': '[{$rmItem->getFieldData('oxartnum')}]',
|
||||
'item_name': '[{$rmItem->getFieldData('oxtitle')}]',
|
||||
'item_variant': '[{$rmItem->getFieldData('oxvarselect')}]',
|
||||
[{if $gtmBasketItemCategory}]
|
||||
'item_category': '[{$gtmBasketItemCategory->getSplitCategoryArray(0)}]',
|
||||
'item_category_2': '[{$gtmBasketItemCategory->getSplitCategoryArray(1)}]',
|
||||
'item_category_3': '[{$gtmBasketItemCategory->getSplitCategoryArray(2)}]',
|
||||
'item_category_4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3)}]',
|
||||
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
|
||||
[{/if}]
|
||||
'price': [{$d3oItemPrice->getPrice()}],
|
||||
'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}]
|
||||
}[{if !$smarty.foreach.gtmRemovedItems.last}],[{/if}]
|
||||
[{/foreach}]
|
||||
]
|
||||
}[{if $oViewConf->isDebugModeOn()}],
|
||||
'debug_mode': 'true'
|
||||
[{/if}]
|
||||
});
|
||||
[{/strip}]
|
||||
[{/capture}]
|
||||
[{oxscript add=$d3_ga4_remove_from_cart}]
|
||||
[{/if}]
|
||||
[{/block}]
|
@ -1,44 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{assign var="gtmProducts" value=$oView->getArticleList()}]
|
||||
|
||||
[{block name="d3_ga4_view_search_result_block"}]
|
||||
[{if $gtmProducts}]
|
||||
[{capture assign=d3_ga4_view_search_result}]
|
||||
[{strip}]
|
||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||
dataLayer.push({
|
||||
'event': 'view_search_result',
|
||||
'eventLabel':'view_search_result[{if $oViewConf->isDebugModeOn()}]_test[{/if}]',
|
||||
'ecommerce': {
|
||||
'search_term': '[{$searchparamforhtml}]',
|
||||
'items': [
|
||||
[{foreach from=$gtmProducts name="gtmProducts" item="gtmProduct"}]
|
||||
[{assign var="d3PriceObject" value=$gtmProduct->getPrice()}]
|
||||
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
||||
[{assign var="gtmCategory" value=$gtmProduct->getCategory()}]
|
||||
{
|
||||
'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)}]',
|
||||
'item_list_name':'[{$gtmCategory->getSplitCategoryArray()}]',
|
||||
[{/if}]
|
||||
'quantity': 1
|
||||
}[{if !$smarty.foreach.gtmProducts.last}],[{/if}]
|
||||
[{/foreach}]
|
||||
]
|
||||
}[{if $oViewConf->isDebugModeOn()}],
|
||||
'debug_mode': 'true'
|
||||
[{/if}]
|
||||
});
|
||||
[{/strip}]
|
||||
[{/capture}]
|
||||
[{oxscript add=$d3_ga4_view_search_result}]
|
||||
[{/if}]
|
||||
[{/block}]
|
@ -4,7 +4,7 @@ namespace D3\GoogleAnalytics4\Modules\Application\Controller;
|
||||
|
||||
class d3GtmAccountNoticeListController extends d3GtmAccountNoticeListController_parent
|
||||
{
|
||||
protected $_sThisTemplate = 'page/account/d3gtmnoticelist.tpl';
|
||||
protected $_sThisTemplate = '@' . Constants::OXID_MODULE_ID . '/page/account/d3gtmnoticelist.tpl';
|
||||
|
||||
public function render()
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ namespace D3\GoogleAnalytics4\Modules\Application\Controller;
|
||||
|
||||
class d3GtmAccountRecommlistController extends d3GtmAccountRecommlistController_parent
|
||||
{
|
||||
protected $_sThisTemplate = 'page/account/d3gtmrecommendationlist.tpl';
|
||||
protected $_sThisTemplate = '@' . Constants::OXID_MODULE_ID . '/page/account/d3gtmrecommendationlist.tpl';
|
||||
|
||||
public function render()
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ namespace D3\GoogleAnalytics4\Modules\Application\Controller;
|
||||
|
||||
class d3GtmAccountWishlistController extends d3GtmAccountWishlistController_parent
|
||||
{
|
||||
protected $_sThisTemplate = 'page/account/d3gtmwishlist.tpl';
|
||||
protected $_sThisTemplate = '@' . Constants::OXID_MODULE_ID . '/page/account/d3gtmwishlist.tpl';
|
||||
|
||||
public function render()
|
||||
{
|
||||
|
0
thumbnail.png → assets/thumbnail.png
Executable file → Normal file
0
thumbnail.png → assets/thumbnail.png
Executable file → Normal file
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
@ -28,20 +28,9 @@
|
||||
"homepage": "https://www.d3data.de"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"supports": {
|
||||
"email": "support@shopmodule.com"
|
||||
},
|
||||
"extra": {
|
||||
"oxideshop": {
|
||||
"blacklist-filter": [
|
||||
"*.md",
|
||||
"composer.json",
|
||||
".php-cs-fixer.php",
|
||||
"*.neon"
|
||||
],
|
||||
"target-directory": "d3/googleanalytics4"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"php": "7.1 - 8.2",
|
||||
"oxid-esales/oxideshop-ce": "^6.5.3",
|
||||
@ -50,7 +39,7 @@
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"D3\\GoogleAnalytics4\\": "../../../source/modules/d3/googleanalytics4"
|
||||
"D3\\GoogleAnalytics4\\": ""
|
||||
}
|
||||
}
|
||||
}
|
0
Application/views/blocks/_gtm_js.tpl → views/smarty/blocks/_gtm_js.tpl
Executable file → Normal file
0
Application/views/blocks/_gtm_js.tpl → views/smarty/blocks/_gtm_js.tpl
Executable file → Normal file
@ -1,12 +1,12 @@
|
||||
[{if $oViewConf->D3blShowGtmScript()}]
|
||||
[{if $oViewConf->getGtmContainerId()}][{strip}]
|
||||
<!-- Google Tag Manager (noscript) -->
|
||||
<noscript>
|
||||
<iframe src="[{$oViewConf->getServerSidetaggingNoJsDomain()}]?id=[{$oViewConf->getGtmContainerId()}]"
|
||||
height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
||||
</noscript>
|
||||
<!-- End Google Tag Manager (noscript) -->
|
||||
[{/strip}][{/if}]
|
||||
[{/if}]
|
||||
|
||||
[{if $oViewConf->D3blShowGtmScript()}]
|
||||
[{if $oViewConf->getGtmContainerId()}][{strip}]
|
||||
<!-- Google Tag Manager (noscript) -->
|
||||
<noscript>
|
||||
<iframe src="[{$oViewConf->getServerSidetaggingNoJsDomain()}]?id=[{$oViewConf->getGtmContainerId()}]"
|
||||
height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
||||
</noscript>
|
||||
<!-- End Google Tag Manager (noscript) -->
|
||||
[{/strip}][{/if}]
|
||||
[{/if}]
|
||||
|
||||
[{$smarty.block.parent}]
|
3
views/smarty/blocks/add_payment_info.tpl
Normal file
3
views/smarty/blocks/add_payment_info.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/add_payment_info.tpl"}]
|
3
views/smarty/blocks/begin_checkout.tpl
Normal file
3
views/smarty/blocks/begin_checkout.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/begin_checkout.tpl"}]
|
3
views/smarty/blocks/details_productmain_tobasket.tpl
Normal file
3
views/smarty/blocks/details_productmain_tobasket.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
|
3
views/smarty/blocks/page_list_listbody.tpl
Normal file
3
views/smarty/blocks/page_list_listbody.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
|
3
views/smarty/blocks/purchase.tpl
Normal file
3
views/smarty/blocks/purchase.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/purchase.tpl"}]
|
3
views/smarty/blocks/remove_from_cart.tpl
Normal file
3
views/smarty/blocks/remove_from_cart.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/remove_from_cart.tpl"}]
|
3
views/smarty/blocks/start_welcome_text.tpl
Normal file
3
views/smarty/blocks/start_welcome_text.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
|
3
views/smarty/blocks/view_cart.tpl
Normal file
3
views/smarty/blocks/view_cart.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/view_cart.tpl"}]
|
3
views/smarty/blocks/view_item.tpl
Normal file
3
views/smarty/blocks/view_item.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/view_item.tpl"}]
|
3
views/smarty/blocks/view_item_list.tpl
Normal file
3
views/smarty/blocks/view_item_list.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/view_item_list.tpl"}]
|
3
views/smarty/blocks/view_search_result.tpl
Normal file
3
views/smarty/blocks/view_search_result.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/view_search_result.tpl"}]
|
@ -41,4 +41,4 @@
|
||||
[{/if}]
|
||||
[{/block}]
|
||||
|
||||
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
|
||||
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
|
@ -8,7 +8,7 @@
|
||||
<p class="alert alert-info">[{oxmultilang ident="WISH_LIST_EMPTY"}]</p>
|
||||
[{/if}]
|
||||
|
||||
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
|
||||
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
|
||||
|
||||
[{insert name="oxid_tracker" title=$template_title}]
|
||||
[{/capture}]
|
@ -21,7 +21,7 @@
|
||||
[{/if}]
|
||||
[{/block}]
|
||||
|
||||
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
|
||||
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
|
||||
|
||||
[{insert name="oxid_tracker" title=$template_title}]
|
||||
[{/capture}]
|
@ -34,7 +34,7 @@
|
||||
</p>
|
||||
[{/if}]
|
||||
|
||||
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
|
||||
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
|
||||
|
||||
[{insert name="oxid_tracker" title=$template_title}]
|
||||
[{/capture}]
|
Loading…
Reference in New Issue
Block a user