function uc_catalog_image_load in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_catalog/uc_catalog.module \uc_catalog_image_load()
Load a catalog term's image.
2 calls to uc_catalog_image_load()
- uc_catalog_form_alter in uc_catalog/
uc_catalog.module - Add an image field to the catalog's taxonomy term form.
- uc_catalog_get_page in uc_catalog/
uc_catalog.module - Load catalog information for display.
File
- uc_catalog/
uc_catalog.module, line 1369 - Übercart Catalog module.
Code
function uc_catalog_image_load($term) {
if (is_object($term)) {
$tid = $term->tid;
}
else {
if (is_array($term)) {
$tid = $term['tid'];
}
else {
$tid = $term;
}
}
$file = db_fetch_object(db_query("SELECT * FROM {uc_catalog_images} WHERE tid = %d", $tid));
return $file;
}