You are here

function uc_restrict_qty_count in Ubercart Restrict Qty 5

Same name and namespace in other branches
  1. 6.2 uc_restrict_qty.module \uc_restrict_qty_count()
  2. 6 uc_restrict_qty.module \uc_restrict_qty_count()
  3. 7 uc_restrict_qty.module \uc_restrict_qty_count()
1 call to uc_restrict_qty_count()
uc_restrict_qty_add_to_cart_data in ./uc_restrict_qty.module
Implementation of hook_add_to_cart_data().

File

./uc_restrict_qty.module, line 92
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'));
}