Drupal 7 with bercart 7.x-3.4。 を使用しています)==既存のモジュールまたはビューのカスタマイズのヒントが最も売れています/ベストセラー商品。
これはビューのエクスポートです
$view = new view;
$view->name = 'best_sellers';
$view->description = 'Best Sellers';
$view->tag = 'Best Sellers';
$view->base_table = 'node';
$view->human_name = 'Best Sellers';
$view->core = 7;
$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['access']['type'] = 'none';
$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'] = 'some';
$handler->display->display_options['pager']['options']['items_per_page'] = '5';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: Fields: uc_product_image */
$handler->display->display_options['fields']['entity_id']['id'] = 'entity_id';
$handler->display->display_options['fields']['entity_id']['table'] = 'field_data_uc_product_image';
$handler->display->display_options['fields']['entity_id']['field'] = 'entity_id';
$handler->display->display_options['fields']['entity_id']['label'] = '';
$handler->display->display_options['fields']['entity_id']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['entity_id']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['entity_id']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['entity_id']['alter']['trim'] = 0;
$handler->display->display_options['fields']['entity_id']['alter']['Word_boundary'] = 1;
$handler->display->display_options['fields']['entity_id']['alter']['Ellipsis'] = 1;
$handler->display->display_options['fields']['entity_id']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['entity_id']['alter']['html'] = 0;
$handler->display->display_options['fields']['entity_id']['element_label_colon'] = 1;
$handler->display->display_options['fields']['entity_id']['element_default_classes'] = 1;
$handler->display->display_options['fields']['entity_id']['hide_empty'] = 0;
$handler->display->display_options['fields']['entity_id']['empty_zero'] = 0;
$handler->display->display_options['fields']['entity_id']['click_sort_column'] = 'fid';
$handler->display->display_options['fields']['entity_id']['settings'] = array(
'image_style' => 'thumbnail',
'image_link' => 'content',
);
/* Field: Node: 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']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['Word_boundary'] = 1;
$handler->display->display_options['fields']['title']['alter']['Ellipsis'] = 1;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['element_label_colon'] = 1;
$handler->display->display_options['fields']['title']['element_default_classes'] = 1;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* 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';
$handler->display->display_options['fields']['buyitnowbutton']['label'] = '';
$handler->display->display_options['fields']['buyitnowbutton']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['buyitnowbutton']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['buyitnowbutton']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['buyitnowbutton']['alter']['trim'] = 0;
$handler->display->display_options['fields']['buyitnowbutton']['alter']['Word_boundary'] = 1;
$handler->display->display_options['fields']['buyitnowbutton']['alter']['Ellipsis'] = 1;
$handler->display->display_options['fields']['buyitnowbutton']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['buyitnowbutton']['alter']['html'] = 0;
$handler->display->display_options['fields']['buyitnowbutton']['element_label_colon'] = 1;
$handler->display->display_options['fields']['buyitnowbutton']['element_default_classes'] = 1;
$handler->display->display_options['fields']['buyitnowbutton']['hide_empty'] = 0;
$handler->display->display_options['fields']['buyitnowbutton']['empty_zero'] = 0;
/* 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';
$handler->display->display_options['fields']['sell_price']['label'] = '';
$handler->display->display_options['fields']['sell_price']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['sell_price']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['sell_price']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['sell_price']['alter']['trim'] = 0;
$handler->display->display_options['fields']['sell_price']['alter']['Word_boundary'] = 1;
$handler->display->display_options['fields']['sell_price']['alter']['Ellipsis'] = 1;
$handler->display->display_options['fields']['sell_price']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['sell_price']['alter']['html'] = 0;
$handler->display->display_options['fields']['sell_price']['element_label_colon'] = 1;
$handler->display->display_options['fields']['sell_price']['element_default_classes'] = 1;
$handler->display->display_options['fields']['sell_price']['hide_empty'] = 0;
$handler->display->display_options['fields']['sell_price']['empty_zero'] = 0;
$handler->display->display_options['fields']['sell_price']['set_precision'] = 0;
$handler->display->display_options['fields']['sell_price']['precision'] = '0';
$handler->display->display_options['fields']['sell_price']['format_plural'] = 0;
/* Sort criterion: Order product: Qty */
$handler->display->display_options['sorts']['qty']['id'] = 'qty';
$handler->display->display_options['sorts']['qty']['table'] = 'uc_order_products';
$handler->display->display_options['sorts']['qty']['field'] = 'qty';
$handler->display->display_options['sorts']['qty']['order'] = 'DESC';
/* Filter: 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';
/* Display: Block */
$handler = $view->new_display('block', 'Block', 'best_sellers');
$handler->display->display_options['defaults']['title'] = FALSE;
$handler->display->display_options['title'] = 'Best Sellers';
$handler->display->display_options['defaults']['css_class'] = FALSE;
$handler->display->display_options['css_class'] = 'new-product-block';
$handler->display->display_options['block_description'] = 'Best Sellers';
$translatables['best_sellers'] = array(
t('Defaults'),
t('more'),
t('Apply'),
t('Reset'),
t('Sort By'),
t('Asc'),
t('Desc'),
t('.'),
t(','),
t('Block'),
t('Best Sellers'),
);
方法
Drupalに管理者としてログインします。構造>ビューに移動します。
「コードからビューをインポート」をクリックします
easrcec for ubercart easyrec( http://easyrec.org/ )の製品レコメンダー機能をubercartショップに統合します。 Drupal推奨事項または製品のランキングを表示するためのブロックを提供します。また、ビューと統合することもできます3。
利用可能なブロック
- easyrec:他のユーザーも購入
- easyrec:他のユーザーも閲覧
- easyrec:ユーザーへの推奨事項
- easyrec:最も購入されたアイテム
- easyrec:最も閲覧されたアイテム
ブロックは、モジュール管理インターフェースを使用して完全にスタイル可能です。または、次の描画コールバックのいずれかを使用できます。
- ビュー3のサポート
- Jqueryカルーセル
- 画像一覧
- テキストリスト
- javascriptまたはdrupalフックを使用して独自のものを作成します