Since you're using a script, it may not be inserted- smarty may not work inside it... {$total} Maybe a <!--{literal}--> <!--{/literal}--> is needed around the script. David