<?php
if(strpos($cat->getMinWeight(), '.') !== false){
    $arr_mw = explode('.', $cat->getMinWeight());
    if($arr_mw[1] > 0){
        echo number_format($cat->getMinWeight(), 3, ',', ' ');
    } else {
        echo round($cat->getMinWeight());
    }
} else {
    echo $cat->getMinWeight();
}
