rm unnecessary files
Cette révision appartient à :
Parent
f9d7f0b2e9
révision
87ce3efc5f
@ -1,29 +0,0 @@
|
||||
[{strip}]
|
||||
[{assign var="gtmCategory" value=$gtmProduct->getCategory()}]
|
||||
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
||||
<script>
|
||||
/* UA */
|
||||
dataLayer.push({ecommerce: null});
|
||||
dataLayer.push({
|
||||
'event': 'UA_ecommerce',
|
||||
'event_name': 'Impression',
|
||||
'ecommerce': {
|
||||
'currencyCode': '[{$currency->name}]',
|
||||
'impressions': [
|
||||
{
|
||||
'name': '[{$gtmProduct->oxarticles__oxtitle->value}]',
|
||||
'id': '[{$gtmProduct->oxarticles__oxartnum->value}]',
|
||||
'price': [{$gtmProduct->oxarticles__oxprice->value}],
|
||||
'brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
||||
'category': '[{if $gtmCategory}][{$gtmCategory->getLink()|parse_url:5|ltrim:"/"|rtrim:"/"}][{else}]no category[{/if}]',
|
||||
'variant': '[{if $gtmProduct->oxarticles__oxvarselect->value}][{$gtmProduct->oxarticles__oxvarselect->value}][{/if}]'
|
||||
[{if $list && $position}],
|
||||
'list': '[{$list}]',
|
||||
'position': [{"_"|str_replace:"":$position}]
|
||||
[{/if}]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
</script>
|
||||
[{/strip}]
|
@ -1,62 +0,0 @@
|
||||
[{strip}]
|
||||
[{assign var="gtmCartArticles" value=$oView->getBasketArticles()}]
|
||||
<script>
|
||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null});
|
||||
dataLayer.push({
|
||||
"event":"enhanced-ecommerce",
|
||||
"ecommerce": {
|
||||
"checkout": {
|
||||
"actionField": {"step":1},
|
||||
"products": [
|
||||
[{foreach key=basketindex from=$oxcmp_basket->getContents() item=basketitem name=gtmCartContents}]
|
||||
[{assign var="_price" value=$basketitem->getPrice()}]
|
||||
{
|
||||
'id':'[{$gtmCartArticles[$basketindex]->oxarticles__oxartnum->value}]',
|
||||
'name': '[{$gtmCartArticles[$basketindex]->oxarticles__oxtitle->value}]',
|
||||
'variant':'[{$gtmCartArticles[$basketindex]->oxarticles__oxvarselect->value}]',
|
||||
'price': [{$_price->getPrice()}],
|
||||
'quantity':[{$basketitem->getAmount()}],
|
||||
'position':[{$smarty.foreach.gtmCartContents.index}]
|
||||
}[{if !$smarty.foreach.gtmCartContents.last}],[{/if}]
|
||||
[{/foreach}]
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var gtmCartContents = {
|
||||
[{foreach key=basketindex from=$oxcmp_basket->getContents() item=basketitem name=gtmCartContents}]
|
||||
'[{$basketindex}]':{
|
||||
'id':'[{$gtmCartArticles[$basketindex]->oxarticles__oxartnum->value}]'
|
||||
}[{if !$smarty.foreach.gtmCartContents.last}],[{/if}]
|
||||
[{/foreach}]
|
||||
};
|
||||
|
||||
[{capture name="removeFromBasket"}]
|
||||
$("#basketRemove").on("click", function() {
|
||||
var _checked = [],
|
||||
_products = [];
|
||||
|
||||
$("input:checkbox:checked[name^='aproducts'][name*='remove']").each(function() { _checked.push($(this).attr('name').replace("aproducts[","").replace("][remove]","")); });
|
||||
if(_checked.length == 0) return;
|
||||
_checked.forEach(function(_oxid) { _products.push({ 'id':gtmCartContents[_oxid].id}) });
|
||||
|
||||
dataLayer.push({
|
||||
'event':'ee.removeFromCart',
|
||||
'ecommerce': {
|
||||
'currencyCode': '[{$currency->name}]',
|
||||
'remove': {
|
||||
'products': _products
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
/*
|
||||
|
||||
*/
|
||||
[{/capture}]
|
||||
[{oxscript add=$smarty.capture.removeFromBasket}]
|
||||
</script>
|
||||
[{/strip}]
|
||||
[{$smarty.block.parent}]
|
@ -1,13 +0,0 @@
|
||||
<script>
|
||||
dataLayer.push({
|
||||
'event':'ee.checkout',
|
||||
'eventLabel':'Checkout 2',
|
||||
'ecommerce': {
|
||||
'checkout': { 'actionField': {
|
||||
'step': 2,
|
||||
'option':'[{oxmultilang ident="VT_GTM_EE_LOGINOPTION"|cat:$oView->getLoginOption()}]'
|
||||
} }
|
||||
}
|
||||
});
|
||||
</script>
|
||||
[{$smarty.block.parent}]
|
@ -1,8 +0,0 @@
|
||||
<script>
|
||||
dataLayer.push({
|
||||
'event': 'ee.checkout',
|
||||
'eventLabel': 'Checkout 3',
|
||||
'ecommerce': {'checkout': {'actionField': {'step': 3}}}
|
||||
});
|
||||
</script>
|
||||
[{$smarty.block.parent}]
|
@ -1,8 +0,0 @@
|
||||
<script>
|
||||
dataLayer.push({
|
||||
"event": "ee.checkout",
|
||||
'eventLabel': 'Checkout 4',
|
||||
"ecommerce": {"checkout": {"actionField": {"step": 4}}}
|
||||
});
|
||||
</script>
|
||||
[{$smarty.block.parent}]
|
@ -1,44 +0,0 @@
|
||||
<script>
|
||||
[{*
|
||||
dataLayer.push({
|
||||
'event': 'ee.checkout',
|
||||
'eventLabel':'Checkout 5',
|
||||
'ecommerce': {'checkout': {'actionField': {'step': 5}}}
|
||||
});
|
||||
*}]
|
||||
[{assign var="_gtmOrder" value=$oView->getOrder()}]
|
||||
[{assign var="_gtmBasket" value=$_gtmOrder->getBasket()}]
|
||||
[{assign var="_gtmArticles" value=$_gtmOrder->getOrderArticles()}]
|
||||
|
||||
dataLayer.push({
|
||||
'event': 'ee.transaction',
|
||||
'eventLabel':'[{oxmultilang ident="ORDER_COMPLETED"}]',
|
||||
'ecommerce': {
|
||||
'purchase': {
|
||||
'actionField': {
|
||||
'id':'[{$_gtmOrder->oxorder__oxordernr->value}]',
|
||||
'affiliation':'[{$oxcmp_shop->oxshops__oxname->value}]',
|
||||
'revenue':'[{$_gtmOrder->oxorder__oxtotalordersum->value}]',
|
||||
'tax':'[{math equation="x+y" x=$_gtmOrder->oxorder__oxartvatprice1->value y=$_gtmOrder->oxorder__oxartvatprice2->value }]',
|
||||
'shipping':'[{$_gtmOrder->oxorder__oxdelcost->value}]'
|
||||
/*'coupon':'CANO25' //if a coupon code was used for this order*/
|
||||
},
|
||||
'products':[
|
||||
[{foreach key="_index" from=$_gtmBasket->getContents() item="_gtmBasketitem" name="gtmTransactionProducts"}]
|
||||
[{assign var="_price" value=$_gtmBasketitem->getPrice()}]
|
||||
{
|
||||
'id':'[{$_gtmArticles[$_index]->oxarticles__oxartnum->value}]',
|
||||
'name': '[{$_gtmArticles[$_index]->oxarticles__oxtitle->value}]',
|
||||
'variant':'[{$_gtmArticles[$_index]->oxarticles__oxvarselect->value}]',
|
||||
'price': [{$_price->getPrice()}],
|
||||
'item_price': [{$_price->getPrice()}],
|
||||
'quantity':[{$_gtmBasketitem->getAmount()}],
|
||||
'position':[{$smarty.foreach.gtmTransactionProducts.iteration}]
|
||||
}[{if !$smarty.foreach.gtmTransactionProducts.last}],[{/if}]
|
||||
[{/foreach}]
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
[{$smarty.block.parent}]
|
Chargement…
Référencer dans un nouveau ticket
Block a user