You are here

function commerce_checkout_complete_form in Commerce Core 7

Form callback: confirmation form for manually invoking the checkout completion event for an order.

Parameters

$order: The order object to process checkout completion on.

Return value

The form array to confirm the process.

See also

confirm_form()

1 string reference to 'commerce_checkout_complete_form'
commerce_checkout_menu in modules/checkout/commerce_checkout.module
Implements hook_menu().

File

modules/checkout/includes/commerce_checkout.admin.inc, line 414
Administrative callbacks for the Checkout module.

Code

function commerce_checkout_complete_form($form, &$form_state, $order) {
  $form['order_id'] = array(
    '#type' => 'value',
    '#value' => $order->order_id,
  );

  // Build a description of what the user may expect to occur on submission.
  $items = array(
    t('The normal checkout completion process will be invoked on this order.'),
    t('This may involve order status updates and e-mail notifications.'),
  );
  $form = confirm_form($form, t('Are you sure you want to simulate checkout completion for order @number?', array(
    '@number' => $order->order_number,
  )), 'admin/commerce/orders/' . $order->order_id . '/edit', '<p>' . theme('item_list', array(
    'items' => $items,
  )) . '</p>', t('Simulate checkout completion'), t('Cancel'));
  return $form;
}