You should create a smarty modifier before it can be used in templates.
Check this post
http://forum.x-cart.com/showpost.php?p=309487&postcount=2
Note: It is only a sample of how to create your own modifier, not the exact one to be used for this very mod.