X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Getting smarty error from tracking code (https://forum.x-cart.com/showthread.php?t=10833)

macker123 12-08-2004 07:45 PM

Getting smarty error from tracking code
 
I have a tracking code that I use on all my web pages and it works fine, yet when I insert it into my home.tpl in the footer it is giving me the error below. I really need this code for tracking as it tracks where my sales come from. Any help is appreciated.

Error:
Fatal error: Smarty error: [in customer/home.tpl line 240]: syntax error: unrecognized tag: L10ref=top.document.referrer; (Smarty_Compiler.class.php, line 416) in /home/hiphop/public_html/Smarty-2.6.3/Smarty.class.php on line 1082


Code causing issue:
Code:


<table border=0 cellspacing=0 cellpadding=0 align=center>
<script language="javascript">
var success=0; cRef=""; cRefType=""; cPage="";
var L10qstr,L10pc,L10ref,L10a,L10pg; L10pg=document.URL.toString(); L10ref=document.referrer;
if(top.document.location==document.referrer || (document.referrer == "" && top.document.location != "")) {L10ref=top.document.referrer;}
L10qStr = "pg="+escape(L10pg)+"&ref="+escape(L10ref)+"&os="+escape(navigator.userAgent)+"&nn="+escape(navigator.appName)+"&nv="+escape(navigator.appVersion)+"&nl="+escape(navigator.language)+"&sl="+escape(navigator.systemLanguage)+"&sa="+success+"&cR="+escape(cRef)+"&cRT="+escape(cRefType)+"&cPg="+escape(cPage);
if(navigator.appVersion.substring(0,1) > "3") { L10d = new Date(); L10qStr = L10qStr+"&cd="+screen.colorDepth+"&sx="+screen.width+"&sy="+screen.height+"&tz="+L10d.getTimezoneOffset();}
if((location.href.substr(0,6)=="https:") || (location.href.substr(0,6)=="HTTPS:")) { L10pc="https"; } else { L10pc="http"; }
document.write('<tr><td>[img]'+L10pc+'://www.blingblingstreet.com/L10Apps/L10HC_Counter.php?'+L10qStr+'[/img]</td>');
</script><noscript><tr><td>[img]http://www.blingblingstreet.com/L10Apps/L10HC_Counter.php?acct=.[/img]</td></noscript>

</tr></table>

[/code]

jhug 12-08-2004 08:07 PM

If you are sticking that in a .tpl file you will have to enclose it in {literal}{/literal} tags. That tells smarty to run it as is without "smartying" it. :lol:


All times are GMT -8. The time now is 02:37 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.