function uc_class_get_attributes in Ubercart 6.2
Same name and namespace in other branches
- 8.4 uc_attribute/uc_attribute.module \uc_class_get_attributes()
- 5 uc_attribute/uc_attribute.module \uc_class_get_attributes()
- 7.3 uc_attribute/uc_attribute.module \uc_class_get_attributes()
Loads all attributes associated with a product class.
2 calls to uc_class_get_attributes()
- uc_object_attributes_form in uc_attribute/
uc_attribute.admin.inc - Form to associate attributes with products or classes.
- uc_object_options_form in uc_attribute/
uc_attribute.admin.inc - Form to assign and modify attribute options on products or classes.
File
- uc_attribute/
uc_attribute.module, line 1201
Code
function uc_class_get_attributes($pcid) {
$attributes = array();
$result = db_query("SELECT uca.aid FROM {uc_class_attributes} AS uca LEFT JOIN {uc_attributes} AS ua ON uca.aid = ua.aid WHERE uca.pcid = '%s' ORDER BY uca.ordering, ua.name", $pcid);
while ($attribute = db_fetch_object($result)) {
$attributes[$attribute->aid] = uc_attribute_load($attribute->aid, $pcid, 'class');
}
return $attributes;
}