ajust js tag
This commit is contained in:
parent
dd941581b7
commit
0571982b45
@ -491,7 +491,6 @@ class Criteo_bbb extends Module
|
||||
'id_customer' => $this->context->customer? $this->context->customer->id: 0,
|
||||
'old_customer' => (($new > 1) ? '1' : '0'),
|
||||
'customer_email' => ($this->context->customer) ? md5($this->context->customer->email) : '',
|
||||
'is_newsletter' => isset($_COOKIE['emst']) || (bool) Tools::getValue('emst'),
|
||||
));
|
||||
|
||||
return $this->fetchTemplate('/views/templates/hooks/', 'criteo');
|
||||
@ -539,7 +538,6 @@ class Criteo_bbb extends Module
|
||||
'wic_action' => 'home',
|
||||
'id_customer' => $this->context->customer? $this->context->customer->id: 0,
|
||||
'customer_email' => ($email) ? md5($email) : '',
|
||||
'is_newsletter' => isset($_COOKIE['emst']) || (bool) Tools::getValue('emst'),
|
||||
));
|
||||
|
||||
return $this->fetchTemplate('/views/templates/hooks/', 'criteo');
|
||||
@ -580,7 +578,6 @@ class Criteo_bbb extends Module
|
||||
'wic_action' => _PS_OPEN_SHOP_? 'productList': 'productFooter',
|
||||
'id_customer' => $this->context->customer? $this->context->customer->id: 0,
|
||||
'customer_email' => ($email) ? md5($email) : '',
|
||||
'is_newsletter' => isset($_COOKIE['emst']) || (bool) Tools::getValue('emst'),
|
||||
));
|
||||
|
||||
if (isset($products)) {
|
||||
@ -610,7 +607,6 @@ class Criteo_bbb extends Module
|
||||
'id_customer' => $this->context->customer? $this->context->customer->id: 0,
|
||||
'customer_email' => ($email) ? md5($email) : '',
|
||||
'searchQuery' => Tools::getValue('search_query'),
|
||||
'is_newsletter' => isset($_COOKIE['emst']) || (bool) Tools::getValue('emst'),
|
||||
));
|
||||
|
||||
return $this->fetchTemplate('/views/templates/hooks/', 'criteo');
|
||||
|
@ -18,22 +18,22 @@ window.criteo_q.push(
|
||||
{/if}
|
||||
{literal}{ event: "setSiteType", type: {/literal}"{$wic_criteo_site_type|escape:'html'}"{literal}},{/literal}
|
||||
{if $wic_action == 'productFooter'}
|
||||
{literal}{ event: "viewItem", user_segment: "{/literal}{if $is_newsletter}2{else}1{/if}{literal}", product: {/literal}"{$wic_product_id|escape:'html'}" {literal}}{/literal}
|
||||
{literal}{ event: "viewItem", item: {/literal}"{$wic_product_id|escape:'html'}" {literal}}{/literal}
|
||||
{elseif $wic_action == 'productList'}
|
||||
{literal}{ event: "viewList", user_segment: "{/literal}{if $is_newsletter}2{else}1{/if}{literal}", product: [{/literal}{$products_data|escape:'html'}{literal}]}{/literal}
|
||||
{literal}{ event: "viewList", item: [{/literal}{$products_data|escape:'html'}{literal}]}{/literal}
|
||||
{elseif $wic_action == 'shoppingCart'}
|
||||
{literal}{ event: "viewBasket", user_segment: "{/literal}{if $is_newsletter}2{else}1{/if}{literal}", product: [{/literal}{$wic_product_list|escape:'none'}{literal}]}{/literal}
|
||||
{literal}{ event: "viewBasket", item: [{/literal}{$wic_product_list|escape:'none'}{literal}]}{/literal}
|
||||
{elseif $wic_action == 'search'}
|
||||
{if isset($search_products)}
|
||||
{literal}{ event: "viewList", user_segment: "{/literal}{if $is_newsletter}2{else}1{/if}{literal}", product: [{/literal}{foreach from=$search_products item=product name=search_products}{if $smarty.foreach.search_products.index < 3}{$product.id_product|intval}{if !$smarty.foreach.search_products.last && $smarty.foreach.search_products.index < 2},{/if}{/if}{/foreach}], keywords: "{$searchQuery|escape:'html'}"{literal}}{/literal}
|
||||
{literal}{ event: "viewList", item: [{/literal}{foreach from=$search_products item=product name=search_products}{if $smarty.foreach.search_products.index < 3}{$product.id_product|intval}{if !$smarty.foreach.search_products.last && $smarty.foreach.search_products.index < 2},{/if}{/if}{/foreach}], keywords: "{$searchQuery|escape:'html'}"{literal}}{/literal}
|
||||
{/if}
|
||||
{elseif $wic_action == 'orderConfirmation'}
|
||||
{literal}{ event: "trackTransaction", user_segment: "{/literal}{if $is_newsletter}2{else}1{/if}{literal}", id: "{/literal}{$wic_id_order|intval}{literal}", new_customer: {/literal}{if $old_customer}0{else}1{/if}{literal},
|
||||
product: [{/literal}
|
||||
{literal}{ event: "trackTransaction", id: "{/literal}{$wic_id_order|intval}{literal}", new_customer: {/literal}{if $old_customer}0{else}1{/if}{literal},
|
||||
item: [{/literal}
|
||||
{$wic_product_list|escape:'none'}{literal}
|
||||
]}{/literal}
|
||||
{elseif $wic_action == 'home'}
|
||||
{literal}{ event: "viewHome", user_segment: "{/literal}{if $is_newsletter}2{else}1{/if}{literal}"}{/literal}
|
||||
{literal}{ event: "viewHome"}{/literal}
|
||||
{/if}
|
||||
);
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user