Validation

This commit is contained in:
Michael RICOIS 2018-01-23 17:10:17 +01:00
parent 9b3f4d087b
commit 85f4874ac8
2 changed files with 20 additions and 17 deletions

View File

@ -38,7 +38,7 @@
}); });
{/foreach} {/foreach}
{if $analytics_timeover == 0} {if $cookie->transCpt < 2}
ga('ec:setAction', 'purchase', { // Transaction details are provided in an actionFieldObject. ga('ec:setAction', 'purchase', { // Transaction details are provided in an actionFieldObject.
'id': '{$trans.id}', // (Required) Transaction id (string). 'id': '{$trans.id}', // (Required) Transaction id (string).
'affiliation': '{$trans.store}', // Affiliation (string). 'affiliation': '{$trans.store}', // Affiliation (string).

View File

@ -52,8 +52,6 @@ class OrderConfirmationController extends OrderConfirmationControllerCore
$transCpt = (int) $cookie->transCpt; $transCpt = (int) $cookie->transCpt;
} }
$transCpt++; $transCpt++;
$cookie->transCpt = $transCpt;
$cookie->write();
if ($transCpt > 1) { if ($transCpt > 1) {
$analytics_timeover = 1; $analytics_timeover = 1;
} }
@ -67,9 +65,14 @@ class OrderConfirmationController extends OrderConfirmationControllerCore
if (time() > $timestamp) { if (time() > $timestamp) {
$analytics_timeover = 1; $analytics_timeover = 1;
$transCpt++;
} }
} }
// Write cookie
$cookie->transCpt = $transCpt;
$cookie->write();
self::$smarty->assign( self::$smarty->assign(
array( array(
'customer' => $customer, 'customer' => $customer,