You are here

function uc_stock_is_active in Ubercart 6.2

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

Checks if a SKU has an active stock record.

Parameters

$sku: The Ubercart product SKU to check

Return value

Whether or not the sku has an active stock record.

2 calls to uc_stock_is_active()
UbercartStockTestCase::testProductStock in uc_stock/uc_stock.test
uc_stock_adjust_product_stock in uc_stock/uc_stock.module
Adjusts a product's stock.

File

uc_stock/uc_stock.module, line 324

Code

function uc_stock_is_active($sku) {
  return (bool) db_result(db_query("SELECT active FROM {uc_product_stock} WHERE sku = '%s'", $sku));
}