From 88e42535a7206bd4f3bd62512c6a4d4cf715572c Mon Sep 17 00:00:00 2001 From: Marion Muszynski Date: Fri, 7 Oct 2016 15:11:25 +0200 Subject: [PATCH] fix redirect --- themes/site/order-payment.tpl | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/themes/site/order-payment.tpl b/themes/site/order-payment.tpl index 6858f86d..86fcdcd7 100755 --- a/themes/site/order-payment.tpl +++ b/themes/site/order-payment.tpl @@ -47,8 +47,12 @@ $('.overlay_bbb').fadeIn(); $('.box_paybox').fadeIn(); } - // redirect by GA send event - onStepComplete(4, $input.attr('data-module-name') ,$input.val(),null); + if (window.ga && ga.create){ + // redirect by GA send event + onStepComplete(4, $input.attr('data-module-name') ,$input.val(),null); + } else { + window.location = $input.val(); + } } else { // LOADER POUR PAYPAL if ($input.attr('data-module-name') == "paypal") { @@ -56,8 +60,12 @@ $('.box_paypal').fadeIn(); } $form = $input.parent().children('div.hidden').children('form'); - // submit form by GA send event - onStepComplete(4, $form.attr('data-module-name'),null,$form); + if (window.ga && ga.create){ + // submit form by GA send event + onStepComplete(4, $form.attr('data-module-name'),null,$form); + } else { + $form.submit(); + } } } {/literal}