1067 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Liste der Versandzonen
|
|
|
5 |
*/
|
|
|
6 |
|
8132 |
daniel |
7 |
$arShipping = $this->arShippingAll;
|
|
|
8 |
|
|
|
9 |
$arShippingPreset = [
|
|
|
10 |
'0' => __('Kundenvoreinstellung', 'wpsg'),
|
|
|
11 |
'-1' => __('günstigste Versandart', 'wpsg'),
|
|
|
12 |
];
|
|
|
13 |
|
|
|
14 |
foreach ($arShipping as $s_key => $s) {
|
|
|
15 |
|
|
|
16 |
$arShippingPreset[$s_key] = $s['name'];
|
|
|
17 |
|
|
|
18 |
}
|
|
|
19 |
|
1067 |
daniel |
20 |
?>
|
|
|
21 |
<?php if (!is_array($this->view['data']) || sizeof($this->view['data']) <= 0) { ?>
|
|
|
22 |
<?php echo __('Bisher keine Versandzonen hinterlegt.', 'wpsg'); ?>
|
|
|
23 |
<?php } else { ?>
|
5532 |
daniel |
24 |
<table class="table wpsg_table_vz">
|
6306 |
hartmut |
25 |
<thead>
|
1067 |
daniel |
26 |
<tr>
|
3506 |
daniel |
27 |
<th class="col_name"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
|
|
|
28 |
<th class="col_innereu"><?php echo __('Inner- gemeinschaftlich', 'wpsg'); ?></th>
|
8132 |
daniel |
29 |
<th class="col_shippingpreset"><?php echo __('Standardversandart', 'wpsg'); ?></th>
|
1067 |
daniel |
30 |
<th class="col_aktion"></th>
|
|
|
31 |
</tr>
|
6306 |
hartmut |
32 |
</thead>
|
|
|
33 |
<tbody>
|
1067 |
daniel |
34 |
<?php foreach ($this->view['data'] as $vz) { ?>
|
|
|
35 |
<tr>
|
2946 |
david |
36 |
<td class="wpsg_editable col_name">
|
3506 |
daniel |
37 |
<span id="vz_<?php echo $vz['id']; ?>_name" ><?php echo wpsg_hspc($vz['name']); ?></span>
|
|
|
38 |
<br />
|
5532 |
daniel |
39 |
<div id="vz_<?php echo $vz['id']; ?>_plz" style="display:none" class="wpsg_plz_div">
|
|
|
40 |
<textarea><?php echo wpsg_hspc($vz['param']); ?></textarea>
|
|
|
41 |
<input type="submit" class="button" name="wpsg_mod_vz_submitsave" value="<?php echo __('Speichern', 'wpsg'); ?>" onclick="return wpsg_savePLZ(<?php echo $vz['id']; ?>);" />
|
3506 |
daniel |
42 |
</div>
|
2946 |
david |
43 |
</td>
|
3506 |
daniel |
44 |
<td class="col_innereu">
|
7760 |
daniel |
45 |
<input class="wpsg_innereu"
|
|
|
46 |
data-url="<?php echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', 'wpsg-admin-versandzonen-inline_edit-'.$vz['id'])); ?>"
|
|
|
47 |
<?php echo (($vz['innereu'] == '1')?'checked="checked"':''); ?> type="checkbox" value="1" name="innereu_<?php echo $vz['id']; ?>" id="innereu_<?php echo $vz['id']; ?>" />
|
3506 |
daniel |
48 |
</td>
|
8132 |
daniel |
49 |
<td class="col_shippingpreset">
|
|
|
50 |
<span id="vz_<?php echo $vz['id']; ?>_shippingpreset"><?php echo wpsg_hspc(wpsg_getStr($arShippingPreset[$vz['shippingpreset']], __('Kundenvoreinstellung', 'wpsg'))); ?></span>
|
|
|
51 |
<script>
|
|
|
52 |
|
|
|
53 |
jQuery('#vz_<?php echo $vz['id']; ?>_shippingpreset').wpsg_editable('<?php
|
|
|
54 |
|
|
|
55 |
echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', 'wpsg-admin-versandzonen-inline_edit-'.$vz['id']));
|
|
|
56 |
|
|
|
57 |
?>', {
|
|
|
58 |
submitdata: {
|
|
|
59 |
field: 'shippingpreset',
|
|
|
60 |
vz_id: '<?php echo $vz['id']; ?>'
|
|
|
61 |
},
|
|
|
62 |
data: <?php echo wpsg_prepare_for_inlineEdit($arShippingPreset); ?>,
|
|
|
63 |
type: 'select',
|
|
|
64 |
submit: '<?php echo __('Speichern', 'wpsg'); ?>',
|
|
|
65 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
66 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
|
|
67 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
|
|
68 |
});
|
|
|
69 |
|
|
|
70 |
</script>
|
|
|
71 |
</td>
|
1067 |
daniel |
72 |
<td class="col_aktion">
|
5532 |
daniel |
73 |
|
|
|
74 |
<a class="wpsg_icon_plzedit" href="#" title="<?php echo __('Versandzonen PLZ bearbeiten', 'wpsg'); ?>" onclick="return wpsg_editPLZ(<?php echo $vz['id']; ?>);">[ PLZ ]</a>
|
|
|
75 |
<a class="glyphicon glyphicon-trash" href="#" title="<?php echo __('Versandzone löschen', 'wpsg'); ?>" onclick="return wpsg_removeVZ(<?php echo $vz['id']; ?>);"></a>
|
2952 |
david |
76 |
|
7560 |
daniel |
77 |
<script>
|
1068 |
daniel |
78 |
|
7560 |
daniel |
79 |
jQuery('#vz_<?php echo $vz['id']; ?>_name').wpsg_editable('<?php
|
|
|
80 |
|
|
|
81 |
echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', 'wpsg-admin-versandzonen-inline_edit-'.$vz['id']));
|
|
|
82 |
|
|
|
83 |
?>', {
|
1068 |
daniel |
84 |
submitdata: {
|
1067 |
daniel |
85 |
field: 'name',
|
|
|
86 |
vz_id: '<?php echo $vz['id']; ?>'
|
1068 |
daniel |
87 |
},
|
7560 |
daniel |
88 |
submit: '<?php echo __('Speichern', 'wpsg'); ?>',
|
1068 |
daniel |
89 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
90 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
1067 |
daniel |
91 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
|
|
92 |
});
|
1068 |
daniel |
93 |
|
7560 |
daniel |
94 |
jQuery('#vz_<?php echo $vz['id']; ?>_value').wpsg_editable('<?php
|
|
|
95 |
|
|
|
96 |
echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', 'wpsg-admin-versandzonen-inline_edit-'.$vz['id']));
|
|
|
97 |
|
|
|
98 |
?>', {
|
1068 |
daniel |
99 |
submitdata: {
|
1067 |
daniel |
100 |
field: 'value',
|
|
|
101 |
vz_id: '<?php echo $vz['id']; ?>'
|
1068 |
daniel |
102 |
},
|
7560 |
daniel |
103 |
submit: '<?php echo __('Speichern', 'wpsg'); ?>',
|
1068 |
daniel |
104 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
105 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
1067 |
daniel |
106 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
|
|
107 |
});
|
1068 |
daniel |
108 |
|
7760 |
daniel |
109 |
</script>
|
1067 |
daniel |
110 |
</td>
|
|
|
111 |
</tr>
|
|
|
112 |
<?php } ?>
|
6306 |
hartmut |
113 |
</tbody>
|
1067 |
daniel |
114 |
</table>
|
3506 |
daniel |
115 |
|
|
|
116 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
117 |
|
|
|
118 |
jQuery(document).ready(function() {
|
|
|
119 |
|
|
|
120 |
jQuery('.wpsg_innereu').bind('click', function() {
|
|
|
121 |
|
|
|
122 |
var checked = "0"; if (jQuery(this).prop("checked")) checked = "1";
|
|
|
123 |
|
|
|
124 |
jQuery.ajax( {
|
7760 |
daniel |
125 |
url: jQuery(this).data('url'),
|
3506 |
daniel |
126 |
data: {
|
|
|
127 |
field: 'innereu',
|
|
|
128 |
vz_id: jQuery(this).attr("id").substr(8),
|
|
|
129 |
value: checked
|
|
|
130 |
}
|
|
|
131 |
} );
|
|
|
132 |
|
|
|
133 |
} );
|
|
|
134 |
|
|
|
135 |
} );
|
|
|
136 |
|
|
|
137 |
/* ]]> */</script>
|
|
|
138 |
|
1067 |
daniel |
139 |
<?php } ?>
|