You are here

function uc_attribute_uc_product_models in Ubercart 7.3

Same name and namespace in other branches
  1. 8.4 uc_attribute/uc_attribute.module \uc_attribute_uc_product_models()
  2. 6.2 uc_attribute/uc_attribute.module \uc_attribute_uc_product_models()

Implements hook_uc_product_models().

Parameters

int $nid: Node number for product type node.

Return value

array Array of SKUs (model numbers) for this $nid.

File

uc_attribute/uc_attribute.module, line 464
Ubercart Attribute module.

Code

function uc_attribute_uc_product_models($nid) {

  // Get all the SKUs for all the attributes on this node.
  $models = db_query("SELECT DISTINCT model FROM {uc_product_adjustments} WHERE nid = :nid", array(
    ':nid' => $nid,
  ))
    ->fetchCol();
  return $models;
}