You are here

function uc_order_create in Ubercart 6.2

Same name and namespace in other branches
  1. 5 uc_order/uc_order.module \uc_order_create()
  2. 7.3 uc_order/uc_order.module \uc_order_create()

Creates a new order and redirect to its edit screen.

See also

uc_order_create_form_create_validate()

uc_order_create_form_create_submit()

1 string reference to 'uc_order_create'
uc_order_menu in uc_order/uc_order.module
Implements hook_menu().

File

uc_order/uc_order.admin.inc, line 633
Order administration menu items.

Code

function uc_order_create($account = NULL) {
  drupal_add_js(array(
    'ucURL' => array(
      'adminOrders' => url('admin/store/orders/'),
    ),
  ), 'setting');
  drupal_add_js(drupal_get_path('module', 'uc_order') . '/uc_order.js');
  $output = '<div id="customer-search-link" style="position: relative; top: 2px; cursor: pointer;" ' . 'onclick="load_customer_search();">' . uc_store_get_icon('file:order_view') . ' ' . t('Search for an existing customer.') . '</div>';
  $output .= '<div id="customer-create-link" style="position: relative; top: 2px; cursor: pointer;" ' . 'onclick="load_new_customer_form();">' . uc_store_get_icon('file:menu_customers_small') . ' ' . t('Create a new customer.') . '</div>';
  $output .= '<div id="customer-select"></div><br />' . drupal_get_form('uc_order_create_form', $account);
  return $output;
}