use my own PHP code

hello,

If I want to insert my own PHP code in to the CS Cart files, lets says in the “top.tpl”. how can I do that?

I tried to add code in the top of the page (top.tpl), between the tag but the system ignore it



why is that and how can I use my code?



thanks,

Roi

Use the following syntax {php} {/php}. If your code uses curly brakets {}, add the [COLOR=“red”]literal[/COLOR] tags also.


{literal}
{php}

YOUR CODE HERE

{/php}
{/literal}

like this:



{literal}

{php}



echo “my test”;



{/php}

{/literal}



?

[quote name=‘minerals’]like this:



{literal}

{php}



echo “my test”;



{/php}

{/literal}



?[/QUOTE]



Yes it is.



But, BUT, no need {literal}{/literal} with {php}{/php}.



Be careful! minerals, {php}{/php} is a possible door to hacking :frowning:



Use {smarty} code to secure your website…



Forum Smarty







Lee Li Pop

OK, it’s working. thank you very mach



but I’m not familiar with the tag: { or }

for php I use < and >



and, what is “{literal}” tag?



thanks

[url]Search Results for "docsv2" | Smarty



[url]Search Results for "docsv2" | Smarty