function _uc_quote_extract_default_option in Ubercart 7.3
Same name and namespace in other branches
- 8.4 shipping/uc_quote/uc_quote.module \_uc_quote_extract_default_option()
Gets the default (selected) quote option from the built form element.
Parameters
$quote_form: The quotes form-element.
Return value
The default quote option, or FALSE if none exists.
1 call to _uc_quote_extract_default_option()
- uc_checkout_pane_quotes in shipping/
uc_quote/ uc_quote.module - Shipping quote checkout pane callback.
File
- shipping/
uc_quote/ uc_quote.module, line 885 - The controller module for fulfillment modules that process physical goods.
Code
function _uc_quote_extract_default_option($quote_form) {
if (isset($quote_form['quote_option']['#value'])) {
return $quote_form['quote_option']['#value'];
}
elseif (isset($quote_form['quote_option']['#default_value'])) {
return $quote_form['quote_option']['#default_value'];
}
else {
return FALSE;
}
}