You are here

function uc_product_get_attributes in Ubercart 5

Same name and namespace in other branches
  1. 8.4 uc_attribute/uc_attribute.module \uc_product_get_attributes()
  2. 6.2 uc_attribute/uc_attribute.module \uc_product_get_attributes()
  3. 7.3 uc_attribute/uc_attribute.module \uc_product_get_attributes()
7 calls to uc_product_get_attributes()
uc_attribute_nodeapi in uc_attribute/uc_attribute.module
Implementation of hook_nodeapi().
uc_catalog_buy_it_now_form_submit in uc_product/uc_product.module
uc_importer_export in uc_importer/uc_importer.module
Constructs the XML representation of the store from the ids given.
uc_object_attributes_form in uc_attribute/uc_attribute.module
uc_object_options_form in uc_attribute/uc_attribute.module

... See full list

File

uc_attribute/uc_attribute.module, line 1384

Code

function uc_product_get_attributes($nid) {
  $attributes = array();
  $result = db_query("SELECT upa.aid FROM {uc_product_attributes} AS upa LEFT JOIN {uc_attributes} AS ua ON upa.aid = ua.aid WHERE upa.nid = %d ORDER BY upa.ordering, ua.name", $nid);
  while ($attribute = db_fetch_object($result)) {
    $attributes[$attribute->aid] = uc_attribute_load($attribute->aid, $nid, 'product');
  }
  return $attributes;
}