Merge branch 'ticket-GAnalytics' into develop
This commit is contained in:
commit
385af21769
@ -22,11 +22,11 @@ class OrderController extends OrderControllerCore {
|
||||
// Bloque les canaries ES
|
||||
$delivery = new Address(self::$cart->id_address_delivery);
|
||||
$prefix_postcode = substr($delivery->postcode, 0 ,2);
|
||||
|
||||
|
||||
if ($delivery->id_country == 6
|
||||
&& (intval($prefix_postcode) == 35 || intval($prefix_postcode) == 38)
|
||||
) {
|
||||
//$this->errors[] = Tools::displayError('Lo sentimos, en estos momentos no distribuimos nuestros productos en Canarias. Si deseas más información, puedes contactar con el Servicio de atención al cliente o llamar al 902 044 399.');
|
||||
//$this->errors[] = Tools::displayError('Lo sentimos, en estos momentos no distribuimos nuestros productos en Canarias. Si deseas más información, puedes contactar con el Servicio de atención al cliente o llamar al 902 044 399.');
|
||||
$this->step = 1;
|
||||
Tools::redirect('order.php?step=1&canaries=1');
|
||||
}
|
||||
@ -101,6 +101,9 @@ class OrderController extends OrderControllerCore {
|
||||
}
|
||||
|
||||
self::$smarty->assign(array('page_name' => $page_name));
|
||||
self::$smarty->assign(array(
|
||||
'step' => $this->step,
|
||||
));
|
||||
|
||||
$displayLeft = array(
|
||||
'page-404', 'address', 'addresses', 'authentication', 'best-sales',
|
||||
@ -288,11 +291,11 @@ class OrderController extends OrderControllerCore {
|
||||
// Bloque les canaries ES
|
||||
$delivery = new Address(self::$cart->id_address_delivery);
|
||||
$prefix_postcode = substr($delivery->postcode, 0 ,2);
|
||||
|
||||
|
||||
if ($delivery->id_country == 6
|
||||
&& (intval($prefix_postcode) == 35 || intval($prefix_postcode) == 38)
|
||||
) {
|
||||
$this->errors[] = Tools::displayError('Lo sentimos, en estos momentos no distribuimos nuestros productos en Canarias. Si deseas más información, puedes contactar con el Servicio de atención al cliente o llamar al 902 044 399.');
|
||||
$this->errors[] = Tools::displayError('Lo sentimos, en estos momentos no distribuimos nuestros productos en Canarias. Si deseas más información, puedes contactar con el Servicio de atención al cliente o llamar al 902 044 399.');
|
||||
}
|
||||
|
||||
// bloque DOM-TOM
|
||||
|
@ -75,7 +75,7 @@
|
||||
<!--[if IE 9]>
|
||||
<link href="{$css_dir}ie9.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
<![endif]-->
|
||||
|
||||
|
||||
{if $cookie->id_lang == 2}
|
||||
{literal}
|
||||
<script>
|
||||
@ -85,6 +85,41 @@
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-30665119-1', 'auto');
|
||||
|
||||
{/literal}{if isset($page_name) && $page_name == 'order'}{literal}
|
||||
ga('require', 'ec');
|
||||
|
||||
{/literal}{if $step == 0}{literal}
|
||||
{/literal}{if $cart}
|
||||
{assign var='cartProducts' value=$cart->getProducts()}{literal}
|
||||
{/literal}{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}{literal}
|
||||
{/literal}{/if}{literal}
|
||||
ga('ec:setAction','checkout', {
|
||||
'step': 1,
|
||||
});
|
||||
{/literal}{else if $step == 1}{literal}
|
||||
ga('ec:setAction','checkout', {
|
||||
'step': 2,
|
||||
});
|
||||
{/literal}{else if $step == 2}{literal}
|
||||
ga('ec:setAction','checkout', {
|
||||
'step': 3,
|
||||
});
|
||||
{/literal}{else if $step == 3}{literal}
|
||||
ga('ec:setAction','checkout', {
|
||||
'step': 4,
|
||||
});
|
||||
{/literal}{/if}
|
||||
{/if}{literal}
|
||||
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
{/literal}
|
||||
@ -162,7 +197,7 @@
|
||||
{/if}
|
||||
{/if}
|
||||
<!-- End Facebook Pixel Code -->
|
||||
|
||||
|
||||
<!-- crazyegg -->
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
@ -172,11 +207,11 @@
|
||||
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}">
|
||||
|
||||
|
||||
{if !$content_only}
|
||||
{if isset($restricted_country_mode) && $restricted_country_mode}
|
||||
<div id="restricted-country">
|
||||
|
Loading…
Reference in New Issue
Block a user