Fix for UC_Views

  1. <?PHP //within uc_views.views.inc
  2.   // Add shipping details to uc_views
  3.   $data['uc_shipments']['table']['group'] = t('Ubercart shipment');
  4.   $data['uc_shipments']['table']['join']['uc_orders'] = array(
  5.     'left_field' => 'order_id',
  6.     'field' => 'order_id',
  7.   );
  8.   $data['uc_shipments']['carrier'] = array(
  9.     'title' => t('Shipping Carrier Title'),
  10.     'help' => t('The shipping carrier used.'),
  11.     'field' => array(
  12.       'handler' => 'views_handler_field',
  13.       'click sortable' => TRUE,
  14.     ),
  15.   );
  16.   $data['uc_shipments']['cost'] = array(
  17.     'title' => t('Shipping Cost Amount'),
  18.     'help' => t('The shipping actual cost.'),
  19.     'field' => array(
  20.       'handler' => 'uc_views_handler_field_money_amount',
  21.       'click sortable' => TRUE,
  22.     ),
  23.   );
  24.   $data['uc_shipments']['ship_date'] = array(
  25.     'title' => t('Order Ship Date'),
  26.     'help' => t('The shipment date.'),
  27.     'field' => array(
  28.       'handler' => 'views_handler_field_date',
  29.       'click sortable' => TRUE,
  30.     ),
  31.      'sort' => array(
  32.       'handler' => 'views_handler_sort_date',
  33.     ),
  34.     'filter' => array(
  35.       'handler' => 'views_handler_filter_date',
  36.     ),
  37.   );
  38.   //if the sexy date module is installed use that for filtering
  39.   if(module_exists('date_api')) {
  40.     $data['uc_shipments']['ship_date']['filter']['handler'] = 'date_api_filter_handler';
  41.   }
  42. ?>

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.