Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Getting smarty error from tracking code

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-08-2004, 07:45 PM
 
macker123 macker123 is offline
 

Advanced Member
  
Join Date: Mar 2004
Posts: 68
 

Default 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]
__________________
Heavily Modified 4.0.8
http://www.hiphopcapital.com
Reply With Quote
  #2  
Old 12-08-2004, 08:07 PM
 
jhug jhug is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 31
 

Default

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.
__________________
4.1.9 x-cart
4.4.4 in dev
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:18 AM.

   

 
X-Cart forums © 2001-2020