480 lines
22 KiB
Smarty
Executable File
480 lines
22 KiB
Smarty
Executable File
{*
|
|
* 2007-2011 PrestaShop
|
|
*
|
|
* NOTICE OF LICENSE
|
|
*
|
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
|
* that is bundled with this package in the file LICENSE.txt.
|
|
* It is also available through the world-wide-web at this URL:
|
|
* http://opensource.org/licenses/afl-3.0.php
|
|
* If you did not receive a copy of the license and are unable to
|
|
* obtain it through the world-wide-web, please send an email
|
|
* to license@prestashop.com so we can send you a copy immediately.
|
|
*
|
|
* DISCLAIMER
|
|
*
|
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
|
* versions in the future. If you wish to customize PrestaShop for your
|
|
* needs please refer to http://www.prestashop.com for more information.
|
|
*
|
|
* @author PrestaShop SA <contact@prestashop.com>
|
|
* @copyright 2007-2011 PrestaShop SA
|
|
* @version Release: $Revision: 9140 $
|
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
|
* International Registered Trademark & Property of PrestaShop SA
|
|
*}
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#" xml:lang="{$lang_iso}">
|
|
<head>
|
|
<title>{$meta_title|escape:'htmlall':'UTF-8'}</title>
|
|
{if isset($meta_description) AND $meta_description}
|
|
<meta name="description" content="{$meta_description|escape:html:'UTF-8'}" />
|
|
{/if}
|
|
{if isset($meta_keywords) AND $meta_keywords}
|
|
<meta name="keywords" content="{$meta_keywords|escape:html:'UTF-8'}" />
|
|
{/if}
|
|
{if isset($meta_fb_img) AND $meta_fb_img}
|
|
<meta property="og:image" content="{$meta_fb_img|escape:html:'UTF-8'}" />
|
|
{/if}
|
|
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
|
|
<meta name="robots" content="{if isset($nobots)}no{/if}index,follow" />
|
|
<link rel="icon" type="image/png" href="{$img_ps_dir}preview.png?{$img_update_time}" />
|
|
<link rel="icon" type="image/vnd.microsoft.icon" href="{$img_ps_dir}favicon.ico?{$img_update_time}" />
|
|
<link rel="shortcut icon" type="image/x-icon" href="{$img_ps_dir}favicon.ico?{$img_update_time}" />
|
|
{if isset($page_name) && $page_name == 'authentication'}
|
|
<link rel="canonical" href="{$link->getPageLink('authentication.php', TRUE)}" />
|
|
{/if}
|
|
<script type="text/javascript">
|
|
var baseDirSsl = '{$base_dir_ssl}';
|
|
var baseDir = '{$content_dir}';
|
|
var static_token = '{$static_token}';
|
|
var token = '{$token}';
|
|
var priceDisplayPrecision = {$priceDisplayPrecision*$currency->decimals};
|
|
var priceDisplayMethod = {$priceDisplay};
|
|
var roundMode = {$roundMode};
|
|
var isoLang = "{$lang_iso}";
|
|
</script>
|
|
{if isset($css_files)}
|
|
{foreach from=$css_files key=css_uri item=media}
|
|
<link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" />
|
|
{/foreach}
|
|
{/if}
|
|
{if isset($js_files)}
|
|
{foreach from=$js_files item=js_uri}
|
|
<script type="text/javascript" src="{$js_uri}"></script>
|
|
{/foreach}
|
|
{/if}
|
|
<link rel="apple-touch-icon" href="{$base_dir_ssl}img/apple-touch-icon.png" />
|
|
{$HOOK_HEADER}
|
|
<!--[if IE 7]>
|
|
<link href="{$css_dir}ie7.css" rel="stylesheet" type="text/css" media="screen" />
|
|
<![endif]-->
|
|
<!--[if IE 8]>
|
|
<link href="{$css_dir}ie8.css" rel="stylesheet" type="text/css" media="screen" />
|
|
<![endif]-->
|
|
<!--[if IE 9]>
|
|
<link href="{$css_dir}ie9.css" rel="stylesheet" type="text/css" media="screen" />
|
|
<![endif]-->
|
|
|
|
<!-- Google Tag Manager -->
|
|
{literal}
|
|
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
|
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
|
})(window,document,'script','dataLayer','GTM-PT7ZGQF');</script>
|
|
{/literal}
|
|
<!-- End Google Tag Manager -->
|
|
|
|
{assign var='isEC' value=Configuration::get('GANALYTICS_EC')}
|
|
{if $cookie->id_lang == 2}
|
|
{literal}
|
|
<script>
|
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
|
|
ga('create', 'UA-30665119-1', 'auto');
|
|
|
|
{/literal}{if isset($page_name) && $page_name == 'category'}{literal}
|
|
ga('require', 'ec');
|
|
|
|
{/literal}{else if isset($page_name) && $page_name == 'product'}{literal}
|
|
ga('require', 'ec');
|
|
ga('ec:addProduct', {
|
|
'id': {/literal}{$product->id}{literal},
|
|
'name': "{/literal}{$product->name|escape:'htmlall':'UTF-8'}{literal}",
|
|
'category': "{/literal}{$sale->title[$cookie->id_lang]}{literal}"
|
|
});
|
|
|
|
ga('ec:setAction', 'detail');
|
|
|
|
{/literal}{else if isset($page_name) && $page_name == 'order'}{literal}
|
|
ga('require', 'ec');
|
|
|
|
{/literal}
|
|
{if $step == 0 || $step == 1}
|
|
{if $cart}
|
|
{assign var='cartProducts' value=$cart->getProducts()}
|
|
{foreach from=$cartProducts item=cartProduct}
|
|
{literal}
|
|
ga('ec:addProduct', {
|
|
'id': {/literal}{$cartProduct['id_product']}{literal},
|
|
'name': "{/literal}{$cartProduct['name']}{literal}",
|
|
'category': "{/literal}{$cartProduct['category']}{literal}",
|
|
'price': {/literal}{Tools::ps_round(Product::getPriceStatic((int)$cartProduct['id_product'], true, ((isset($cartProduct['id_product_attribute']) AND !empty($cartProduct['id_product_attribute'])) ? (int)($cartProduct['id_product_attribute']) : NULL), 2), 2)}{literal},
|
|
'quantity': {/literal}{$cartProduct['cart_quantity']}{literal}
|
|
});
|
|
{/literal}
|
|
{/foreach}
|
|
{/if}
|
|
{/if}
|
|
{literal}
|
|
|
|
{/literal}{if $step == 0}{literal}
|
|
//cart
|
|
ga('ec:setAction','checkout', {
|
|
'step': 1,
|
|
});
|
|
{/literal}{else if $step == 1}{literal}
|
|
// address
|
|
ga('ec:setAction','checkout', {
|
|
'step': 2,
|
|
});
|
|
{/literal}{else if $step == 2}{literal}
|
|
// carrier
|
|
ga('ec:setAction','checkout', {
|
|
'step': 3,
|
|
});
|
|
{/literal}{else if $step == 3}{literal}
|
|
// payment
|
|
ga('ec:setAction','checkout', {
|
|
'step': 4,
|
|
});
|
|
{/literal}{/if}
|
|
{/if}{literal}
|
|
|
|
{/literal}{if isset($page_name) && (($page_name == 'order-confirmation' && $isEC==0) || $page_name != 'order-confirmation')}{literal}
|
|
// send pageview via header.tpl du module GA si isEC=1 and $page_name == 'order-confirmation'
|
|
|
|
var re = new RegExp("([?&])(email=)[^&#]*", "g");
|
|
var re2 = new RegExp("([?&])(customer_lastname=)[^&#]*", "g");
|
|
var re3 = new RegExp("([?&])(customer_firstname=)[^&#]*", "g");
|
|
if (document.location.href.match(re) || document.location.href.match(re2) || document.location.href.match(re3)) {
|
|
// remove personal data from url before sending to GA
|
|
url = window.location.search.replace(re, '$1$2');
|
|
url = url.replace(re2, '$1$2');
|
|
url = url.replace(re3, '$1$2');
|
|
var page = window.location.pathname+url;
|
|
ga('send', 'pageview', page);
|
|
} else {
|
|
ga('send', 'pageview');
|
|
}
|
|
|
|
{/literal}{/if}{literal}
|
|
|
|
function onStepComplete(stepNumber, option, redirect, form) {
|
|
ga('ec:setAction', 'checkout_option', {
|
|
'step': stepNumber,
|
|
'option': option
|
|
});
|
|
if (redirect != null) {
|
|
ga('send', 'event', 'Checkout', 'Option', {
|
|
hitCallback: function() {
|
|
document.location = redirect;
|
|
}
|
|
});
|
|
} else if (form != null) {
|
|
ga('send', 'event', 'Checkout', 'Option', {
|
|
hitCallback: function() {
|
|
form.submit();
|
|
}
|
|
});
|
|
} else {
|
|
ga('send', 'event', 'Checkout', 'Option', {});
|
|
}
|
|
}
|
|
function addToCartToGA(product) {
|
|
ga('ec:addProduct', {
|
|
'id': product.id,
|
|
'name': product.name,
|
|
'brand': product.category,
|
|
'category': product.category,
|
|
'variant' : product.variant,
|
|
'price': product.price,
|
|
'quantity': product.qty
|
|
});
|
|
ga('ec:setAction', 'add');
|
|
ga('send', 'event', 'UX', 'click', 'add to cart');
|
|
}
|
|
function removeFromCartToGA(product) {
|
|
ga('ec:addProduct', {
|
|
'id': product.id,
|
|
'name': product.name,
|
|
'brand': product.category,
|
|
'category': product.category,
|
|
'variant' : product.variant,
|
|
'price': product.price,
|
|
'quantity': product.qty
|
|
});
|
|
ga('ec:setAction', 'remove');
|
|
ga('send', 'event', 'UX', 'click', 'remove to cart');
|
|
}
|
|
</script>
|
|
{/literal}
|
|
{elseif $cookie->id_lang == 3}
|
|
{literal}
|
|
<script>
|
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
|
|
ga('create', 'UA-68580471-1', 'auto');
|
|
|
|
{/literal}{if isset($page_name) && $page_name == 'category'}{literal}
|
|
ga('require', 'ec');
|
|
|
|
{/literal}{else if isset($page_name) && $page_name == 'product'}{literal}
|
|
ga('require', 'ec');
|
|
ga('ec:addProduct', {
|
|
'id': {/literal}{$product->id}{literal},
|
|
'name': "{/literal}{$product->name|escape:'htmlall':'UTF-8'}{literal}",
|
|
'category': "{/literal}{$sale->title[$cookie->id_lang]}{literal}"
|
|
});
|
|
|
|
ga('ec:setAction', 'detail');
|
|
|
|
{/literal}{else if isset($page_name) && $page_name == 'order'}{literal}
|
|
ga('require', 'ec');
|
|
|
|
{/literal}
|
|
{if $step == 0 || $step == 1}
|
|
{if $cart}
|
|
{assign var='cartProducts' value=$cart->getProducts()}
|
|
{foreach from=$cartProducts item=cartProduct}
|
|
{literal}
|
|
ga('ec:addProduct', {
|
|
'id': {/literal}{$cartProduct['id_product']}{literal},
|
|
'name': "{/literal}{$cartProduct['name']}{literal}",
|
|
'category': "{/literal}{$cartProduct['category']}{literal}",
|
|
'price': {/literal}{Tools::ps_round(Product::getPriceStatic((int)$cartProduct['id_product'], true, ((isset($cartProduct['id_product_attribute']) AND !empty($cartProduct['id_product_attribute'])) ? (int)($cartProduct['id_product_attribute']) : NULL), 2), 2)}{literal},
|
|
'quantity': {/literal}{$cartProduct['cart_quantity']}{literal}
|
|
});
|
|
{/literal}
|
|
{/foreach}
|
|
{/if}
|
|
{/if}
|
|
{literal}
|
|
|
|
{/literal}{if $step == 0}{literal}
|
|
//cart
|
|
ga('ec:setAction','checkout', {
|
|
'step': 1,
|
|
});
|
|
{/literal}{else if $step == 1}{literal}
|
|
// address
|
|
ga('ec:setAction','checkout', {
|
|
'step': 2,
|
|
});
|
|
{/literal}{else if $step == 2}{literal}
|
|
// carrier
|
|
ga('ec:setAction','checkout', {
|
|
'step': 3,
|
|
});
|
|
{/literal}{else if $step == 3}{literal}
|
|
// payment
|
|
ga('ec:setAction','checkout', {
|
|
'step': 4,
|
|
});
|
|
{/literal}{/if}
|
|
{/if}{literal}
|
|
|
|
{/literal}{if isset($page_name) && (($page_name == 'order-confirmation' && $isEC==0) || $page_name != 'order-confirmation')}{literal}
|
|
// send pageview via header.tpl du module GA si isEC=1 and $page_name == 'order-confirmation'
|
|
|
|
var re = new RegExp("([?&])(email=)[^&#]*", "g");
|
|
var re2 = new RegExp("([?&])(customer_lastname=)[^&#]*", "g");
|
|
var re3 = new RegExp("([?&])(customer_firstname=)[^&#]*", "g");
|
|
if (document.location.href.match(re) || document.location.href.match(re2) || document.location.href.match(re3)) {
|
|
// remove personal data from url before sending to GA
|
|
url = window.location.search.replace(re, '$1$2');
|
|
url = url.replace(re2, '$1$2');
|
|
url = url.replace(re3, '$1$2');
|
|
var page = window.location.pathname+url;
|
|
ga('send', 'pageview', page);
|
|
} else {
|
|
ga('send', 'pageview');
|
|
}
|
|
{/literal}{/if}{literal}
|
|
|
|
function onStepComplete(stepNumber, option, redirect, form) {
|
|
ga('ec:setAction', 'checkout_option', {
|
|
'step': stepNumber,
|
|
'option': option
|
|
});
|
|
if (redirect != null) {
|
|
ga('send', 'event', 'Checkout', 'Option', {
|
|
hitCallback: function() {
|
|
document.location = redirect;
|
|
}
|
|
});
|
|
} else if (form != null) {
|
|
ga('send', 'event', 'Checkout', 'Option', {
|
|
hitCallback: function() {
|
|
form.submit();
|
|
}
|
|
});
|
|
} else {
|
|
ga('send', 'event', 'Checkout', 'Option', {});
|
|
}
|
|
}
|
|
function addToCartToGA(product) {
|
|
ga('ec:addProduct', {
|
|
'id': product.id,
|
|
'name': product.name,
|
|
'brand': product.category,
|
|
'category': product.category,
|
|
'variant' : product.variant,
|
|
'price': product.price,
|
|
'quantity': product.qty
|
|
});
|
|
ga('ec:setAction', 'add');
|
|
ga('send', 'event', 'UX', 'click', 'add to cart');
|
|
}
|
|
function removeFromCartToGA(product) {
|
|
ga('ec:addProduct', {
|
|
'id': product.id,
|
|
'name': product.name,
|
|
'brand': product.category,
|
|
'category': product.category,
|
|
'variant' : product.variant,
|
|
'price': product.price,
|
|
'quantity': product.qty
|
|
});
|
|
ga('ec:setAction', 'remove');
|
|
ga('send', 'event', 'UX', 'click', 'remove to cart');
|
|
}
|
|
</script>
|
|
{/literal}
|
|
{/if}
|
|
|
|
<!-- Facebook Pixel Code -->
|
|
{if $cookie->id_lang == 2}
|
|
{literal}
|
|
<script>
|
|
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
|
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
|
|
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
|
|
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
|
|
document,'script','//connect.facebook.net/en_US/fbevents.js');
|
|
|
|
fbq('init', '585280634957856');
|
|
fbq('track', "PageView");
|
|
</script>
|
|
{/literal}
|
|
<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=585280634957856&ev=PageView&noscript=1"/></noscript>
|
|
{elseif $cookie->id_lang == 3}
|
|
{literal}
|
|
<script>
|
|
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
|
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
|
|
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
|
|
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
|
|
document,'script','//connect.facebook.net/en_US/fbevents.js');
|
|
|
|
fbq('init', '778018572325168');
|
|
fbq('track', "PageView");
|
|
</script>
|
|
{/literal}
|
|
<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=778018572325168&ev=PageView&noscript=1"/></noscript>
|
|
{/if}
|
|
|
|
{literal}
|
|
<script>
|
|
fbq('track', 'ViewContent', {
|
|
content_name:'{/literal}{$page_name|escape:'html':'UTF-8'}{literal}'
|
|
});
|
|
</script>
|
|
{/literal}
|
|
|
|
{if isset($smarty.get.validation)}
|
|
{literal}
|
|
<script>
|
|
fbq('track', 'CompleteRegistration');
|
|
</script>
|
|
{/literal}
|
|
{/if}
|
|
|
|
{if isset($page_name)}
|
|
{if $page_name == 'order-confirmation' && isset($order)}
|
|
{literal}
|
|
<script>
|
|
fbq('track', 'Purchase', {
|
|
value: '{/literal}{$order->total_paid}{literal}',
|
|
currency: "{/literal}{$currency['name']}{literal}"
|
|
});
|
|
</script>
|
|
{/literal}
|
|
{/if}
|
|
{/if}
|
|
<!-- End Facebook Pixel Code -->
|
|
|
|
<!-- crazyegg -->
|
|
{literal}
|
|
<script type="text/javascript">
|
|
setTimeout(function(){var a=document.createElement("script");
|
|
var b=document.getElementsByTagName("script")[0];
|
|
a.src=document.location.protocol+"//script.crazyegg.com/pages/scripts/0047/9841.js?"+Math.floor(new Date().getTime()/3600000);
|
|
a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);
|
|
</script>
|
|
{/literal}
|
|
|
|
</head>
|
|
|
|
<body {if $page_name}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if} class="{$bodyClass}{if $cookie->isLogged()} logged{/if}{if isset($smarty.get.content_only)} content_only{/if}{if isset($smarty.post.email_create) || isset($smarty.get.create_account)} create{/if} lang{$cookie->id_lang}">
|
|
|
|
<!-- Google Tag Manager (noscript) -->
|
|
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PT7ZGQF" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
|
<!-- End Google Tag Manager (noscript) -->
|
|
|
|
|
|
{if !$content_only}
|
|
{if isset($restricted_country_mode) && $restricted_country_mode}
|
|
<div id="restricted-country">
|
|
<p>{l s='You cannot place a new order from your country.'} <span class="bold">{$geolocation_country}</span></p>
|
|
</div>
|
|
{/if}
|
|
<div id="page">
|
|
|
|
<!-- Header -->
|
|
<div id="header">
|
|
<div class="content">
|
|
<div class="top">
|
|
<div class="content">
|
|
<span class='help_contact'><a href="{$base_dir_ssl}modules/ant_support/help.php">{l s='Aide et contact'}</a></span>
|
|
{$HOOK_TOP}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{$HOOK_TOP_MENU}
|
|
</div>
|
|
<div id="subheader"></div>
|
|
|
|
<div id="columns">
|
|
<div class="content">
|
|
{if isset($SKINSTATIC_COLUMNS)}{$SKINSTATIC_COLUMNS}{/if}
|
|
|
|
{if in_array($page_name, $displayLeft)}
|
|
<!-- Left -->
|
|
<div id="left_column" class="column">
|
|
{$HOOK_LEFT_COLUMN}
|
|
</div>
|
|
{/if}
|
|
|
|
<!-- Center -->
|
|
<div id="center_column">
|
|
{/if}
|