public static function renderNewIcon($date, $size = 1)
{
$app = Factory::getApplication();
$params = $app->getParams();
$new = $params->get('display_new', 0);
$o = '';
if ($new == 0) {
$o .= '';
} else {
$dateAdded = strtotime($date, time());
$dateToday = time();
$dateExists = $dateToday - $dateAdded;
$dateNew = (int) $new * 24 * 60 * 60;
if ($dateExists < $dateNew) {
$o .= '<div class="ph-corner-icon-wrapper ph-corner-icon' . $size . '-wrapper"><div class="ph-corner-icon ph-corner-icon' . $size . ' ph-corner-icon-new">' . Text::_('COM_PHOCACART_LABEL_TXT_NEW') . '</div></div>';
}
}
return $o;
}