You are here

function uc_restrict_qty_count in Ubercart Restrict Qty 6

Same name and namespace in other branches
  1. 5 uc_restrict_qty.module \uc_restrict_qty_count()
  2. 6.2 uc_restrict_qty.module \uc_restrict_qty_count()
  3. 7 uc_restrict_qty.module \uc_restrict_qty_count()
3 calls to uc_restrict_qty_count()
uc_restrict_qty_add_to_cart in ./uc_restrict_qty.module
Implementation of hook_add_to_cart().
uc_restrict_qty_add_to_cart_data in ./uc_restrict_qty.module
Implementation of hook_add_to_cart_data().
uc_restrict_qty_form_alter in ./uc_restrict_qty.module
Implementation of hook_form_alter().

File

./uc_restrict_qty.module, line 179
Restrict the quantity on specified products so that only one may be purchased at a time.

Code

function uc_restrict_qty_count($nid) {
  return db_result(db_query("SELECT COUNT(*) FROM {uc_product_features} WHERE nid = %d AND fid = '%s'", $nid, 'restrict_qty'));
}