/**
* Formats product prices
*
* @param float $price
*
* @return string
*/
public function sFormatPrice($price) { $price =
str_replace(',', '.',
(string) $price);
$price =
$this->
sRound($price);
$price =
str_replace('.', ',',
(string) $price); // Replaces points with commas
$commaPos =
strpos((string) $price, ','
);
if ($commaPos) { $part =
substr((string) $price,
$commaPos + 1, \
strlen((string) $price) -
$commaPos);
switch (\
strlen($part)) { case 1:
$price .= '0';
break;
case 2:
break;
} }