You are here

function uc_importer_export_buffer_form in Ubercart 5

Form to collect the id numbers of all the store components to be exported.

See also

uc_importer_export_buffer_form_submit

1 string reference to 'uc_importer_export_buffer_form'
uc_importer_export_page in uc_importer/uc_importer.module
Wrapper function to generate a page to hold the export form.

File

uc_importer/uc_importer.module, line 270
XML product importer and exporter.

Code

function uc_importer_export_buffer_form($nids) {
  $form = array();
  $buffer = '';
  foreach ($nids as $nid) {
    $node = node_load($nid);
    $buffer .= theme('imagecache', 'uc_thumbnail', $node->field_image_cache[0]['filepath'], $node->field_image_cache[0]['alt'], $node->field_image_cache[0]['title']);
  }
  $form['#attributes'] = array(
    'class' => 'product-buffer',
  );
  $form['thumbnails'] = array(
    '#type' => 'markup',
    '#value' => '<div id="buffer-images"></div>',
  );
  $form['products'] = array(
    '#type' => 'hidden',
  );
  $form['reset'] = array(
    '#type' => 'submit',
    '#value' => t('Reset'),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Export'),
  );
  return $form;
}