public static function getPoints($points, $type = 'received', $groupPoints = null)
{
$pointsO = null;
//$app = JFactory::getApplication();
$paramsC = PhocacartUtils::getComponentParameters();
$enable_rewards = $paramsC->get('enable_rewards', 1);
if ($enable_rewards == 0) {
return $pointsO;
}
if ($type == 'needed') {
if ($points > 0) {
$pointsO = $points;
}
} else {
if ($type == 'received') {
if ($points > 0) {
$pointsO = $points;
}
if ($groupPoints > 0) {
$pointsO = $groupPoints;
}
}
}
return $pointsO;
}