Question

Ok im having this issue with some smarty files and variables and i need to use console.log. Issue is console.log is empty and the code appears on the webpage.

for example

console.log('$affiliate.id'); console.log('$affiliate.firstname'); console.log('App started'); console.log("App started");

Shows up in tha page.

PS: Is there some kind of an issue cause its tpl files? PS2: I tried all the versions like ', " in case i was wrong :P

Thanks in advance

Was it helpful?

Solution

You have to put your code inside <script> tags.

For example:

<script>
console.log('{$affiliate.id}'); console.log('{$affiliate.firstname}'); console.log('App started'); console.log("App started");
</script>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top