function uc_payment_get_totals in Ubercart 7.3
Same name and namespace in other branches
- 5 payment/uc_payment/uc_payment.module \uc_payment_get_totals()
- 6.2 payment/uc_payment/uc_payment.module \uc_payment_get_totals()
Returns a formatted list of line items for an order total preview.
Parameters
$return: TRUE or FALSE to specify whether or not to return the results instead of printing them and exiting.
$order: Optionally pass in a full order object to use instead of finding it in the $_POST data.
Return value
The formatted HTML of the order total preview if $return is set to TRUE.
File
- payment/
uc_payment/ uc_payment.module, line 304
Code
function uc_payment_get_totals($form, $form_state) {
$commands[] = ajax_command_replace('#line-items-div', trim(drupal_render($form['panes']['payment']['line_items'])));
return array(
'#type' => 'ajax',
'#commands' => $commands,
);
}