| 1227 |
* Create a new order and redirect to its edit screen. |
* Create a new order and redirect to its edit screen. |
| 1228 |
*/ |
*/ |
| 1229 |
function uc_order_create($uid = NULL) { |
function uc_order_create($uid = NULL) { |
|
global $user; |
|
|
|
|
|
if ($uid !== NULL) { |
|
|
$order = uc_order_new($uid, 'post_checkout'); |
|
|
uc_order_comment_save($order->order_id, $user->uid, t('Order created by the administration.'), 'admin'); |
|
|
drupal_goto('admin/store/orders/'. $order->order_id .'/edit'); |
|
|
} |
|
|
|
|
| 1230 |
uc_add_js(drupal_get_path('module', 'uc_order') .'/uc_order.js'); |
uc_add_js(drupal_get_path('module', 'uc_order') .'/uc_order.js'); |
| 1231 |
|
|
| 1232 |
$output = '<div style="position: relative; top: 2px; cursor: pointer;" ' |
$output = '<div style="position: relative; top: 2px; cursor: pointer;" ' |
| 1284 |
} |
} |
| 1285 |
|
|
| 1286 |
function uc_order_create_form_submit($form_id, $form_values) { |
function uc_order_create_form_submit($form_id, $form_values) { |
| 1287 |
uc_order_create($form_values['uid']); |
global $user; |
| 1288 |
|
|
| 1289 |
|
$order = uc_order_new($form_values['uid'], 'post_checkout'); |
| 1290 |
|
uc_order_comment_save($order->order_id, $user->uid, t('Order created by the administration.'), 'admin'); |
| 1291 |
|
|
| 1292 |
|
return 'admin/store/orders/'. $order->order_id .'/edit'; |
| 1293 |
} |
} |
| 1294 |
|
|
| 1295 |
/** |
/** |