function uc_product_class_load in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_product/uc_product.module \uc_product_class_load()
- 7.3 uc_product/uc_product.module \uc_product_class_load()
Load a product class.
6 calls to uc_product_class_load()
- 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 - uc_product_class_form in uc_product/
uc_product.module - Form builder for product classes.
- uc_product_class_form_submit in uc_product/
uc_product.module - Submit handler for uc_product_class_form.
File
- uc_product/
uc_product.module, line 2554 - The product module for Ubercart.
Code
function uc_product_class_load($class_id) {
static $classes = array();
if (empty($classes[$class_id])) {
$result = db_query("SELECT * FROM {uc_product_classes} WHERE pcid = '%s'", $class_id);
$class = db_fetch_object($result);
$classes[$class_id] = $class;
}
return $classes[$class_id];
}