Index: uc_store_credit.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_store_credit/uc_store_credit.module,v
retrieving revision 1.1.4.1
diff -u -r1.1.4.1 uc_store_credit.module
--- uc_store_credit.module	28 May 2009 03:19:38 -0000	1.1.4.1
+++ uc_store_credit.module	21 Oct 2009 12:18:14 -0000
@@ -518,3 +518,12 @@
   return $function('add', $uid, $total);
 }
 
+/**
+ * Implementation of hook_views_api().
+ */
+function uc_store_credit_views_api() {
+  return array(
+    'api' => '2.0',
+    'path' => drupal_get_path('module', 'uc_store_credit') .'/views',
+  );
+}
--- uc_store_credit.views.inc
+++ uc_store_credit.views.inc
@@ -0,0 +1,45 @@
+<?php
+// $Id;
+/**
+ * @file
+ * Views 2 hooks and callback registries.
+ */
+
+/**
+ * Implementation of hook_views_data().
+ */
+function uc_store_credit_views_data() {
+	$data['uc_store_credit_values']['table']['group'] = t('Product');
+
+  $data['uc_store_credit_values']['table']['join'] = array(
+    'node' => array(
+      'left_field' => 'nid',
+      'field' => 'nid',
+    ),
+    'node_revisions' => array(
+      'left_field' => 'nid',
+      'field' => 'nid',
+    ),
+  );
+
+  $data['uc_store_credit_values']['store_credit_value'] = array(
+    'title' => t('Store Credit'),
+    'help' => t('The store credit.'),
+    'field' => array(
+      'handler' => 'views_handler_field_node',
+      'click sortable' => TRUE,
+    ),
+    'sort' => array(
+      'handler' => 'views_handler_sort',
+    ),
+		
+    'filter' => array(
+      'handler' => 'views_handler_filter_numeric',
+    ),
+    'argument' => array(
+      'handler' => 'views_handler_argument_numeric',
+    ),
+  );
+	
+	return $data;
+}


