public static function getActiveTags($items, $ordering)
{
$db = Factory::getDbo();
$o = array();
$wheres = array();
$ordering = PhocacartOrdering::getOrderingText($ordering, 3);
//t
if ($items != '') {
$wheres[] = 't.id IN (' . $items . ')';
$wheres[] = 't.type = 0';
$q = 'SELECT DISTINCT t.title, CONCAT(t.id, \'-\', t.alias) AS alias, \'tag\' AS parameteralias, \'tag\' AS parametertitle FROM #__phocacart_tags AS t' . (!empty($wheres) ? ' WHERE ' . implode(' AND ', $wheres) : '') . ' GROUP BY t.alias, t.title' . ' ORDER BY ' . $ordering;
$db->setQuery($q);
$o = $db->loadAssocList();
}
return $o;
}