Back to PhocacartParameter class

Method getAllParameterValuesSelectBox

public static
getAllParameterValuesSelectBox
(mixed $name, mixed $id, mixed $parameterId, mixed $activeArray, mixed $attributes = '', mixed $order = 'a.id')

Method getAllParameterValuesSelectBox - Source code

/*
 * PARAMETER VALUES (stored in products) Field PhocacartParameterValues
 */
public static function getAllParameterValuesSelectBox($name, $id, $parameterId, $activeArray, $attributes = '', $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();
    $parametersO = HTMLHelper::_('select.genericlist', $parameters, $name, $attributes, 'value', 'text', $activeArray, $id);
    return $parametersO;
}