function uc_product_buffer_form in Ubercart 5
Store a list of nodes for further processing.
See also
uc_product_buffer_form_submit
1 call to uc_product_buffer_form()
- uc_catalog_set_category_form in uc_catalog/
uc_catalog.module - Form to change the category of many nodes at once.
1 string reference to 'uc_product_buffer_form'
- uc_product_administration in uc_product/
uc_product.module - List the subcategories of product administration.
File
- uc_product/
uc_product.module, line 1807 - The product module for Ubercart.
Code
function uc_product_buffer_form($nids) {
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['title'] = array(
'#value' => '<b>' . t('Selected products:') . '</b>',
);
$form['thumbnails'] = array(
'#value' => '<div id="buffer-images">' . t('Use the uBrowser above to select products.') . '</div>',
);
$form['products'] = array(
'#type' => 'hidden',
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Create list'),
);
$form['reset'] = array(
'#type' => 'submit',
'#value' => t('Reset list'),
);
return $form;
}