source/Core/Utils.php
public function string2Float($sValue)
    {
        $fRet = str_replace(" ", "", $sValue);
        $iCommaPos = strpos($fRet, ",");
        $iDotPos = strpos($fRet, ".");
        if (!$iDotPos xor !$iCommaPos) {
            if (substr_count($fRet, ",") > 1 || substr_count($fRet, ".") > 1) {
                $fRet = str_replace([",", "."], "", $fRet);
            } else {
                $fRet = str_replace(",", ".", $fRet);
            }
        } else {
            if ($iDotPos < $iCommaPos) {
                $fRet = str_replace(".", "", $fRet);
                $fRet = str_replace(",", ".", $fRet);
            }
        }

        // remove thousands
        return (float) str_replace([" ", ","], "", $fRet);
    }
public function string2Float($sValue)
    {
        $fRet = str_replace(" ", "", $sValue);
        $iCommaPos = strpos($fRet, ",");
        $iDotPos = strpos($fRet, ".");
        if (!$iDotPos xor !$iCommaPos) {
            if (substr_count($fRet, ",") > 1 || substr_count($fRet, ".") > 1) {
                $fRet = str_replace([",", "."], "", $fRet);
            } else {
                $fRet = str_replace(",", ".", $fRet);
            }
        } else {
            if ($iDotPos < $iCommaPos) {
                $fRet = str_replace(".", "", $fRet);
                $fRet = str_replace(",", ".", $fRet);
            }
        }

        // remove thousands
        return (float) str_replace([" ", ","], "", $fRet);
    }
public function string2Float ( $ sValue ) { $ fRet = str_replace ( " " , "" , $ sValue ) ; $ iCommaPos = strpos ( $ fRet , "," ) ; $ iDotPos = strpos ( $ fRet , "." ) ; if ( ! $ iDotPos xor ! $ iCommaPos ) { if ( substr_count ( $ fRet , "," ) > 1 || substr_count ( $ fRet , "." ) > 1 ) { $ fRet = str_replace ( [ "," , "." ] , "" , $ fRet ) ; } else { $ fRet = str_replace ( "," , "." , $ fRet ) ; } } else { if ( $ iDotPos < $ iCommaPos ) { $ fRet = str_replace ( "." , "" , $ fRet ) ; $ fRet = str_replace ( "," , "." , $ fRet ) ; } } // remove thousands return ( float ) str_replace ( [ " " , "," ] , "" , $ fRet ) ; }
Returns formatted float, according to formatting standards.

@param string $sValue Formatted price

@return float
Returns formatted float according to formatting standards .