You are here

function uc_cart_condition_product_class_form in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_cart/uc_cart.ca.inc \uc_cart_condition_product_class_form()

File

uc_cart/uc_cart_workflow.inc, line 73
This file contains the Workflow-ng hooks and functions necessary to make the cart related entity, conditions, events, and actions work.

Code

function uc_cart_condition_product_class_form($settings = array()) {
  $options = array();
  $types = module_invoke_all('node_info');
  $product_types = module_invoke_all('product_types');
  foreach ($product_types as $id) {
    $options[$id] = $types[$id]['name'];
  }
  $form['class'] = array(
    '#type' => 'select',
    '#title' => t('Product class'),
    '#options' => $options,
    '#default_value' => $settings['class'],
  );
  return $form;
}