@@ -53,40 +53,6 @@ public function __construct()
53
53
Configuration::get ('PS_CUSTOMER_GROUP ' )
54
54
);
55
55
56
- $ this ->fields_list = array (
57
- 'id_group ' => array (
58
- 'title ' => $ this ->l ('ID ' ),
59
- 'align ' => 'center ' ,
60
- 'class ' => 'fixed-width-xs '
61
- ),
62
- 'name ' => array (
63
- 'title ' => $ this ->l ('Group name ' ),
64
- 'filter_key ' => 'b!name '
65
- ),
66
- 'reduction ' => array (
67
- 'title ' => $ this ->l ('Discount (%) ' ),
68
- 'align ' => 'right ' ,
69
- 'type ' => 'percent '
70
- ),
71
- 'nb ' => array (
72
- 'title ' => $ this ->l ('Members ' ),
73
- 'align ' => 'center ' ,
74
- 'havingFilter ' => true ,
75
- ),
76
- 'show_prices ' => array (
77
- 'title ' => $ this ->l ('Show prices ' ),
78
- 'align ' => 'center ' ,
79
- 'type ' => 'bool ' ,
80
- 'callback ' => 'printShowPricesIcon ' ,
81
- 'orderby ' => false
82
- ),
83
- 'date_add ' => array (
84
- 'title ' => $ this ->l ('Creation date ' ),
85
- 'type ' => 'date ' ,
86
- 'align ' => 'right '
87
- )
88
- );
89
-
90
56
$ this ->addRowActionSkipList ('delete ' , $ groups_to_keep );
91
57
92
58
parent ::__construct ();
@@ -179,17 +145,15 @@ public function initProcess()
179
145
$ this ->action = 'change_show_prices_val ' ;
180
146
}
181
147
182
- if (Tools:: getIsset ( ' viewgroup ' )) {
183
- $ this -> list_id = ' customer_group ' ;
148
+ parent :: initProcess ();
149
+ }
184
150
185
- if (isset ($ _POST ['submitReset ' .$ this ->list_id ])) {
186
- $ this ->processResetFilters ();
187
- }
188
- } else {
189
- $ this ->list_id = 'group ' ;
151
+ public function postProcess ()
152
+ {
153
+ if (isset ($ _POST ['submitResetcustomer_group ' ])) {
154
+ $ this ->processResetFilters ('customer_group ' );
190
155
}
191
-
192
- parent ::initProcess ();
156
+ return parent ::postProcess ();
193
157
}
194
158
195
159
public function renderView ()
@@ -598,6 +562,43 @@ public function renderList()
598
562
$ this ->displayInformation ($ unidentified_group_information );
599
563
$ this ->displayInformation ($ guest_group_information );
600
564
$ this ->displayInformation ($ default_group_information );
565
+
566
+ $ this ->fields_list = array (
567
+ 'id_group ' => array (
568
+ 'title ' => $ this ->l ('ID ' ),
569
+ 'align ' => 'center ' ,
570
+ 'class ' => 'fixed-width-xs '
571
+ ),
572
+ 'name ' => array (
573
+ 'title ' => $ this ->l ('Group name ' ),
574
+ 'filter_key ' => 'b!name '
575
+ ),
576
+ 'reduction ' => array (
577
+ 'title ' => $ this ->l ('Discount (%) ' ),
578
+ 'align ' => 'right ' ,
579
+ 'type ' => 'percent '
580
+ ),
581
+ 'nb ' => array (
582
+ 'title ' => $ this ->l ('Members ' ),
583
+ 'align ' => 'center ' ,
584
+ 'havingFilter ' => true ,
585
+ ),
586
+ 'show_prices ' => array (
587
+ 'title ' => $ this ->l ('Show prices ' ),
588
+ 'align ' => 'center ' ,
589
+ 'type ' => 'bool ' ,
590
+ 'callback ' => 'printShowPricesIcon ' ,
591
+ 'orderby ' => false
592
+ ),
593
+ 'date_add ' => array (
594
+ 'title ' => $ this ->l ('Creation date ' ),
595
+ 'type ' => 'date ' ,
596
+ 'align ' => 'right '
597
+ )
598
+ );
599
+
600
+ $ this ->processFilter ();
601
+
601
602
return parent ::renderList ();
602
603
}
603
604
0 commit comments