1068 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Liste der Versandarten
|
|
|
5 |
*/
|
7562 |
daniel |
6 |
|
|
|
7 |
$arVzNamen = [];
|
|
|
8 |
|
1068 |
daniel |
9 |
?>
|
|
|
10 |
<?php if (!is_array($this->view['data']) || sizeof($this->view['data']) <= 0) { ?>
|
|
|
11 |
<?php echo __('Bisher keine Versandarten angelegt.', 'wpsg'); ?>
|
|
|
12 |
<?php } else { ?>
|
5997 |
hartmut |
13 |
|
|
|
14 |
<?php foreach ($this->view['arVZ'] as $k=>$vz) { $arVzNamen[$k] = $vz['name']; } ?>
|
|
|
15 |
|
1068 |
daniel |
16 |
<?php $i = 0; foreach ($this->view['data'] as $va) { $i ++; ?>
|
|
|
17 |
|
5997 |
hartmut |
18 |
<hr />
|
|
|
19 |
<div id="wpsg_mod_versandarten_row_<?php echo $va['id']; ?>">
|
1068 |
daniel |
20 |
|
5997 |
hartmut |
21 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
22 |
<?php echo $va['id']; ?>
|
|
|
23 |
<a data-id="<?php echo $va['id']; ?>" class="wpsg_oc_removeLink" href="#" onclick="return wpsg_removeVA(<?php echo $va['id']; ?>);" title="<?php echo __('Versandart löschen', 'wpsg'); ?>">
|
|
|
24 |
<span class="wpsg_glyphicon_right glyphicon glyphicon-trash"></span></a>
|
|
|
25 |
<?php echo wpsg_drawForm_TextEnd(__('ID', 'wpsg')); ?>
|
1288 |
daniel |
26 |
|
5997 |
hartmut |
27 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
28 |
<span id="va_name_<?php echo $va['id']; ?>"><?php echo $va['name']; ?></span>
|
6006 |
hartmut |
29 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" data-wpsg-tip="wpsg_shippay_name" 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>
|
5997 |
hartmut |
30 |
<?php echo wpsg_drawForm_TextEnd(__('Bezeichnung', 'wpsg')); ?>
|
|
|
31 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
32 |
jQuery('#va_name_<?php echo $va['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
|
|
|
33 |
submitdata: {
|
|
|
34 |
field: 'name',
|
|
|
35 |
va_id: '<?php echo $va['id']; ?>'
|
|
|
36 |
}
|
|
|
37 |
});
|
|
|
38 |
/* ]]> */</script>
|
1068 |
daniel |
39 |
|
5997 |
hartmut |
40 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
41 |
<input type="checkbox" value="1" <?php echo (($va['aktiv'] == '1')?'checked="checked"':''); ?> id="va_<?php echo $va['id']; ?>_aktiv" />
|
6006 |
hartmut |
42 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" data-wpsg-tip="wpsg_shippay_activ" 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>
|
5997 |
hartmut |
43 |
<?php echo wpsg_drawForm_TextEnd(__('Aktiv', 'wpsg')); ?>
|
|
|
44 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
45 |
jQuery('#va_<?php echo $va['id']; ?>_aktiv').bind('change', function() {
|
1068 |
daniel |
46 |
|
5997 |
hartmut |
47 |
var value = 0;
|
|
|
48 |
if (jQuery(this).attr("checked") == "checked") value = 1;
|
2946 |
david |
49 |
|
5997 |
hartmut |
50 |
jQuery.ajax( {
|
|
|
51 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1',
|
|
|
52 |
data: {
|
|
|
53 |
field: 'aktiv',
|
|
|
54 |
va_id: '<?php echo $va['id']; ?>',
|
|
|
55 |
value: value
|
|
|
56 |
}
|
|
|
57 |
} );
|
|
|
58 |
} );
|
|
|
59 |
/* ]]> */</script>
|
1406 |
daniel |
60 |
|
5997 |
hartmut |
61 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
62 |
<span id="va_hint_<?php echo $va['id']; ?>"><?php echo wpsg_hspc($va['hint']); ?></span>
|
6006 |
hartmut |
63 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" data-wpsg-tip="wpsg_shippay_hint" 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>
|
5997 |
hartmut |
64 |
<?php echo wpsg_drawForm_TextEnd(__('Hinweistext', 'wpsg')); ?>
|
|
|
65 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
66 |
jQuery('#va_hint_<?php echo $va['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
|
|
|
67 |
submitdata: {
|
|
|
68 |
field: 'hint',
|
|
|
69 |
va_id: '<?php echo $va['id']; ?>'
|
|
|
70 |
}
|
|
|
71 |
});
|
|
|
72 |
/* ]]> */</script>
|
1416 |
daniel |
73 |
|
5997 |
hartmut |
74 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
75 |
<span id="va_typ_<?php echo $va['id']; ?>"><?php
|
|
|
76 |
echo wpsg_hspc($this->view['arTypen'][$va['typ']]);
|
|
|
77 |
?></span>
|
6006 |
hartmut |
78 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" data-wpsg-tip="wpsg_shippay_grundlage" 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>
|
5997 |
hartmut |
79 |
<?php echo wpsg_drawForm_TextEnd(__('Grundlage', 'wpsg')); ?>
|
|
|
80 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
81 |
jQuery('#va_typ_<?php echo $va['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
|
|
|
82 |
type: 'select',
|
|
|
83 |
data: <?php echo wpsg_prepare_for_inlineEdit($this->view['arTypen']); ?>,
|
|
|
84 |
submitdata: {
|
|
|
85 |
field: 'typ',
|
|
|
86 |
va_id: '<?php echo $va['id']; ?>'
|
|
|
87 |
}
|
|
|
88 |
});
|
|
|
89 |
/* ]]> */</script>
|
1416 |
daniel |
90 |
|
5997 |
hartmut |
91 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
7562 |
daniel |
92 |
<span id="va_vz_<?php echo $va['id']; ?>"><?php
|
|
|
93 |
|
|
|
94 |
if ($va['vz'] > 0) {
|
|
|
95 |
|
|
|
96 |
echo wpsg_hspc($this->view['arVZ'][$va['vz']]['name']);
|
|
|
97 |
|
|
|
98 |
} else {
|
|
|
99 |
|
|
|
100 |
echo __('Alle Versandzonen', 'wpsg');
|
|
|
101 |
|
|
|
102 |
}
|
|
|
103 |
|
|
|
104 |
?></span>
|
6006 |
hartmut |
105 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" data-wpsg-tip="wpsg_shippay_versandzone" 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>
|
5997 |
hartmut |
106 |
<?php echo wpsg_drawForm_TextEnd(__('Versandzone', 'wpsg')); ?>
|
|
|
107 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
108 |
jQuery('#va_vz_<?php echo $va['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
|
|
|
109 |
type: 'select',
|
|
|
110 |
data : <?php echo wpsg_prepare_for_inlineEdit($arVzNamen) ?>,
|
|
|
111 |
submitdata: {
|
|
|
112 |
field: 'vz',
|
|
|
113 |
va_id: '<?php echo $va['id']; ?>'
|
|
|
114 |
}
|
|
|
115 |
});
|
|
|
116 |
/* ]]> */</script>
|
1416 |
daniel |
117 |
|
5997 |
hartmut |
118 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
119 |
<span id="va_kosten_<?php echo $va['id']; ?>"><?php echo wpsg_hspc($va['kosten']); ?></span>
|
6006 |
hartmut |
120 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" data-wpsg-tip="wpsg_shippay_kostenschluessel" 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>
|
5997 |
hartmut |
121 |
<?php echo wpsg_drawForm_TextEnd(__('Kostenschlüssel', 'wpsg')); ?>
|
|
|
122 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
123 |
jQuery('#va_kosten_<?php echo $va['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
|
|
|
124 |
submitdata: {
|
|
|
125 |
field: 'kosten',
|
|
|
126 |
va_id: '<?php echo $va['id']; ?>'
|
|
|
127 |
}
|
|
|
128 |
});
|
|
|
129 |
/* ]]> */</script>
|
2949 |
daniel |
130 |
|
5997 |
hartmut |
131 |
<?php if (wpsg_isSizedArray($this->view['arVZ'][$va['vz']]['arPLZ'])) { ?>
|
|
|
132 |
<?php $index = 1; foreach ((array)$this->view['arVZ'][$va['vz']]['arPLZ'] as $plz_key => $plz) { ?>
|
3441 |
daniel |
133 |
|
5997 |
hartmut |
134 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
135 |
<span id="va_plz_<?php echo $va['id'].'_'.$index; ?>"><?php echo wpsg_hspc(wpsg_getStr($va['kosten_plz'][$plz_key])); ?></span>
|
|
|
136 |
<?php echo wpsg_drawForm_TextEnd(__('Kostenschlüssel PLZ', 'wpsg').' ['.$plz.']:'); ?> <?php /*echo $plz*/ ?>
|
|
|
137 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
138 |
jQuery('#va_plz_<?php echo $va['id'].'_'.$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', {
|
|
|
139 |
submitdata: {
|
|
|
140 |
field: 'kosten_plz',
|
|
|
141 |
va_id: '<?php echo $va['id']; ?>',
|
|
|
142 |
key: '<?php echo $index; ?>'
|
|
|
143 |
}
|
|
|
144 |
});
|
|
|
145 |
/* ]]> */</script>
|
|
|
146 |
|
|
|
147 |
<?php $index++; } ?>
|
|
|
148 |
<?php } ?>
|
|
|
149 |
|
|
|
150 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
151 |
<span id="va_mwst_key_<?php echo $va['id']; ?>"><?php
|
|
|
152 |
$tax_groups = wpsg_tax_groups();
|
|
|
153 |
echo wpsg_hspc($tax_groups[$va['mwst_key']]);
|
|
|
154 |
?></span>
|
6006 |
hartmut |
155 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" data-wpsg-tip="wpsg_shippay_mwst" 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>
|
5997 |
hartmut |
156 |
<?php echo wpsg_drawForm_TextEnd(__('Steuersatz', 'wpsg')); ?>
|
|
|
157 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
158 |
jQuery('#va_mwst_key_<?php echo $va['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
|
|
|
159 |
type: 'select',
|
|
|
160 |
data: <?php echo wpsg_prepare_for_inlineEdit(wpsg_tax_groups()); ?>,
|
|
|
161 |
submitdata: {
|
|
|
162 |
field: 'mwst_key',
|
|
|
163 |
va_id: '<?php echo $va['id']; ?>'
|
|
|
164 |
}
|
|
|
165 |
});
|
|
|
166 |
/* ]]> */</script>
|
|
|
167 |
|
|
|
168 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
169 |
<input type="checkbox" value="1" <?php echo (($va['mwst_laender'] == '1')?'checked="checked"':''); ?> id="va_mwst_laender_<?php echo $va['id']; ?>" />
|
6006 |
hartmut |
170 |
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" data-wpsg-tip="wpsg_shippay_mwstland" 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>
|
5997 |
hartmut |
171 |
<?php echo wpsg_drawForm_TextEnd(__('Keine MwSt. wenn Land steuerfrei', 'wpsg')); ?>
|
|
|
172 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
173 |
jQuery('#va_mwst_laender_<?php echo $va['id']; ?>').bind('change', function() {
|
|
|
174 |
|
|
|
175 |
var value = 0;
|
|
|
176 |
if (jQuery(this).attr("checked") == "checked") value = 1;
|
|
|
177 |
|
|
|
178 |
jQuery.ajax( {
|
|
|
179 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1',
|
|
|
180 |
data: {
|
|
|
181 |
field: 'mwst_laender',
|
|
|
182 |
va_id: '<?php echo $va['id']; ?>',
|
|
|
183 |
value: value
|
|
|
184 |
}
|
2949 |
daniel |
185 |
} );
|
5997 |
hartmut |
186 |
} );
|
|
|
187 |
/* ]]> */</script>
|
7065 |
thomas |
188 |
|
|
|
189 |
<?php /* Paketverfolgung */ ?>
|
|
|
190 |
<?php if ($this->hasMod('wpsg_mod_packagetracking') == '1') { ?>
|
|
|
191 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
192 |
<?php $this->callMods('wpsg_mod_versandarten_listrow', [&$va]); ?>
|
|
|
193 |
<?php echo wpsg_drawForm_TextEnd(__('Paketverfolgung', 'wpsg')); ?>
|
|
|
194 |
<?php } ?>
|
|
|
195 |
|
5997 |
hartmut |
196 |
</div>
|
|
|
197 |
<?php if ($i == sizeof($this->view['data'])) { ?><hr /><?php } ?>
|
5934 |
hartmut |
198 |
|
5997 |
hartmut |
199 |
<?php } ?>
|
5439 |
daniel |
200 |
<?php } ?>
|