Übercart Catalog-weergave aanpassen (Drupal)

Uit De Vliegende Brigade
Ga naar: navigatie, zoeken
Dit is het probleem: De lijst met Bosch-machinespecificaties loopt nog een paar schermen door. Opbouwen van dit scherm duurt te lang. Ongetwijfeld is er iets te doen met caching, maar kan ik niet iets doen met een View en een pager? Ik zou het sowieso interessant vinden om Catalog/taxonomy-pagina's naar m'n hand te kunnen zetten

In de loop der jaren kwam ik regelmatig situaties tegen waarin het handig was als ik Übercart Catalog-pagina's naar m'n hand kon zetten. Helaas is me dat tot op heden nooit gelukt.

Pager inbouwen - Drupal 6

In oktober 2015 kwam weer een situatie voorbij waarbij het handig is als ik de Catalog-weergave kan aanpassen. Zie de afbeelding hiernaast. Dit betreft Drupal 6 Echter: De migratie naar Drupal 7/8 staat voor de deur, dus ik sla het nu over.

Eigen Catalog-View - Drupal 7

Dit is een geëxporteerde Drupal 7 Catalog View [1]:

$view->base_table = 'node';
$view->human_name = '';
$view->core = 0;
$view->api_version = '3.0-alpha1';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['title'] = 'Products';
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['style_plugin'] = 'grid';
$handler->display->display_options['style_options']['fill_single_line'] = 1;
$handler->display->display_options['row_plugin'] = 'fields';
/* 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']['link_to_node'] = 1;
/* Field: Product: Sell price */
$handler->display->display_options['fields']['sell_price']['id'] = 'sell_price';
$handler->display->display_options['fields']['sell_price']['table'] = 'uc_products';
$handler->display->display_options['fields']['sell_price']['field'] = 'sell_price';
/* Field: Product: Buy it now button */
$handler->display->display_options['fields']['buyitnowbutton']['id'] = 'buyitnowbutton';
$handler->display->display_options['fields']['buyitnowbutton']['table'] = 'uc_products';
$handler->display->display_options['fields']['buyitnowbutton']['field'] = 'buyitnowbutton';
/* Field: Broken/missing handler */
$handler->display->display_options['fields']['uc_product_image_fid']['id'] = 'uc_product_image_fid';
$handler->display->display_options['fields']['uc_product_image_fid']['table'] = 'node_data_uc_product_image';
$handler->display->display_options['fields']['uc_product_image_fid']['field'] = 'uc_product_image_fid';
$handler->display->display_options['fields']['uc_product_image_fid']['label'] = '';
/* 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']['expose']['operator'] = FALSE;
/* Filter criterion: Node: Is a product */
$handler->display->display_options['filters']['is_product']['id'] = 'is_product';
$handler->display->display_options['filters']['is_product']['table'] = 'uc_products';
$handler->display->display_options['filters']['is_product']['field'] = 'is_product';
$handler->display->display_options['filters']['is_product']['value'] = 1;
$handler->display->display_options['filters']['is_product']['expose']['operator'] = FALSE;

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

Bronnen

 There are two views involved in building the catalog pages, one for products and one for terms. 
The products view is simply called "Catalog", and it should be easily found on the view 
administration page.
- Dat kon ik helaas niet terugvinden
The most efficient way is to edit the Ubercart catalog view (go to yoursite/admin/build/views). 
Look for the Style option under Basic Settings, click it, and change the setting from Grid or Table 
to List (or theme the view)
en
I'd suggest you to use Views+Advanced Catalog modules. It's really better alternative for "out-of-box" 
Ubercart catalog.