SHARE
TWEET

Untitled

a guest Jun 16th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $view = new view();
  2. $view->name = 'search';
  3. $view->description = '';
  4. $view->tag = 'default';
  5. $view->base_table = 'node';
  6. $view->human_name = 'Search';
  7. $view->core = 7;
  8. $view->api_version = '3.0';
  9. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  10.  
  11. /* Display: Master */
  12. $handler = $view->new_display('default', 'Master', 'default');
  13. $handler->display->display_options['title'] = 'Search';
  14. $handler->display->display_options['use_more_always'] = FALSE;
  15. $handler->display->display_options['access']['type'] = 'perm';
  16. $handler->display->display_options['cache']['type'] = 'none';
  17. $handler->display->display_options['query']['type'] = 'views_query';
  18. $handler->display->display_options['exposed_form']['type'] = 'basic';
  19. $handler->display->display_options['pager']['type'] = 'full';
  20. $handler->display->display_options['pager']['options']['items_per_page'] = '10';
  21. $handler->display->display_options['style_plugin'] = 'default';
  22. $handler->display->display_options['row_plugin'] = 'fields';
  23. /* No results behavior: Global: Unfiltered text */
  24. $handler->display->display_options['empty']['area_text_custom']['id'] = 'area_text_custom';
  25. $handler->display->display_options['empty']['area_text_custom']['table'] = 'views';
  26. $handler->display->display_options['empty']['area_text_custom']['field'] = 'area_text_custom';
  27. $handler->display->display_options['empty']['area_text_custom']['empty'] = TRUE;
  28. $handler->display->display_options['empty']['area_text_custom']['content'] = '<h3>Sorry, no results found. Please modify your search.</h3>';
  29. /* Field: Content: Image */
  30. $handler->display->display_options['fields']['field_image_cache']['id'] = 'field_image_cache';
  31. $handler->display->display_options['fields']['field_image_cache']['table'] = 'field_data_field_image_cache';
  32. $handler->display->display_options['fields']['field_image_cache']['field'] = 'field_image_cache';
  33. $handler->display->display_options['fields']['field_image_cache']['label'] = '';
  34. $handler->display->display_options['fields']['field_image_cache']['element_label_colon'] = FALSE;
  35. $handler->display->display_options['fields']['field_image_cache']['click_sort_column'] = 'fid';
  36. $handler->display->display_options['fields']['field_image_cache']['settings'] = array(
  37.   'image_style' => 'thumbnail',
  38.   'image_link' => 'content',
  39. );
  40. $handler->display->display_options['fields']['field_image_cache']['delta_limit'] = '1';
  41. $handler->display->display_options['fields']['field_image_cache']['delta_offset'] = '0';
  42. /* Field: Content: Title */
  43. $handler->display->display_options['fields']['title']['id'] = 'title';
  44. $handler->display->display_options['fields']['title']['table'] = 'node';
  45. $handler->display->display_options['fields']['title']['field'] = 'title';
  46. $handler->display->display_options['fields']['title']['label'] = '';
  47. $handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
  48. $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
  49. /* Field: Product: SKU */
  50. $handler->display->display_options['fields']['model']['id'] = 'model';
  51. $handler->display->display_options['fields']['model']['table'] = 'uc_products';
  52. $handler->display->display_options['fields']['model']['field'] = 'model';
  53. $handler->display->display_options['fields']['model']['label'] = '';
  54. $handler->display->display_options['fields']['model']['alter']['alter_text'] = TRUE;
  55. $handler->display->display_options['fields']['model']['alter']['text'] = '~ [model] ';
  56. $handler->display->display_options['fields']['model']['element_label_colon'] = FALSE;
  57. $handler->display->display_options['fields']['model']['link_to_node'] = TRUE;
  58. /* Field: Field: Description */
  59. $handler->display->display_options['fields']['field_description']['id'] = 'field_description';
  60. $handler->display->display_options['fields']['field_description']['table'] = 'field_data_field_description';
  61. $handler->display->display_options['fields']['field_description']['field'] = 'field_description';
  62. $handler->display->display_options['fields']['field_description']['label'] = '';
  63. $handler->display->display_options['fields']['field_description']['alter']['alter_text'] = TRUE;
  64. $handler->display->display_options['fields']['field_description']['alter']['text'] = '[field_description]';
  65. $handler->display->display_options['fields']['field_description']['alter']['max_length'] = '150';
  66. $handler->display->display_options['fields']['field_description']['alter']['trim'] = TRUE;
  67. $handler->display->display_options['fields']['field_description']['element_label_colon'] = FALSE;
  68. /* Field: Content: Nid */
  69. $handler->display->display_options['fields']['nid']['id'] = 'nid';
  70. $handler->display->display_options['fields']['nid']['table'] = 'node';
  71. $handler->display->display_options['fields']['nid']['field'] = 'nid';
  72. $handler->display->display_options['fields']['nid']['label'] = '';
  73. $handler->display->display_options['fields']['nid']['exclude'] = TRUE;
  74. $handler->display->display_options['fields']['nid']['element_label_colon'] = FALSE;
  75. /* Field: Global: Custom text */
  76. $handler->display->display_options['fields']['nothing']['id'] = 'nothing';
  77. $handler->display->display_options['fields']['nothing']['table'] = 'views';
  78. $handler->display->display_options['fields']['nothing']['field'] = 'nothing';
  79. $handler->display->display_options['fields']['nothing']['label'] = '';
  80. $handler->display->display_options['fields']['nothing']['alter']['text'] = 'View Details';
  81. $handler->display->display_options['fields']['nothing']['alter']['make_link'] = TRUE;
  82. $handler->display->display_options['fields']['nothing']['alter']['path'] = '/node/[nid]/view';
  83. $handler->display->display_options['fields']['nothing']['element_label_colon'] = FALSE;
  84. /* Field: Content: All taxonomy terms */
  85. $handler->display->display_options['fields']['term_node_tid']['id'] = 'term_node_tid';
  86. $handler->display->display_options['fields']['term_node_tid']['table'] = 'node';
  87. $handler->display->display_options['fields']['term_node_tid']['field'] = 'term_node_tid';
  88. $handler->display->display_options['fields']['term_node_tid']['label'] = '';
  89. $handler->display->display_options['fields']['term_node_tid']['element_label_colon'] = FALSE;
  90. $handler->display->display_options['fields']['term_node_tid']['type'] = 'ul';
  91. $handler->display->display_options['fields']['term_node_tid']['link_to_taxonomy'] = FALSE;
  92. $handler->display->display_options['fields']['term_node_tid']['limit'] = TRUE;
  93. $handler->display->display_options['fields']['term_node_tid']['vocabularies'] = array(
  94.   'product_tags' => 'product_tags',
  95.   'blog_categories' => 0,
  96.   'catalog' => 0,
  97.   'vocabulary_2' => 0,
  98. );
  99. /* Field: Content: Product Tags */
  100. $handler->display->display_options['fields']['field_product_tags']['id'] = 'field_product_tags';
  101. $handler->display->display_options['fields']['field_product_tags']['table'] = 'field_data_field_product_tags';
  102. $handler->display->display_options['fields']['field_product_tags']['field'] = 'field_product_tags';
  103. $handler->display->display_options['fields']['field_product_tags']['label'] = '';
  104. $handler->display->display_options['fields']['field_product_tags']['element_label_colon'] = FALSE;
  105. $handler->display->display_options['fields']['field_product_tags']['type'] = 'taxonomy_term_reference_plain';
  106. $handler->display->display_options['fields']['field_product_tags']['delta_offset'] = '0';
  107. /* Sort criterion: Search: Score */
  108. $handler->display->display_options['sorts']['score']['id'] = 'score';
  109. $handler->display->display_options['sorts']['score']['table'] = 'search_index';
  110. $handler->display->display_options['sorts']['score']['field'] = 'score';
  111. $handler->display->display_options['sorts']['score']['order'] = 'DESC';
  112. /* Filter criterion: Content: Published */
  113. $handler->display->display_options['filters']['status']['id'] = 'status';
  114. $handler->display->display_options['filters']['status']['table'] = 'node';
  115. $handler->display->display_options['filters']['status']['field'] = 'status';
  116. $handler->display->display_options['filters']['status']['value'] = 1;
  117. $handler->display->display_options['filters']['status']['group'] = 1;
  118. $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
  119. /* Filter criterion: Node: Is a product */
  120. $handler->display->display_options['filters']['is_product']['id'] = 'is_product';
  121. $handler->display->display_options['filters']['is_product']['table'] = 'uc_products';
  122. $handler->display->display_options['filters']['is_product']['field'] = 'is_product';
  123. $handler->display->display_options['filters']['is_product']['value'] = '1';
  124. $handler->display->display_options['filters']['is_product']['group'] = 1;
  125. /* Filter criterion: Search: Search Terms */
  126. $handler->display->display_options['filters']['keys']['id'] = 'keys';
  127. $handler->display->display_options['filters']['keys']['table'] = 'search_index';
  128. $handler->display->display_options['filters']['keys']['field'] = 'keys';
  129. $handler->display->display_options['filters']['keys']['group'] = 1;
  130. $handler->display->display_options['filters']['keys']['exposed'] = TRUE;
  131. $handler->display->display_options['filters']['keys']['expose']['operator_id'] = 'keys_op';
  132. $handler->display->display_options['filters']['keys']['expose']['label'] = 'Search Terms';
  133. $handler->display->display_options['filters']['keys']['expose']['operator'] = 'keys_op';
  134. $handler->display->display_options['filters']['keys']['expose']['identifier'] = 'keys';
  135. $handler->display->display_options['filters']['keys']['expose']['remember_roles'] = array(
  136.   2 => '2',
  137.   1 => 0,
  138.   9 => 0,
  139.   8 => 0,
  140.   3 => 0,
  141.   7 => 0,
  142.   6 => 0,
  143.   4 => 0,
  144.   5 => 0,
  145. );
  146.  
  147. /* Display: Page */
  148. $handler = $view->new_display('page', 'Page', 'page');
  149. $handler->display->display_options['path'] = 'product-search';
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top