How to insert code into the head section of every webpage.

I need help. I am new to webdesign and cs-cart. I am trying to install code into the head section of every webpage on my cs-cart store for a live chat app but I have no clue how or where to put this code. Please help

check the file “meta.tpl” located in the in the customer folder (skins/base-or-your-skin/customer/meta.tpl)

Search info about hooks, so you can include other content without touching it.

Colortone,

Thank you for the reply but I really know nothing when it comes to this stuff.



Do I include the code after the hook? or inside the hook that is already there?



Thank you for any help you can give me.

Here is the code I need to add.



var __lc = {};
__lc.license = xxxxxxxxxx;

(function() {
var lc = document.createElement('script'); lc.type = 'text/javascript'; lc.async = true;
lc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn.livechatinc.com/tracking.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s);

[quote name='colortone' timestamp='1327353689' post='129797']

check the file “meta.tpl” located in the in the customer folder (skins/base-or-your-skin/customer/meta.tpl)

Search info about hooks, so you can include other content without touching it.

[/quote]



Thank you for the reply.

Here is the code I need to add but I dont know how.


Just below the last anf before the {/hook}



What chat script are you trying to activate? I guess you could do it just in a html block.

[quote name='colortone' timestamp='1327358664' post='129802']

Just below the last anf before the {/hook}



What chat script are you trying to activate? I guess you could do it just in a html block.

[/quote]



I am using LiveChat.



I tried inserting the code after the last meta and it did not work. Any other suggestions?



Thank you for all of your help Colortone

Have you cleared your cache?



Also, if you continue having problems, try putting your script between

{literal}{/literal}



Also, I'd consider putting this in skins/your-skin/customer/common_templates/scripts.tpl



Or, even better, create a new file called skins/your-skin/customer/addons/my_changes/hooks/index/scripts.post.tpl and then put your code in there.



Then clear your cache after you are done.



Hope that helps,



Brandon

Thank you Brandon for pointing the right file and the required “literal” tags.

It was there in the index.tpl {include file=“common_templates/scripts.tpl”}, I missed.



Livezilla doesn't requiere to place nothing there, but seem this livechat does.