формат вида 2 300
В /core_functions/functions.php:
function _formatPrice($price)
{
$price = (string)$price;
if ( !strstr($price,".") )
$oldPrice = $price;
$res = "";
$i = 0;
for( $i=strlen($price)-1; $i>=0; $i-- )
{
if ( $price[$i] == "." )
break;
else
$res = $price[$i].$res;
}
$res = ".".$res;
$i--;
$digitCounter = 0;
for( ; $i>=0; $i-- )
{
$digitCounter++;
$res = $price[$i].$res;
if ( $digitCounter == 3 && $i != 0 )
{
$res = ",".$res;
$digitCounter = 0;
}
}
return $res;
}
заменяем на:
function _formatPrice($price)
{
$price = (string)$price;
if ( !strstr($price," ") )
$price .= ".";
$oldPrice = $price;
$res = "";
$i = 0;
for( $i=strlen($price)-1; $i>=0; $i-- )
{
if ( $price[$i] == "." )
break;
else
$res = $price[$i].$res;
}
$res = " ".$res;
$i--;
$digitCounter = 0;
for( ; $i>=0; $i-- )
{
$digitCounter++;
$res = $price[$i].$res;
if ( $digitCounter == 3 && $i != 0 )
{
$res = " ".$res;
$digitCounter = 0;
}
}
return $res;
}