From 0571982b45ea218c24cc107c7b893ae067900215 Mon Sep 17 00:00:00 2001 From: Marion Muszynski Date: Wed, 27 Jul 2016 19:52:24 +0200 Subject: [PATCH] ajust js tag --- modules/criteo_bbb/criteo_bbb.php | 4 ---- .../criteo_bbb/views/templates/hooks/criteo.tpl | 14 +++++++------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/modules/criteo_bbb/criteo_bbb.php b/modules/criteo_bbb/criteo_bbb.php index ea1d598e..a32f8cc4 100644 --- a/modules/criteo_bbb/criteo_bbb.php +++ b/modules/criteo_bbb/criteo_bbb.php @@ -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'); diff --git a/modules/criteo_bbb/views/templates/hooks/criteo.tpl b/modules/criteo_bbb/views/templates/hooks/criteo.tpl index 17cc61e8..869edece 100644 --- a/modules/criteo_bbb/views/templates/hooks/criteo.tpl +++ b/modules/criteo_bbb/views/templates/hooks/criteo.tpl @@ -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} );