Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

php scripts, java script and smarty

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-09-2008, 07:16 PM
 
vivienne vivienne is offline
 

Senior Member
  
Join Date: May 2004
Location: Brisbane, Australia
Posts: 121
 

Default 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
__________________
X-Cart 4.18
www.naturalvetcompany.com
www.wkyp.com.au
Reply With Quote
  #2  
Old 03-10-2008, 12:23 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default 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
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

   

 
X-Cart forums © 2001-2020