function commerce_cart_order_refresh_form_submit in Commerce Core 7
Form submit callback for commerce_cart_order_refresh_form().
File
- modules/
cart/ includes/ commerce_cart.admin.inc, line 47 - Administrative forms and page callbacks for the Cart module.
Code
function commerce_cart_order_refresh_form_submit($form, &$form_state) {
if ($order = commerce_order_load($form_state['values']['order_id'])) {
commerce_cart_order_refresh($order);
drupal_set_message(t('Pricing rules have been applied and the order updated.'));
$form_state['redirect'] = 'admin/commerce/orders/' . $order->order_id . '/edit';
}
else {
drupal_set_message(t('Order not found.'), 'error');
$form_state['redirect'] = 'admin/commerce/orders';
}
}