? .svn
? .uc_node_checkout.views.inc.swp
? uc_node_checkout-save-submit.patch
? uc_node_checkout-schema-docs.patch
? uc_node_checkout-views.patch
? uc_node_checkout_430016.patch
? uc_node_checkout_views.patch
Index: uc_node_checkout.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_node_checkout/uc_node_checkout.info,v
retrieving revision 1.2
diff -u -p -r1.2 uc_node_checkout.info
--- uc_node_checkout.info	11 Nov 2008 02:23:22 -0000	1.2
+++ uc_node_checkout.info	31 Oct 2009 05:10:22 -0000
@@ -2,5 +2,6 @@
 name = Node Checkout
 description = Adds a product to the cart when a checkout node is created.
 dependencies[] = uc_cart
+dependencies[] = uc_views
 package = Ubercart - extra
 core = 6.x
Index: uc_node_checkout.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_node_checkout/uc_node_checkout.module,v
retrieving revision 1.8.2.11
diff -u -p -r1.8.2.11 uc_node_checkout.module
--- uc_node_checkout.module	30 Jul 2009 17:27:28 -0000	1.8.2.11
+++ uc_node_checkout.module	31 Oct 2009 05:10:24 -0000
@@ -913,3 +913,13 @@ function uc_node_checkout_load_order_pro
 
   return $products[$order_product_id];
 }
+
+/**
+ * Implementation of hook_views_api().
+ */
+function uc_node_checkout_views_api() {
+  return array(
+    'api' => 2,
+  );
+}
+
Index: uc_node_checkout.views.inc
===================================================================
RCS file: uc_node_checkout.views.inc
diff -N uc_node_checkout.views.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ uc_node_checkout.views.inc	31 Oct 2009 05:10:24 -0000
@@ -0,0 +1,44 @@
+<?php
+// $Id$
+
+/**
+ * Views integration for uc_node_checkout module.
+ *
+ * Creates a relationship between the created node and the associated order
+ * line number.
+ */
+
+/**
+ * Implementation of hook_views_data().
+ */
+function uc_node_checkout_views_data() {
+
+  // Definition for the uc_node_checkout_order_products bridge table.
+  $data['uc_node_checkout_order_products']['table']['group'] = t('UC Node Checkout');
+  $data['uc_node_checkout_order_products']['table']['join'] = array(
+    'node' => array(
+      'left_field' => 'nid',
+      'field' => 'nid',
+      'type' => 'INNER',
+    ),
+    'ucnc_order_products' => array(
+      'left_field' => 'order_product_id',
+      'field' => 'order_product_id',
+      'type' => INNER,
+    ),
+  );
+
+  $data['uc_node_checkout_order_products']['order_product_id'] = array(
+    'title' => t('UC Node Checkout order'),
+    'help' => t('Relate a purchased node to its UC Node Checkout order.'),
+    'relationship' => array(
+      'handler' => 'views_handler_relationship',
+      'base' => 'uc_order_products',
+      'base field' => 'order_product_id',
+      'field' => 'order_product_id',
+      'label' => t('UC Node Checkout order'),
+    ),
+  );
+
+  return $data;
+}
