Jump to content

Prestashop is cutting my jquery code in footer


Recommended Posts

Hello everybody,

 

I have this problem with Prestashop 1.6. I need to add jquery tracking code into footer of default temlate. This tracking code is from Post Affiliate Pro. My problem is that Prestashop cut my jquery code and I do not know why. As you can see on screen first is from Prestashop and second is from website where code is ok. I am adding this jquery code into footer.tpl of default template. Can you someone help me how to solve this problem?

 

First image:

post-227155-0-82991300-1398692705_thumb.png

 

Second image:

post-227155-0-75873100-1398692715_thumb.png

Link to comment
Share on other sites

I am putting all my extra scripts in a new file named scripts.js and i put it in mytheme/js folder.

Then i add line of code to header.tpl just before </head> tag like this:

<script src="{$js_dir}myscript.js"></script>

Maybe this will work for you.

Link to comment
Share on other sites

There is tracking code.

<script type="text/javascript"><!--
document.write(unescape("%3Cscript id='pap_x2s6df8d' src='" + (("https:" == document.location.protocol) ? "https://" : "http://") + 
"postaffiliatepro.com/scripts/trackjs.js' type='text/javascript'%3E%3C/script%3E"));//-->
</script>
<script type="text/javascript"><!--
PostAffTracker.setAccountId('default1');
try {
PostAffTracker.track();
} catch (err) { }
//-->
</script>
Edited by quiced (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...