Community & Support

Need assistance getting a module to work with views and ubercart. I can pay for help of course.

I'm trying to add this module (http://www.ubercart.org/comment/43532) so I can expose a views filter by product attributes. This module should allow me to expose product attributes in the views exposed filters. This will be perfect for my tire products if someone wants to see all tires available for a specific size.

The problem is this module was a quick fix and it's unsupported. I was wondering if someone could assist me in getting it working? I'd pay for your time of course.

When I enable this module I get this error:

user warning: Table 'thepinkg_drp1.uc_attributes' doesn't exist query: SELECT aid, name, description FROM uc_attributes in /home2/thepinkg/public_html/sites/all/modules/uc_attribute_view/views/uc_attribute_view.views.inc on line 17.
user warning: Table 'thepinkg_drp1.uc_attributes' doesn't exist query: SELECT aid, name, description FROM uc_attributes in /home2/thepinkg/public_html/sites/all/modules/uc_attribute_view/views/uc_attribute_view.views.inc on line 17.

I got by that error by changing line 17 to drup_uc_attributes. I'm not sure why, but when I looked at my database everything has the prefix drup_*. I'm sure there is a better way to fix that?

After getting past that I was able to go into my view and create a filter for attributes. The view loaded with the correct filter and it seems to work exactly as it should. The problem is that there are a ton of error messages at the top of the page.

user warning: Unknown column 'uc_product_options.attr_31' in 'field list' query: SELECT DISTINCT(node.nid) AS nid, node.type AS node_type, node.vid AS node_vid, node.title AS node_title, uc_products.list_price AS uc_products_list_price, uc_products.sell_price AS uc_products_sell_price, uc_product_options.attr_31 AS uc_product_options_attr_31, node.sticky AS node_sticky, node.created AS node_created FROM drup_node node LEFT JOIN drup_uc_products uc_products ON node.vid = uc_products.vid LEFT JOIN drup_uc_product_options uc_product_options ON node.nid = uc_product_options.nid WHERE (node.status <> 0 OR (node.uid = 1 AND 1 <> 0) OR 1 = 1) AND (node.vid IN ( SELECT tn.vid FROM drup_term_node tn LEFT JOIN drup_term_hierarchy th ON th.tid = tn.tid LEFT JOIN drup_term_hierarchy th1 ON th.parent = th1.tid LEFT JOIN drup_term_hierarchy th2 ON th1.parent = th2.tid LEFT JOIN drup_term_hierarchy th3 ON th2.parent = th3.tid LEFT JOIN drup_term_hierarchy th4 ON th3.parent = th4.tid LEFT JOIN drup_term_hierarchy th5 ON th4.parent = th5.tid LEFT JOIN drup_term_hierarchy th6 ON th5.parent = th6.tid LEFT JOIN drup_term_hierarchy th7 ON th6.parent = th7.tid LEFT JOIN drup_term_hierarchy th8 ON th7.parent = th8.tid LEFT JOIN drup_term_hierarchy th9 ON th8.parent = th9.tid LEFT JOIN drup_term_hierarchy th10 ON th9.parent = th10.tid WHERE tn.tid IN (29, 30, 31, 32) OR th1.tid IN (29, 30, 31, 32) OR th2.tid IN (29, 30, 31, 32) OR th3.tid IN (29, 30, 31, 32) OR th4.tid IN (29, 30, 31, 32) OR th5.tid IN (29, 30, 31, 32) OR th6.tid IN (29, 30, 31, 32) OR th7.tid IN (29, 30, 31, 32) OR th8.tid IN (29, 30, 31, 32) OR th9.tid IN (29, 30, 31, 32) OR th10.tid IN (29, 30, 31, 32) )) GROUP BY nid ORDER BY node_sticky DESC, node_created DESC, uc_products_sell_price ASC in /home2/thepinkg/public_html/sites/all/modules/views/includes/view.inc on line 775.

I have no idea what these errors are trying to tell me.

Thanks.

Comments

problem rewrite sql in uc_attribute_view.views.inc

Drupal could not do the rewrite sql in line 17 (uc_attribute_view.views.inc)
only change
$result = db_query("SELECT aid, name, description FROM uc_attributes");
for
$result = db_query("SELECT aid, name, description FROM {uc_attributes}");

Jvis, Thanks for the

Jvis, Thanks for the reply!

That fixes the inital error when enabling the module, but I still get this mess of errors at the top of the view:
http://www.pinkgorillacycles.com/tires/taxonomy/term/29%2030%2031%2032

user warning: Unknown column 'uc_product_options.attr_31' in 'field list' query: SELECT DISTINCT(node.nid) AS nid, node.type AS node_type, node.vid AS node_vid, node.title AS node_title, uc_products.list_price AS uc_products_list_price, uc_products.sell_price AS uc_products_sell_price, uc_product_options.attr_31 AS uc_product_options_attr_31, node.sticky AS node_sticky, node.created AS node_created FROM drup_node node LEFT JOIN drup_uc_products uc_products ON node.vid = uc_products.vid LEFT JOIN drup_uc_product_options uc_product_options ON node.nid = uc_product_options.nid WHERE (node.status <> 0 OR (node.uid = 1 AND 1 <> 0) OR 1 = 1) AND (node.vid IN ( SELECT tn.vid FROM drup_term_node tn LEFT JOIN drup_term_hierarchy th ON th.tid = tn.tid LEFT JOIN drup_term_hierarchy th1 ON th.parent = th1.tid LEFT JOIN drup_term_hierarchy th2 ON th1.parent = th2.tid LEFT JOIN drup_term_hierarchy th3 ON th2.parent = th3.tid LEFT JOIN drup_term_hierarchy th4 ON th3.parent = th4.tid LEFT JOIN drup_term_hierarchy th5 ON th4.parent = th5.tid LEFT JOIN drup_term_hierarchy th6 ON th5.parent = th6.tid LEFT JOIN drup_term_hierarchy th7 ON th6.parent = th7.tid LEFT JOIN drup_term_hierarchy th8 ON th7.parent = th8.tid LEFT JOIN drup_term_hierarchy th9 ON th8.parent = th9.tid LEFT JOIN drup_term_hierarchy th10 ON th9.parent = th10.tid WHERE tn.tid = 32 OR th1.tid = 32 OR th2.tid = 32 OR th3.tid = 32 OR th4.tid = 32 OR th5.tid = 32 OR th6.tid = 32 OR th7.tid = 32 OR th8.tid = 32 OR th9.tid = 32 OR th10.tid = 32 )) GROUP BY nid ORDER BY node_sticky DESC, node_created DESC, uc_products_sell_price ASC in /home2/thepinkg/public_html/sites/all/modules/views/includes/view.inc on line 775.

Advertising helps build a successful ecosystem around Drupal.
nobody click here