function uc_stock_menu in Ubercart 7.3
Same name and namespace in other branches
- 5 uc_stock/uc_stock.module \uc_stock_menu()
- 6.2 uc_stock/uc_stock.module \uc_stock_menu()
Implements hook_menu().
File
- uc_stock/
uc_stock.module, line 31 - Allow ubercart products to have stock levels associated with their SKU
Code
function uc_stock_menu() {
$items = array();
$items['admin/store/settings/stock'] = array(
'title' => 'Stock notifications',
'description' => 'Enable or disable stock level notifications.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'uc_stock_settings_form',
),
'access arguments' => array(
'administer product stock',
),
'file' => 'uc_stock.admin.inc',
);
if (module_exists('uc_reports')) {
$items['admin/store/reports/stock'] = array(
'title' => 'Stock reports',
'description' => 'View reports for product stock.',
'page callback' => 'uc_stock_report',
'access arguments' => array(
'view reports',
),
'file' => 'uc_stock.admin.inc',
);
}
$items['node/%node/edit/stock'] = array(
'title' => 'Stock',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'uc_stock_edit_form',
1,
),
'access callback' => 'uc_stock_product_access',
'access arguments' => array(
1,
),
'weight' => 10,
'type' => MENU_LOCAL_TASK,
'file' => 'uc_stock.admin.inc',
);
return $items;
}