You are here

function uc_discounts_views_data in Ubercart Discounts (Alternative) 7.2

Same name and namespace in other branches
  1. 6.2 uc_discounts/uc_discounts.views.inc \uc_discounts_views_data()

Implements hook_views_data().

File

uc_discounts/uc_discounts.views.inc, line 11
Views integration for uc_discounts module.

Code

function uc_discounts_views_data() {
  $data = array();
  $data['uc_discounts_order_codes']['table']['group'] = t('UC Discounts');
  $data['uc_discounts_order_codes']['table']['join'] = array(
    'uc_orders' => array(
      'left_field' => 'order_id',
      'field' => 'order_id',
    ),
  );
  $data['uc_discounts_order_codes']['codes'] = array(
    'title' => t('Codes Applied'),
    'help' => t('A comma separated listing of the coupon codes used on this order'),
    'field' => array(
      'handler' => 'views_handler_field',
    ),
  );
  return $data;
}