diff --git a/modules/cart/commerce_cart.module b/modules/cart/commerce_cart.module index 5bdd8d4..cf6620c 100644 --- a/modules/cart/commerce_cart.module +++ b/modules/cart/commerce_cart.module @@ -1651,7 +1651,16 @@ function commerce_cart_add_to_cart_form($form, &$form_state, $line_item, $show_q // Get the options properties from the options module and store the // options for the instance in select list format in the array of // qualifying fields. - $properties = _options_properties('select', FALSE, TRUE, TRUE); + // Modules can define widget types for the attribute field that are + // unknown to the options module. If this is the case, default to + // the select widget restrictions. + if (in_array($instance['widget']['type'], array('options_select', 'options_buttons', 'options_onoff'))) { + $widget_type = str_replace('options_', '', $instance['widget']['type']); + } + else { + $widget_type = 'select'; + } + $properties = _options_properties($widget_type, FALSE, TRUE, TRUE); // Try to fetch localized names. $allowed_values = NULL;