function smarty_modifier_comma_format($value)
{
    return cw_format_number($value, null, ',', null);
}
function smarty_modifier_formatprice($price, $thousand_delim = NULL, $decimal_delim = NULL, $precision = NULL)
{
    return cw_format_number($price, $thousand_delim, $decimal_delim, $precision);
}
<?php

$smarty->assign('number_format_dec', $config['Appearance']['number_format'][1]);
$smarty->assign('number_format_th', $config['Appearance']['number_format'][2]);
$smarty->assign('number_format_point', intval($config['Appearance']['number_format'][0]));
$smarty->assign('zero', cw_format_number(0));