You are here

function uc_order_pane_line_items_add in Ubercart 7.3

Order pane submit callback: Add a line item to an order.

1 string reference to 'uc_order_pane_line_items_add'
uc_order_pane_line_items in uc_order/uc_order.order_pane.inc
Handles the "Line Items" order pane.

File

uc_order/uc_order.order_pane.inc, line 822
This file contains the callbacks for the default order panes supplied with Ubercart and their corresponding helper functions.

Code

function uc_order_pane_line_items_add($form, &$form_state) {
  $order =& $form_state['order'];
  $type = $form_state['values']['li_type_select'];
  uc_order_line_item_add($order->order_id, $type, _uc_line_item_data($type, 'title'), 0);
  $order->line_items = uc_order_load_line_items($order);
  $form_state['rebuild'] = TRUE;
}