function uc_stock_views_handler_filter_below_threshold in Ubercart 5
1 string reference to 'uc_stock_views_handler_filter_below_threshold'
- uc_stock_views_tables in uc_stock/
uc_stock.module - Implementation of hook_views_tables().
File
- uc_stock/
uc_stock.module, line 515
Code
function uc_stock_views_handler_filter_below_threshold($op, $filter, $filterinfo, &$query) {
if ($op == 'handler') {
if ($filter['value'] == 0) {
$operator = '>=';
}
else {
$operator = '<';
}
$query
->add_where('uc_product_stock.stock ' . $operator . ' uc_product_stock.threshold');
}
}