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

PHP in Templates

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-19-2003, 03:57 PM
 
maniac maniac is offline
 

Advanced Member
  
Join Date: Mar 2003
Posts: 97
 

Default PHP in Templates

I just downloaded X-cart gold - very excited about it.

I'm into editing the templates (mainly home.tpl), but can't figure out how to parse php code within them. Every time I add a php snippet I get an error in the display page.

I want to include some files, including some with sql queries to a second database.

Any help would be appreciated.
Reply With Quote
  #2  
Old 03-19-2003, 10:38 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Eaiest bet is to put this directly within the PHP files themselves.

For the main part of the shop this would be home.php.

If you are wanting to assign variable to be able to display in the templates then use:

$smarty->assign("variable_that_you_can_use_in_templates",$ php_created_variable);
__________________
ex x-cart guru
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 10:22 PM.

   

 
X-Cart forums © 2001-2020