function uc_stock_set in Ubercart 6.2
Same name and namespace in other branches
- 8.4 uc_stock/uc_stock.module \uc_stock_set()
- 7.3 uc_stock/uc_stock.module \uc_stock_set()
Sets the product stock level.
Parameters
$sku: The product SKU of the stock level to set.
$qty: The number of items in stock.
1 call to uc_stock_set()
- UbercartStockTestCase::testProductStock in uc_stock/
uc_stock.test
File
- uc_stock/
uc_stock.module, line 292
Code
function uc_stock_set($sku, $qty) {
db_query("UPDATE {uc_product_stock} SET stock = %d WHERE sku = '%s'", $qty, $sku);
}