function wps_tools_mass_action_load_possible_options_for_variations_attributes() { $output = ''; $attribute = wpshop_attributes::getElement($_POST['attribute_id'], "'valid'"); /** Define new default value */ $attribute_possible_values_output = wpshop_attributes::get_select_output($attribute, array()); $attribute_possible_values_output['possible_value']['no_changes'] = __('No changes', 'wpshop'); $attribute_possible_values_output['possible_value']['none'] = __('No default value', 'wpshop'); ksort($attribute_possible_values_output['possible_value']); $input_def['possible_value'] = $attribute_possible_values_output['possible_value']; $input_def['type'] = 'select'; $input_def['valueToPut'] = 'index'; $input_def['name'] = 'wps_update_att_for_variation_options_values'; $input_def['id'] = 'wps_update_att_for_variation_options_values'; $output .= __('Default value to affect for this attribute to all products', 'wpshop') . ' ' . wpshop_form::check_input_type($input_def); /** Define if attribute is required for adding product to cart */ $input_def = array(); $input_def['possible_value'] = array('no_changes' => __('No changes', 'wpshop'), 'no' => __('No', 'wpshop'), 'yes' => __('Yes', 'wpshop')); $input_def['type'] = 'select'; $input_def['valueToPut'] = 'index'; $input_def['name'] = 'wps_update_att_for_variation_required_state'; $input_def['id'] = 'wps_update_att_for_variation_required_state'; $output .= '<br/>' . __('Put this attribute as required for all products', 'wpshop') . ' ' . wpshop_form::check_input_type($input_def); $input_def = array(); $input_def['possible_value'] = array('no_changes' => __('No changes', 'wpshop'), 'no' => __('No', 'wpshop'), 'yes' => __('Yes', 'wpshop')); $input_def['type'] = 'select'; $input_def['valueToPut'] = 'index'; $input_def['name'] = 'wps_update_att_for_variation[price_display][text_from]'; $input_def['id'] = 'wps_update_att_for_variation_price_display_text_from'; $output .= '<br/>' . __('Display "Price from" text before price for all products', 'wpshop') . ' ' . wpshop_form::check_input_type($input_def); $input_def = array(); $input_def['possible_value'] = array('no_changes' => __('No changes', 'wpshop'), 'no' => __('No', 'wpshop'), 'yes' => __('Yes', 'wpshop')); $input_def['type'] = 'select'; $input_def['valueToPut'] = 'index'; $input_def['name'] = 'wps_update_att_for_variation[price_display][lower_price]'; $input_def['id'] = 'wps_update_att_for_variation_price_display_lower_price'; $output .= '<br/>' . __('Display lower price for all products', 'wpshop') . ' ' . wpshop_form::check_input_type($input_def); $input_def = array(); $input_def['possible_value'] = array('no_changes' => __('No changes', 'wpshop'), 'replacement' => __('Replace product price with option price', 'wpshop'), 'addition' => __('Add option price to product price', 'wpshop')); $input_def['type'] = 'select'; $input_def['valueToPut'] = 'index'; $input_def['name'] = 'wps_update_att_for_variation[price_behaviour]'; $input_def['id'] = 'wps_update_att_for_variation_price_behaviour'; $output .= '<br/>' . __('Price calculation behaviour', 'wpshop') . ' ' . wpshop_form::check_input_type($input_def); $input_def = array(); $input_def['possible_value'] = array('no_changes' => __('No changes', 'wpshop'), 'single' => __('Priority to single options', 'wpshop'), 'combined' => __('Priority to combined options', 'wpshop')); $input_def['type'] = 'select'; $input_def['valueToPut'] = 'index'; $input_def['name'] = 'wps_update_att_for_variation[priority]'; $input_def['id'] = 'wps_update_att_for_variation_priority'; $output .= '<br/>' . __('Choose priority combination for calculating options', 'wpshop') . ' ' . wpshop_form::check_input_type($input_def); echo $output; die; }