function uc_attribute_uc_product_models in Ubercart 6.2
Same name and namespace in other branches
- 8.4 uc_attribute/uc_attribute.module \uc_attribute_uc_product_models()
- 7.3 uc_attribute/uc_attribute.module \uc_attribute_uc_product_models()
Implements hook_uc_product_models().
File
- uc_attribute/
uc_attribute.module, line 495
Code
function uc_attribute_uc_product_models($nid) {
$models = array();
// Get all the SKUs for all the attributes on this node.
$adjustments = db_query("SELECT DISTINCT model FROM {uc_product_adjustments} WHERE nid = %d", $nid);
while ($adjustment = db_result($adjustments)) {
$models[] = $adjustment;
}
return $models;
}