You are here

function uc_stock_level in Ubercart 5

Same name and namespace in other branches
  1. 8.4 uc_stock/uc_stock.module \uc_stock_level()
  2. 6.2 uc_stock/uc_stock.module \uc_stock_level()
  3. 7.3 uc_stock/uc_stock.module \uc_stock_level()

Get the stock level of a particular product SKU

@return: The associated stock level with the particular SKU or FALSE if not active.

Parameters

$sku: The Ubercart product SKU of the stock level to return.

1 call to uc_stock_level()
uc_stock_action_decrement_stock in uc_stock/uc_stock_workflow.inc

File

uc_stock/uc_stock.module, line 360

Code

function uc_stock_level($sku) {
  return db_result(db_query("SELECT stock FROM {uc_product_stock} WHERE sku = '%s' AND active = 1", $sku));
}