<?php
_e("Price:", ET_DOMAIN); ?>
<?php
echo $currency['icon'] ?>
<?php
echo number_format((int)$ad[CE_ET_PRICE], 2) ?><?php
echo $currency['icon'] ?>
function ce_get_price_format($amount, $style = '') {
$option = new CE_Options();
$currency = $option->get_option('et_currency_sign');
$align = $option->get_option('et_currency_align');
$price_format = $option->get_option('et_currency_format');
$format = '%1$s';
switch ($style) {
case 'sup':
$format = '%s';
break;
case 'sub':
$format = '%s';
break;
default:
$format = '%s';
break;
}
$decimal = get_theme_mod('et_decimal', 2);
$decimal_point = ($price_format != 2) ? "." : ",";
$thousand_sep = ($price_format != 2) ? "," : ".";
if ($align != "right") {
$format = $format . '%s';
return sprintf($format, $currency, number_format((double)$amount, $decimal, $decimal_point, $thousand_sep));
} else {
$format = '%s' . $format;
return sprintf($format, number_format((double)$amount, $decimal, $decimal_point, $thousand_sep) , $currency);
}
}