Tags/topics: 
1
Answers
Vote up!
0
Vote down!

Views Taxonomy Page does not show Products tagged with child-term?

Hi,

This post is an duplicate of:

https://drupal.org/node/2286179

per suggestion of Ryan, I repost it here with my views export attached as follows.

Thanks in advance.

=========================================

$view = new view();
$view->name = 'products_by_term';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Products by Term';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'node';
/* Relationship: Content: Referenced products */
$handler->display->display_options['relationships']['field_general_product_product_id']['id'] = 'field_general_product_product_id';
$handler->display->display_options['relationships']['field_general_product_product_id']['table'] = 'field_data_field_general_product';
$handler->display->display_options['relationships']['field_general_product_product_id']['field'] = 'field_general_product_product_id';
$handler->display->display_options['relationships']['field_general_product_product_id']['required'] = TRUE;
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
/* Contextual filter: Commerce Product: Product Catalog (field_product_catalog) */
$handler->display->display_options['arguments']['field_product_catalog_tid']['id'] = 'field_product_catalog_tid';
$handler->display->display_options['arguments']['field_product_catalog_tid']['table'] = 'field_data_field_product_catalog';
$handler->display->display_options['arguments']['field_product_catalog_tid']['field'] = 'field_product_catalog_tid';
$handler->display->display_options['arguments']['field_product_catalog_tid']['relationship'] = 'field_general_product_product_id';
$handler->display->display_options['arguments']['field_product_catalog_tid']['default_action'] = 'default';
$handler->display->display_options['arguments']['field_product_catalog_tid']['default_argument_type'] = 'taxonomy_tid';
$handler->display->display_options['arguments']['field_product_catalog_tid']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['field_product_catalog_tid']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['field_product_catalog_tid']['summary_options']['items_per_page'] = '25';
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'general_product_display' => 'general_product_display',
);
/* Filter criterion: Content: general_product (field_general_product:delta) */
$handler->display->display_options['filters']['delta']['id'] = 'delta';
$handler->display->display_options['filters']['delta']['table'] = 'field_data_field_general_product';
$handler->display->display_options['filters']['delta']['field'] = 'delta';
$handler->display->display_options['filters']['delta']['value']['value'] = '0';

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'taxonomy/term/%';

Asked by: foredoc
on June 14, 2014

1 Answer

Vote up!
1
Vote down!

I have been struggling with this for days without success, and have to launch Plan B, which simply utilizes hook_views_query_alter to serve my purpose.

However, I am still very interested to know whether this can be done through views UI.

Answer by: foredoc
Posted: Jun 19, 2014