Back to PhocacartParameter class

Method getAllParameterValuesList

public static
getAllParameterValuesList
(mixed $parameterId, mixed $order = 'a.id')

Method getAllParameterValuesList - Source code

/*
 * PARAMETER VALUES (stored in products) Field PhocacartParameterValues
 * administrator/components/com_phocacart/models/phocacartitem.php 1547 // Load Parameter Values for Parameters
 */
public static function getAllParameterValuesList($parameterId, $order = 'a.id')
{
    $db = Factory::getDBO();
    $query = 'SELECT a.id AS value, a.title AS text' . ' FROM #__phocacart_parameter_values AS a' . ' LEFT JOIN #__phocacart_parameters AS p ON a.parameter_id = p.id' . ' WHERE p.id = ' . (int) $parameterId . ' ORDER BY ' . $order;
    $db->setQuery($query);
    $parameters = $db->loadObjectList();
    return $parameters;
}