function commerce_cart_order_refresh_form in Commerce Core 7
Form callback: confirmation form for manually refreshing an order.
Parameters
$order: The order object to apply the card refresh to.
Return value
The form array to confirm the refresh.
See also
1 string reference to 'commerce_cart_order_refresh_form'
- commerce_cart_menu in modules/
cart/ commerce_cart.module - Implements hook_menu().
File
- modules/
cart/ includes/ commerce_cart.admin.inc, line 20 - Administrative forms and page callbacks for the Cart module.
Code
function commerce_cart_order_refresh_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('All product prices will be reset and recalculated using the product pricing rules defined on this site.'),
t('Non-product line items may or may not be updated depending on the type.'),
t('Custom prices entered on the edit form will be lost.'),
);
$form = confirm_form($form, t('Are you sure you want to apply pricing rules to order @number?', array(
'@number' => $order->order_number,
)), 'admin/commerce/orders/' . $order->order_id . '/edit', '<p>' . theme('item_list', array(
'items' => $items,
)) . '</p>', t('Apply pricing rules'), t('Cancel'));
return $form;
}