function uc_quote_condition_order_shipping_method_form in Ubercart 5
Same name and namespace in other branches
- 6.2 shipping/uc_quote/uc_quote.module \uc_quote_condition_order_shipping_method_form()
File
- shipping/
uc_quote/ uc_quote.module, line 358 - The controller module for fulfillment modules that process physical goods.
Code
function uc_quote_condition_order_shipping_method_form($settings = array()) {
$form = array();
$methods = module_invoke_all('shipping_method');
$enabled = variable_get('uc_quote_enabled', array());
$options = array();
foreach ($methods as $id => $method) {
$options[$id] = $method['title'];
if (!$enabled[$id]) {
$options[$id] .= ' ' . t('(disabled)');
}
}
$form['method'] = array(
'#type' => 'select',
'#title' => t('Shipping quote method'),
'#default_value' => $settings['method'],
'#options' => $options,
);
return $form;
}