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)
-   -   php scripts, java script and smarty (https://forum.x-cart.com/showthread.php?t=38168)

vivienne 03-09-2008 07:16 PM

php scripts, java script and smarty
 
Hi there

I am not sure I really understand the smarty template system - if you get a third party php script is it easy to add to the .tpl files?

The javascript I have seen that you just add script tags - can you do similar with php?

Thanks!
Vivienne

Yurij 03-10-2008 12:23 AM

Re: php scripts, java script and smarty
 
Sure it's easy.
Pass in the "TPL" data for the out, and he shows them.

PHP code:
PHP Code:

$test "la-la-la";
$smarty->assign("test"$test); 



TPL code (with Javascript):
PHP Code:

{$test}

<
script>alert("{$test}")</script



All times are GMT -8. The time now is 11:13 PM.

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