@@ 2391-2394 (lines=4) @@ | ||
2388 | $ouput['more_input'] = ''; |
|
2389 | ||
2390 | $attribute_default_value = $attribute->default_value; |
|
2391 | if ( !empty($attribute->default_value) && ($attribute->default_value == serialize(false) || wpshop_tools::is_serialized( $attribute->default_value ) ) ) { |
|
2392 | $tmp_default_value = unserialize($attribute->default_value); |
|
2393 | $attribute_default_value = !empty($tmp_default_value["default_value"]) ? $tmp_default_value["default_value"] : null; |
|
2394 | } |
|
2395 | ||
2396 | if ( $attribute->data_type_to_use == 'custom') { |
|
2397 | $query = $wpdb->prepare("SELECT id, label, value, '' as name FROM " . WPSHOP_DBT_ATTRIBUTE_VALUES_OPTIONS . " WHERE attribute_id = %d AND status = 'valid' ORDER BY position", $attribute->id); |
|
@@ 2441-2445 (lines=5) @@ | ||
2438 | /* Add a default value to the combobox list */ |
|
2439 | $default_value_is_serial = false; |
|
2440 | $attribute_list_first_element = $attribute->default_value; |
|
2441 | if ( !empty($attribute->default_value) && ($attribute->default_value == serialize(false) || wpshop_tools::is_serialized( $attribute->default_value ) ) ) { |
|
2442 | $default_value_is_serial = true; |
|
2443 | $tmp_default_value = unserialize($attribute->default_value); |
|
2444 | $attribute_list_first_element = $tmp_default_value["field_options"]["label_for_first_item"]; |
|
2445 | } |
|
2446 | //if ( !in_array($attribute->frontend_input, array('radio', 'checkbox')) || ($attribute_list_first_element != 'none') ) $ouput['possible_value'][] = ($default_value_is_serial && !empty($attribute_list_first_element)) ? $attribute_list_first_element : __('Choose a value', 'wpshop'); |
|
2447 | foreach ( $attribute_select_options_list as $option_key => $option_value ) { |
|
2448 | $ouput['possible_value'][$option_key] = stripslashes($option_value); |