1068 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Liste der Versandarten
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
|
|
8 |
<?php if (!is_array($this->view['data']) || sizeof($this->view['data']) <= 0) { ?>
|
|
|
9 |
<?php echo __('Bisher keine Versandarten angelegt.', 'wpsg'); ?>
|
|
|
10 |
<?php } else { ?>
|
|
|
11 |
<table class="va_table">
|
|
|
12 |
<colgroup>
|
|
|
13 |
<col class="wpsg_label" />
|
3441 |
daniel |
14 |
<col class="wpsg_value" />
|
1068 |
daniel |
15 |
<col class="wpsg_delcol" />
|
|
|
16 |
</colgroup>
|
|
|
17 |
<?php $i = 0; foreach ($this->view['data'] as $va) { $i ++; ?>
|
|
|
18 |
<tr>
|
1406 |
daniel |
19 |
<td class="wpsg_label"><?php echo __('ID', 'wpsg'); ?>:</td>
|
3441 |
daniel |
20 |
<td class="wpsg_value"><?php echo $va['id']; ?></td>
|
1068 |
daniel |
21 |
<td class="wpsg_delcol">
|
5934 |
hartmut |
22 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-minus-sign" href="#" title="<?php echo __('Versandart löschen', 'wpsg'); ?>" onclick="return wpsg_removeVA(<?php echo $va['id']; ?>);"></a>
|
2946 |
david |
23 |
<?php foreach ($this->view['arVZ'] as $k=>$vz) { $arVzNamen[$k] = $vz['name']; } ?>
|
1068 |
daniel |
24 |
<script type="text/javascript">
|
|
|
25 |
|
|
|
26 |
jQuery(document).ready(function() {
|
|
|
27 |
|
5934 |
hartmut |
28 |
jQuery('#va_<?php echo $va['id']; ?>_name').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
|
1068 |
daniel |
29 |
submitdata: {
|
|
|
30 |
field: 'name',
|
|
|
31 |
va_id: '<?php echo $va['id']; ?>'
|
|
|
32 |
},
|
1598 |
daniel |
33 |
submit : '<?php echo __('Speichern', 'wpsg'); ?>',
|
1068 |
daniel |
34 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
35 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
|
|
36 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
|
|
37 |
});
|
1288 |
daniel |
38 |
|
5934 |
hartmut |
39 |
jQuery('#va_<?php echo $va['id']; ?>_kosten').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
|
1068 |
daniel |
40 |
submitdata: {
|
|
|
41 |
field: 'kosten',
|
|
|
42 |
va_id: '<?php echo $va['id']; ?>'
|
|
|
43 |
},
|
1598 |
daniel |
44 |
submit : '<?php echo __('Speichern', 'wpsg'); ?>',
|
1068 |
daniel |
45 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
46 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
|
|
47 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
1292 |
daniel |
48 |
});
|
1068 |
daniel |
49 |
|
5934 |
hartmut |
50 |
jQuery('#va_<?php echo $va['id']; ?>_hint').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
|
1406 |
daniel |
51 |
submitdata: {
|
|
|
52 |
field: 'hint',
|
|
|
53 |
va_id: '<?php echo $va['id']; ?>'
|
|
|
54 |
},
|
1598 |
daniel |
55 |
submit : '<?php echo __('Speichern', 'wpsg'); ?>',
|
1406 |
daniel |
56 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
57 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
|
|
58 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
|
|
59 |
});
|
|
|
60 |
|
5934 |
hartmut |
61 |
jQuery('#va_<?php echo $va['id']; ?>_typ').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
|
1068 |
daniel |
62 |
submitdata: {
|
|
|
63 |
field: 'typ',
|
|
|
64 |
va_id: '<?php echo $va['id']; ?>'
|
|
|
65 |
},
|
1598 |
daniel |
66 |
submit : '<?php echo __('Speichern', 'wpsg'); ?>',
|
5945 |
hartmut |
67 |
data : <?php echo wpsg_prepare_for_inlineEdit($this->view['arTypen']); ?>,
|
1068 |
daniel |
68 |
type : 'select',
|
|
|
69 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
70 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
|
|
71 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
1406 |
daniel |
72 |
});
|
1068 |
daniel |
73 |
|
5934 |
hartmut |
74 |
jQuery('#va_<?php echo $va['id']; ?>_vz').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
|
1406 |
daniel |
75 |
submitdata: {
|
|
|
76 |
field: 'vz',
|
|
|
77 |
va_id: '<?php echo $va['id']; ?>'
|
|
|
78 |
},
|
1598 |
daniel |
79 |
submit: '<?php echo __('Speichern', 'wpsg'); ?>',
|
5945 |
hartmut |
80 |
data : <?php echo wpsg_prepare_for_inlineEdit($arVzNamen) ?>,
|
1406 |
daniel |
81 |
type : 'select',
|
|
|
82 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
83 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
2946 |
david |
84 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
85 |
callback: function(data)
|
|
|
86 |
{
|
|
|
87 |
location.reload();
|
|
|
88 |
}
|
|
|
89 |
|
1406 |
daniel |
90 |
} );
|
|
|
91 |
|
5934 |
hartmut |
92 |
jQuery('#va_<?php echo $va['id']; ?>_mwst').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
|
1068 |
daniel |
93 |
submitdata: {
|
4057 |
daniel |
94 |
field: 'mwst_key',
|
1068 |
daniel |
95 |
va_id: '<?php echo $va['id']; ?>'
|
|
|
96 |
},
|
1598 |
daniel |
97 |
submit: '<?php echo __('Speichern', 'wpsg'); ?>',
|
5945 |
hartmut |
98 |
data: <?php echo wpsg_prepare_for_inlineEdit(wpsg_tax_groups()); ?>,
|
1068 |
daniel |
99 |
type: 'select',
|
|
|
100 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
101 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
|
|
102 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
1416 |
daniel |
103 |
});
|
|
|
104 |
|
5934 |
hartmut |
105 |
|
1416 |
daniel |
106 |
jQuery('#va_<?php echo $va['id']; ?>_aktiv').bind('change', function() {
|
|
|
107 |
|
|
|
108 |
var value = 0;
|
|
|
109 |
|
|
|
110 |
if (jQuery(this).attr("checked") == "checked") value = 1;
|
|
|
111 |
|
|
|
112 |
jQuery.ajax( {
|
|
|
113 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1',
|
|
|
114 |
data: {
|
|
|
115 |
field: 'aktiv',
|
|
|
116 |
va_id: '<?php echo $va['id']; ?>',
|
|
|
117 |
value: value
|
|
|
118 |
}
|
|
|
119 |
} );
|
|
|
120 |
|
|
|
121 |
} );
|
1068 |
daniel |
122 |
|
|
|
123 |
} );
|
|
|
124 |
|
|
|
125 |
</script>
|
|
|
126 |
|
|
|
127 |
</td>
|
|
|
128 |
</tr>
|
|
|
129 |
<tr>
|
1406 |
daniel |
130 |
<td class="wpsg_label"><?php echo __('Bezeichnung', 'wpsg'); ?>:</td>
|
3441 |
daniel |
131 |
<td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id']; ?>_name"><?php echo wpsg_hspc($va['name']); ?></td>
|
|
|
132 |
<td class="wpsg_delcol">
|
5934 |
hartmut |
133 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name"></a>
|
3441 |
daniel |
134 |
</td>
|
1406 |
daniel |
135 |
</tr>
|
|
|
136 |
<tr>
|
1416 |
daniel |
137 |
<td class="wpsg_label"><label for="va_<?php echo $va['id']; ?>_aktiv"><?php echo __('Aktiv', 'wpsg'); ?>:</label></td>
|
3441 |
daniel |
138 |
<td class="wpsg_value">
|
1416 |
daniel |
139 |
<input type="checkbox" value="1" <?php echo (($va['aktiv'] === '1')?'checked="checked"':''); ?> id="va_<?php echo $va['id']; ?>_aktiv" />
|
3441 |
daniel |
140 |
</td>
|
|
|
141 |
<td class="wpsg_delcol">
|
5934 |
hartmut |
142 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ"></a>
|
1416 |
daniel |
143 |
</td>
|
|
|
144 |
</tr>
|
|
|
145 |
<tr>
|
1406 |
daniel |
146 |
<td class="wpsg_label"><?php echo __('Hinweistext', 'wpsg'); ?>:</td>
|
3441 |
daniel |
147 |
<td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id']; ?>_hint" ><?php echo wpsg_hspc($va['hint']); ?></td>
|
|
|
148 |
<td class="wpsg_delcol">
|
5934 |
hartmut |
149 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint"></a>
|
3441 |
daniel |
150 |
</td>
|
1406 |
daniel |
151 |
</tr>
|
|
|
152 |
<tr>
|
1068 |
daniel |
153 |
<td class="wpsg_label"><?php echo __('Grundlage', 'wpsg'); ?>:</td>
|
3441 |
daniel |
154 |
<td id="va_<?php echo $va['id']; ?>_typ" class="wpsg_value wpsg_editable"><?php echo wpsg_hspc($this->view['arTypen'][$va['typ']]); ?></td>
|
|
|
155 |
<td class="wpsg_delcol">
|
5934 |
hartmut |
156 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_grundlage" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_grundlage"></a>
|
3441 |
daniel |
157 |
</td>
|
1406 |
daniel |
158 |
</tr>
|
|
|
159 |
<tr>
|
|
|
160 |
<td class="wpsg_label"><?php echo __('Versandzone', 'wpsg'); ?>:</td>
|
3441 |
daniel |
161 |
<td id="va_<?php echo $va['id']; ?>_vz" class="wpsg_value wpsg_editable">
|
1406 |
daniel |
162 |
<?php if ($va['vz'] > 0) { ?>
|
2946 |
david |
163 |
<?php echo wpsg_hspc($this->view['arVZ'][$va['vz']]['name']); ?>
|
1406 |
daniel |
164 |
<?php } else { ?>
|
|
|
165 |
<?php echo __('Alle Versandzonen', 'wpsg'); ?>
|
|
|
166 |
<?php } ?>
|
|
|
167 |
</td>
|
3441 |
daniel |
168 |
<td class="wpsg_delcol">
|
5934 |
hartmut |
169 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_versandzone" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_versandzone"></a>
|
3441 |
daniel |
170 |
</td>
|
1068 |
daniel |
171 |
</tr>
|
|
|
172 |
<tr>
|
|
|
173 |
<td class="wpsg_label"><?php echo __('Kostenschlüssel', 'wpsg'); ?>:</td>
|
3441 |
daniel |
174 |
<td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id']; ?>_kosten"><?php echo wpsg_hspc($va['kosten']); ?></td>
|
|
|
175 |
<td class="wpsg_delcol">
|
5934 |
hartmut |
176 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_kostenschluessel" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_kostenschluessel"></a>
|
3441 |
daniel |
177 |
</td>
|
1068 |
daniel |
178 |
</tr>
|
2949 |
daniel |
179 |
<?php if (wpsg_isSizedArray($this->view['arVZ'][$va['vz']]['arPLZ'])) { ?>
|
|
|
180 |
<?php $index = 1; foreach ((array)$this->view['arVZ'][$va['vz']]['arPLZ'] as $plz_key => $plz) { ?>
|
1068 |
daniel |
181 |
<tr>
|
2946 |
david |
182 |
<td class="wpsg_label"><?php echo __('Kostenschlüssel PLZ', 'wpsg'); ?> [ <?php echo $plz ?> ]:</td>
|
3441 |
daniel |
183 |
<td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id'] ?>_plz_<?php echo $index ?>"><?php echo wpsg_hspc($va['kosten_plz'][$plz_key]); ?></td>
|
|
|
184 |
<td class="wpsg_delcol">
|
|
|
185 |
<script type="text/javascript">
|
2949 |
daniel |
186 |
|
3441 |
daniel |
187 |
jQuery(document).ready(function() {
|
|
|
188 |
|
5934 |
hartmut |
189 |
jQuery('#va_<?php echo $va['id']; ?>_plz_<?php echo $index ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
|
3441 |
daniel |
190 |
submitdata: {
|
|
|
191 |
field: 'kosten_plz',
|
|
|
192 |
va_id: '<?php echo $va['id']; ?>',
|
|
|
193 |
key: '<?php echo $index; ?>'
|
|
|
194 |
},
|
|
|
195 |
submit : '<?php echo __('Speichern', 'wpsg'); ?>',
|
|
|
196 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
197 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
|
|
198 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
199 |
callback: function(data)
|
|
|
200 |
{
|
|
|
201 |
//location.reload();
|
|
|
202 |
}
|
|
|
203 |
} );
|
|
|
204 |
|
2949 |
daniel |
205 |
} );
|
3441 |
daniel |
206 |
|
|
|
207 |
</script>
|
|
|
208 |
</td>
|
2946 |
david |
209 |
</tr>
|
|
|
210 |
<?php $index++; } ?>
|
3441 |
daniel |
211 |
<?php } ?>
|
2946 |
david |
212 |
<tr>
|
3441 |
daniel |
213 |
<td class="wpsg_label"><?php echo __('Steuersatz', 'wpsg'); ?>:</td>
|
4057 |
daniel |
214 |
<td id="va_<?php echo $va['id']; ?>_mwst" class="wpsg_value wpsg_editable"><?php
|
|
|
215 |
|
|
|
216 |
$tax_groups = wpsg_tax_groups();
|
|
|
217 |
echo wpsg_hspc($tax_groups[$va['mwst_key']]);
|
|
|
218 |
|
|
|
219 |
?></td>
|
3441 |
daniel |
220 |
<td class="wpsg_delcol">
|
5934 |
hartmut |
221 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst"></a>
|
3441 |
daniel |
222 |
</td>
|
|
|
223 |
</tr>
|
|
|
224 |
<tr>
|
|
|
225 |
<td class="wpsg_label"><?php echo __('Keine MwSt. wenn Land steuerfrei', 'wpsg'); ?>:</td>
|
|
|
226 |
<td class="wpsg_value">
|
1068 |
daniel |
227 |
<input onchange="wpsg_saveVAMwSt(this, <?php echo $va['id']; ?>);" <?php echo (($va['mwst_laender'] == '1')?'checked="checked"':''); ?> type="checkbox" value="1" />
|
3441 |
daniel |
228 |
</td>
|
|
|
229 |
<td class="wpsg_delcol">
|
5934 |
hartmut |
230 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland"></a>
|
3441 |
daniel |
231 |
</td>
|
|
|
232 |
</tr>
|
5934 |
hartmut |
233 |
|
|
|
234 |
|
3915 |
daniel |
235 |
<?php $this->callMods('wpsg_mod_versandarten_listrow', array(&$va)); ?>
|
1068 |
daniel |
236 |
<?php if ($i < sizeof($this->view['data'])) { ?>
|
3441 |
daniel |
237 |
<tr class="wpsg_spacer"><td colspan="3"><hr /></td></tr>
|
1068 |
daniel |
238 |
<?php } ?>
|
|
|
239 |
<?php } ?>
|
|
|
240 |
</table>
|
5439 |
daniel |
241 |
<?php } ?>
|