View Single Post
  #7  
Old 02-10-2011, 04:14 PM
  puffaddering's Avatar 
puffaddering puffaddering is offline
 

Advanced Member
  
Join Date: Nov 2009
Location: Australia
Posts: 39
 

Smile Re: Need help to add Tynt to x cart

Quote:
Originally Posted by cflsystems
Can you post the actual code you are adding between the literal tags

This is what literal tag does - http://www.smarty.net/docs/en/language.function.literal.tpl


This is how we added the code from tynt to our website Including literal tags.

<head>
{include file="customer/service_head.tpl"}
{literal}
<script type="text/javascript">
if(document.location.protocol=='http:'){
var Tynt=Tynt||[];Tynt.push('dIgP0Emnur4l2Aadbi-bpO');Tynt.i={"st":true,"ap":"Read more:"};
(function(){var s=document.createElement('script');s.async="async" ;s.type="text/javascript";s.src='http://tcr.tynt.com/ti.js';var h=document.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);})();
}
</script>
{/literal}
</head>



This is the code we got from the tynt website without literal tags.

<script type="text/javascript">
if(document.location.protocol=='http:'){
var Tynt=Tynt||[];Tynt.push('dIgP0Emnur4l2Aadbi-bpO');Tynt.i={"st":true,"ap":"Read more:"};
(function(){var s=document.createElement('script');s.async="async" ;s.type="text/javascript";s.src='http://tcr.tynt.com/ti.js';var h=document.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);})();
}
</script>


The tool seems to be working ok on our website just want to make sure we have done this correct.

Is this correct?

I read the website about smarty and still dont understand literal tags.
__________________

Gold 4.2.3

www.weaponsplus.com.au
Reply With Quote