I have written some php funcionality I wish to include in my X-Cart, but was (still am a little, but much better off now) clueless of how to incorporate my code into the existing Smarty template structure. I came across the following tutorials that really helped to flick the light switch on for me and thought I would share:
PHP templating with Smarty
http://www.zend.com/zend/tut/tutorial-cezar.php
Using PHP to Develop Three-Tier Architecture Applications - Part 1
http://www.zend.com/zend/tut/tutsweatpart1.php
Using PHP to Develop Three-Tier Architecture Applications - Part 2
http://www.zend.com/zend/tut/tutsweatpart2.php
I'm not a programmer by trade - I'm a sys admin guy - so I code more as a hobby (yes - the most dangerous kind of programmer there is...)
anyway - hope this helpes those out there needing to extend the functionality of their X-Cart's...