Back to PhocacartAttribute class

Method getOptionType

public static
getOptionType
(mixed $id)

Method getOptionType - Source code

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