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 in Templates (https://forum.x-cart.com/showthread.php?t=1937)

maniac 03-19-2003 03:57 PM

PHP in Templates
 
I just downloaded X-cart gold - very excited about it. :D

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.

funkydunk 03-19-2003 10:38 PM

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);


All times are GMT -8. The time now is 05:49 AM.

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