Dev version of uc_views

This commit is contained in:
mattbk
2015-10-06 13:57:14 -05:00
parent de57c1b0e6
commit bb1313bad9
52 changed files with 5691 additions and 0 deletions

25
uc_views/theme/theme.inc Normal file
View File

@ -0,0 +1,25 @@
<?php
/**
* @file
* Patch by hanoii
*/
/**
* Template helper for theme_views_view_row_node
*/
function template_preprocess_uc_views_view_row_invoice(&$vars) {
require_once drupal_get_path('module', 'uc_order') . '/uc_order.admin.inc';
$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);
$invoice = uc_order_invoice($order);
$vars['invoice'] = $invoice;
}