diff --git a/uc_attribute/uc_attribute.module b/uc_attribute/uc_attribute.module
index 94e8311..7d1fb2c 100644
--- a/uc_attribute/uc_attribute.module
+++ b/uc_attribute/uc_attribute.module
@@ -1539,3 +1539,13 @@ function uc_attribute_translate(&$attribute) {
     }
   }
 }
+
+/**
+ * Implements hook_views_api().
+ */
+function uc_attribute_views_api() {
+  return array(
+    'api' => '2.0',
+    'path' => drupal_get_path('module', 'uc_attribute') . '/views',
+  );
+}
diff --git a/uc_attribute/views/uc_attribute.views.inc b/uc_attribute/views/uc_attribute.views.inc
new file mode 100644
index 0000000..850b269
--- /dev/null
+++ b/uc_attribute/views/uc_attribute.views.inc
@@ -0,0 +1,47 @@
+<?php
+
+/**
+ * @file
+ * Views hooks for Ubercart product attributes.
+ */
+
+/**
+ * Implements hook_views_data().
+ */
+function uc_attribute_views_data() {
+  $data['uc_product_options']['table']['group'] = t('Product');
+
+  // A join is not required here as we do a subqueries.
+  // But somhow it is needed for Vews to show filters...
+  $data['uc_product_options']['table']['join'] = array(
+    'node' => array(
+      'table' => 'uc_product_options',
+      'left_field' => 'nid',
+      'field' => 'nid',
+    ),
+  );
+
+  // Add a field, filter and argoment for each Ubercart product attribute.
+  $result = db_query("SELECT aid, name, description FROM {uc_attributes}");
+  foreach ($result as $row) {
+    $data['uc_product_options']['attr_' . $row->aid] = array(
+      'title' => 'Attribute: ' . $row->name,
+      'help' => 'Attribute desc: ' . $row->description,
+      'group' => t('Product'),
+      'field' => array(
+        'handler' => 'views_handler_field',
+        'click sortable' => TRUE,
+        'group' => t('Product'),
+      ),
+      'filter' => array(
+        'handler' => 'uc_attribute_handler_filter_attribute',
+        'label' => 'Attribute',
+      ),
+      'argument' => array(
+        'handler' => 'views_handler_argument_string',
+      ),
+    );
+  }
+
+  return $data;
+}
diff --git a/uc_attribute/views/uc_attribute_handler_filter_attribute.inc b/uc_attribute/views/uc_attribute_handler_filter_attribute.inc
new file mode 100644
index 0000000..eedbd7d
--- /dev/null
+++ b/uc_attribute/views/uc_attribute_handler_filter_attribute.inc
@@ -0,0 +1,50 @@
+<?php
+
+/**
+ * @file
+ * Views handler: Node filter on Ubercart attributes.
+ */
+
+/**
+ * Filters nodes based on Ubercart product attributes.
+ */
+class uc_attribute_handler_filter_attribute extends views_handler_filter_in_operator {
+
+  /**
+   * Overrides views_handler_filter_in_operator::get_value_options().
+   */
+  function get_value_options() {
+    if (isset($this->value_options)) {
+      return;
+    }
+    $this->value_options = array();
+    $aid = explode('_', $this->field);
+    $aid = $aid[1];
+    $result = db_query("SELECT name, oid FROM {uc_attribute_options} WHERE aid = :aid ORDER BY ordering", array(':aid' => $aid));
+    while ($row = $result->fetchObject()) {
+      $this->value_options[$row->oid] = $row->name;
+    }
+  }
+
+  /**
+   * Overrides views_handler_field::query().
+   */
+  function query() {
+    if (empty($this->value)) {
+      return;
+    }
+    // An array of selected attribute options to include in a filter.
+    $values = array_values($this->value);
+
+    $this->ensure_my_table();
+
+    // Get all nids of nodes with one of selected options of this attribute.
+    $subquery = db_select('uc_product_options', 'po');
+    $subquery->addField('po', 'nid');
+    $where = db_or()->condition('po.oid', $values, 'IN');
+    $subquery->condition($where);
+
+    // Add condition for our node to be in this subquery.
+    $this->query->add_where(0, 'node.nid', $subquery, 'IN');
+  }
+}
