I
I
Ingvar Kuznets2019-05-28 22:05:35
Drupal
Ingvar Kuznets, 2019-05-28 22:05:35

How to export products to CSV?

I export goods through the data export module. I created a view in the form of a table and added the necessary fields. And when you click on the export button, the following appears:
$view = new view();
$view->name = 'export_cart';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'export-cart';
$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['title'] = ' export-cart';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['use_more_text'] = 'more';
$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['exposed_form']['options']['submit_button'] = 'Apply';
$handler->display->display_options['exposed_form']['options']['reset_button_label'] = 'Reset';
$handler->display-> display_options['exposed_form']['options']['exposed_sorts_label'] = 'Sort By';
$handler->display->display_options['exposed_form']['options']['sort_asc_label'] = 'Ascending';
$handler->display->display_options['exposed_form']['options']['sort_desc_label'] = 'Descending';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['style_plugin'] = 'table';
/* 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']['alter' ]['word_boundary'] = FALSE;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
/* Field: Content: Category directory */
$handler->display->display_options['fields']['field_product_category']['id'] = 'field_product_category';
$handler->display->display_options['fields']['field_product_category']['table'] = 'field_data_field_product_category';
$handler->display->display_options['fields']['field_product_category']['field'] = 'field_product_category';
/* Поле: Содержимое: Описание */
$handler->display->display_options['fields']['body']['id'] = 'body';
$handler->display->display_options['fields']['body']['table'] = 'field_data_body';
$handler->display->display_options['fields']['body']['field'] = 'body';
/* Поле: Содержимое: Изображение */
$handler->display->display_options['fields']['uc_product_image']['id'] = 'uc_product_image';
$handler->display->display_options['fields']['uc_product_image']['table'] = 'field_data_uc_product_image';
$handler->display->display_options['fields']['uc_product_image']['field'] = 'uc_product_image';
$handler->display->display_options['fields']['uc_product_image']['click_sort_column'] = 'fid';
$handler->display->display_options['fields']['uc_product_image']['settings'] = array(
'image_style' => '',
'image_link' => '',
);
$handler->display->display_options['fields']['uc_product_image']['delta_offset'] = '0';
/* Sort criteria:
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Filter Criteria: Content: Published status */
$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 Criteria: 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(
'product' => 'product',
);
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'export-cart';
$translatables['export_cart'] = array(
t('Master'),
t('export-cart'),
t('more'),
t('Apply'),
t('Reset'),
t('Sort By'),
t('Ascending'),
t('Descending'),
t('Title'),
t('Directory Category '),
t('Description'),
t('Image'),
t('Page'),
);
How to export products to CSV?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question