Code Duplication    Length = 3-3 lines in 13 locations

includes/librairies/eav/attributes.class.php 13 locations

@@ 682-684 (lines=3) @@
679
					$input_def['possible_value'] = 'yes';
680
				}
681
				switch($input_def['label']){
682
					case 'is_requiring_unit':
683
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for using unit with this attribute', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
684
					break;
685
					case 'is_visible_in_front':
686
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for displaying this attribute in shop', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
687
					break;
@@ 685-687 (lines=3) @@
682
					case 'is_requiring_unit':
683
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for using unit with this attribute', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
684
					break;
685
					case 'is_visible_in_front':
686
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for displaying this attribute in shop', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
687
					break;
688
					case 'is_visible_in_front_listing':
689
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for displaying this attribute in product listing in shop', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
690
					break;
@@ 688-690 (lines=3) @@
685
					case 'is_visible_in_front':
686
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for displaying this attribute in shop', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
687
					break;
688
					case 'is_visible_in_front_listing':
689
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for displaying this attribute in product listing in shop', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
690
					break;
691
					case 'is_used_for_sort_by':
692
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for displaying this attribute into sortbar', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
693
					break;
@@ 691-693 (lines=3) @@
688
					case 'is_visible_in_front_listing':
689
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for displaying this attribute in product listing in shop', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
690
					break;
691
					case 'is_used_for_sort_by':
692
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for displaying this attribute into sortbar', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
693
					break;
694
					case 'is_searchable':
695
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for including values of this attribute as search parameter', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
696
					break;
@@ 694-696 (lines=3) @@
691
					case 'is_used_for_sort_by':
692
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for displaying this attribute into sortbar', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
693
					break;
694
					case 'is_searchable':
695
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for including values of this attribute as search parameter', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
696
					break;
697
					case 'is_visible_in_advanced_search':
698
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for using in advanced search form', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
699
					break;
@@ 697-699 (lines=3) @@
694
					case 'is_searchable':
695
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for including values of this attribute as search parameter', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
696
					break;
697
					case 'is_visible_in_advanced_search':
698
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for using in advanced search form', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
699
					break;
700
					case 'frontend_css_class':
701
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Separate with a space each CSS Class', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
702
					break;
@@ 700-702 (lines=3) @@
697
					case 'is_visible_in_advanced_search':
698
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box for using in advanced search form', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
699
					break;
700
					case 'frontend_css_class':
701
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Separate with a space each CSS Class', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
702
					break;
703
					case 'backend_css_class':
704
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Separate with a space each CSS Class', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
705
					break;
@@ 703-705 (lines=3) @@
700
					case 'frontend_css_class':
701
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Separate with a space each CSS Class', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
702
					break;
703
					case 'backend_css_class':
704
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Separate with a space each CSS Class', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
705
					break;
706
					case 'is_historisable':
707
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box if you want to save the different value this attribute, each time it is modified', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
708
					break;
@@ 706-708 (lines=3) @@
703
					case 'backend_css_class':
704
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Separate with a space each CSS Class', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
705
					break;
706
					case 'is_historisable':
707
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box if you want to save the different value this attribute, each time it is modified', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
708
					break;
709
					case 'is_filterable':
710
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box if you want to use this attribute in the filter search', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
711
					break;
@@ 709-711 (lines=3) @@
706
					case 'is_historisable':
707
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box if you want to save the different value this attribute, each time it is modified', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
708
					break;
709
					case 'is_filterable':
710
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box if you want to use this attribute in the filter search', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
711
					break;
712
					case 'is_intrinsic':
713
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box if this attribute is intrinsic for a product', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
714
					break;
@@ 712-714 (lines=3) @@
709
					case 'is_filterable':
710
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box if you want to use this attribute in the filter search', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
711
					break;
712
					case 'is_intrinsic':
713
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box if this attribute is intrinsic for a product', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
714
					break;
715
					case 'is_used_for_variation':
716
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box if this attribute is used for variation. It means that the user would be able to choose a value in frontend', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
717
					break;
@@ 715-717 (lines=3) @@
712
					case 'is_intrinsic':
713
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box if this attribute is intrinsic for a product', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
714
					break;
715
					case 'is_used_for_variation':
716
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box if this attribute is used for variation. It means that the user would be able to choose a value in frontend', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
717
					break;
718
					case 'is_used_in_variation':
719
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box if you want to use this attribute for variation definition', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
720
						if ( !empty($editedItem) && ($editedItem->is_used_for_variation == 'yes') ) {
@@ 724-726 (lines=3) @@
721
							$input_def['option'] = 'disabled="disabled"';
722
						}
723
					break;
724
					case 'is_user_defined':
725
						$input_def['options_label']['custom'] = '<a href="#" title="'.__('Check this box if you want your customer to choose a value for this attribute into frontend product', 'wpshop').'" class="wpshop_infobulle_marker">?</a>';
726
					break;
727
				}
728
729
				$input_def['value'] = $currentFieldValue;