public static function getAttributeType($id)
{
$db = Factory::getDBO();
$wheres = array();
$wheres[] = ' id = ' . (int) $id;
$query = ' SELECT type' . ' FROM #__phocacart_attributes' . ' WHERE ' . implode(' AND ', $wheres) . ' ORDER BY id LIMIT 1';
$db->setQuery($query);
$type = $db->loadResult();
return $type;
}