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)
-   -   Need help to add Tynt to x cart (https://forum.x-cart.com/showthread.php?t=57938)

puffaddering 02-06-2011 06:40 PM

Need help to add Tynt to x cart
 
Hello

I found a awesome tool called tynt Publisher tools http://www.tynt.com/ and want to add tynt to my website can someone tell me the file name where I add the code?

The website says to.

Add the javascript snippet to the HTML on your page templates right before the closing head tag or anywhere between the open and close body tags.






I am runing X cart Gold 4.2.3


If someone could help I would be very happy I think this is a very good SEO tool.


cflsystems 02-07-2011 03:07 AM

Re: Need help to add Tynt to x cart
 
Add it skin1/customer/home.tpl just before the </head>

puffaddering 02-09-2011 01:45 AM

Re: Need help to add Tynt to x cart
 
Quote:

Originally Posted by cflsystems
Add it skin1/customer/home.tpl just before the </head>



I tried to add the code from tynt to skin1/customer/home.tpl just before the </head>

But my website is coming up with an error when I add the code.
I tried adding these things called literal tags and it worked but I think I added them in the wrong part of the code.
I don’t know what to try next. It seems I have tried everything.

cflsystems 02-09-2011 02:53 AM

Re: Need help to add Tynt to x cart
 
Can you post here the code

puffaddering 02-09-2011 02:49 PM

Re: Need help to add Tynt to x cart
 
Quote:

Originally Posted by cflsystems
Can you post here the code



<head>
{include file="customer/service_head.tpl"}
{literal}
This is where I added the Tynt code from tynt website.
{/literal}
</head>


Is this correct?
I am playing around with literal tags and am not sure what thy are lol.

cflsystems 02-09-2011 07:04 PM

Re: Need help to add Tynt to x cart
 
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

puffaddering 02-10-2011 04:14 PM

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.

cflsystems 02-10-2011 04:27 PM

Re: Need help to add Tynt to x cart
 
That is correct, the way you have it.'

The {literal} tag tells smarty engine not to process the code surrounded by {literal} but output it just the way it is

puffaddering 02-10-2011 06:40 PM

Re: Need help to add Tynt to x cart
 
Quote:

Originally Posted by cflsystems
That is correct, the way you have it.'

The {literal} tag tells smarty engine not to process the code surrounded by {literal} but output it just the way it is

Thanks for helping me. Thats awesome if I have added the code correct now I dont have to stress. Without the literal tags my website was showing a smarty error.Thanks again.


All times are GMT -8. The time now is 12:39 AM.

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