SHARE
TWEET

View of Products that you have not Purchased

MrJoshMiller Mar 6th, 2013 232 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $view = new view();
  2. $view->name = 'quick_catalog';
  3. $view->description = '';
  4. $view->tag = 'default';
  5. $view->base_table = 'commerce_line_item';
  6. $view->human_name = 'quick catalog';
  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['use_more_always'] = FALSE;
  14. $handler->display->display_options['group_by'] = TRUE;
  15. $handler->display->display_options['access']['type'] = 'none';
  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. /* Relationship: Commerce Line Item: Order ID */
  24. $handler->display->display_options['relationships']['order_id']['id'] = 'order_id';
  25. $handler->display->display_options['relationships']['order_id']['table'] = 'commerce_line_item';
  26. $handler->display->display_options['relationships']['order_id']['field'] = 'order_id';
  27. /* Relationship: Commerce Line item: Referenced product */
  28. $handler->display->display_options['relationships']['commerce_product_product_id']['id'] = 'commerce_product_product_id';
  29. $handler->display->display_options['relationships']['commerce_product_product_id']['table'] = 'field_data_commerce_product';
  30. $handler->display->display_options['relationships']['commerce_product_product_id']['field'] = 'commerce_product_product_id';
  31. /* Relationship: Commerce Order: Owner */
  32. $handler->display->display_options['relationships']['uid']['id'] = 'uid';
  33. $handler->display->display_options['relationships']['uid']['table'] = 'commerce_order';
  34. $handler->display->display_options['relationships']['uid']['field'] = 'uid';
  35. $handler->display->display_options['relationships']['uid']['relationship'] = 'order_id';
  36. /* Field: Commerce Product: Product ID */
  37. $handler->display->display_options['fields']['product_id']['id'] = 'product_id';
  38. $handler->display->display_options['fields']['product_id']['table'] = 'commerce_product';
  39. $handler->display->display_options['fields']['product_id']['field'] = 'product_id';
  40. $handler->display->display_options['fields']['product_id']['relationship'] = 'commerce_product_product_id';
  41. $handler->display->display_options['fields']['product_id']['link_to_product'] = 0;
  42. /* Field: COUNT(Commerce Line Item: Line item ID) */
  43. $handler->display->display_options['fields']['line_item_id']['id'] = 'line_item_id';
  44. $handler->display->display_options['fields']['line_item_id']['table'] = 'commerce_line_item';
  45. $handler->display->display_options['fields']['line_item_id']['field'] = 'line_item_id';
  46. $handler->display->display_options['fields']['line_item_id']['group_type'] = 'count';
  47. $handler->display->display_options['fields']['line_item_id']['label'] = 'Times purchased';
  48. /* Field: User: Name */
  49. $handler->display->display_options['fields']['name']['id'] = 'name';
  50. $handler->display->display_options['fields']['name']['table'] = 'users';
  51. $handler->display->display_options['fields']['name']['field'] = 'name';
  52. $handler->display->display_options['fields']['name']['relationship'] = 'uid';
  53. $handler->display->display_options['fields']['name']['label'] = 'Purchaser';
  54. /* Filter criterion: User: Current */
  55. $handler->display->display_options['filters']['uid_current']['id'] = 'uid_current';
  56. $handler->display->display_options['filters']['uid_current']['table'] = 'users';
  57. $handler->display->display_options['filters']['uid_current']['field'] = 'uid_current';
  58. $handler->display->display_options['filters']['uid_current']['relationship'] = 'uid';
  59. $handler->display->display_options['filters']['uid_current']['value'] = '0';
  60.  
  61. /* Display: Page */
  62. $handler = $view->new_display('page', 'Page', 'page');
  63. $handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
  64. $handler->display->display_options['path'] = 'quick-catalog3';
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top