function template_preprocess_uc_order_view_row_invoice in Ubercart 7.3
Preprocesses a views row invoice plugin.
See also
uc_order-view-row-invoice.tpl.php
File
- uc_order/
views/ uc_order.views.inc, line 740 - Views hooks and callback registries.
Code
function template_preprocess_uc_order_view_row_invoice(&$vars) {
$order_id = $vars['row']->{$vars['field_alias']};
if (module_exists('uc_credit')) {
// Clear credit cache, otherwise the load function below will return
// the same cached credit information for all the subsequent orders
// invoices
uc_credit_cache('clear');
}
$order = uc_order_load($order_id);
$build = array(
'#theme' => 'uc_order',
'#order' => $order,
'#op' => 'view',
'#template' => variable_get('uc_cust_order_invoice_template', 'customer'),
);
$vars['invoice'] = theme('uc_order_invoice_page', array(
'content' => drupal_render($build),
));
}