6351 |
hartmut |
1 |
<?php
|
|
|
2 |
/**
|
|
|
3 |
* Integration in das Formular für die Statusänderung einer Bestellung
|
|
|
4 |
*/
|
|
|
5 |
?>
|
3915 |
daniel |
6 |
|
6351 |
hartmut |
7 |
<div class="wpsg_form_field wpsg_mod_packagetracking">
|
3915 |
daniel |
8 |
|
6351 |
hartmut |
9 |
<?php
|
|
|
10 |
$tcode = $this->view['wpsg_mod_packagetracking']['oOrder']->wpsg_mod_packagetracking_code;
|
|
|
11 |
$prov = array();
|
7065 |
thomas |
12 |
foreach ($this->view['wpsg_mod_packagetracking']['provider'] as $p) $prov[$p['id']] = $p['name'];
|
6351 |
hartmut |
13 |
|
|
|
14 |
echo wpsg_drawForm_Input('wpsg_mod_packagetracking_code', __('Tracking-ID', 'wpsg'), $tcode);
|
|
|
15 |
echo wpsg_drawForm_Select('wpsg_mod_packagetracking_provider', __('Provider', 'wpsg'), $prov, $this->view['wpsg_mod_packagetracking']['preset'], array());
|
|
|
16 |
?>
|
|
|
17 |
|
|
|
18 |
<?php
|
|
|
19 |
|
|
|
20 |
$temp = $this->view['wpsg_mod_packagetracking']['oOrder']->wpsg_mod_packagetracking_code;
|
|
|
21 |
if (wpsg_isSizedString($temp)) {
|
|
|
22 |
|
|
|
23 |
$link = '<a href="';
|
|
|
24 |
$link .= $this->callMod('wpsg_mod_packagetracking', 'getTrackingURL', array(&$_REQUEST['edit_id']));
|
|
|
25 |
$link .= '">';
|
|
|
26 |
$link .= __('Paketverfolgung', 'wpsg');
|
|
|
27 |
$link .= '</a>';
|
|
|
28 |
|
|
|
29 |
echo wpsg_drawForm_Text('', $link, 'wpsg_trackingurl', array());
|
|
|
30 |
}
|
|
|
31 |
?>
|
3915 |
daniel |
32 |
</div>
|
|
|
33 |
|
6351 |
hartmut |
34 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
35 |
|
3915 |
daniel |
36 |
jQuery('#wpsg_order_view_status_submit').bind('click', function() {
|
|
|
37 |
|
|
|
38 |
if (new Number(jQuery('#wpsg_order_view_status').val()) == 250)
|
|
|
39 |
{
|
|
|
40 |
|
|
|
41 |
/* Wechsel auf "Ware versendet" */
|
|
|
42 |
|
|
|
43 |
if (new Number(jQuery('#wpsg_mod_packagetracking_provider').val()) > 0 && jQuery('#wpsg_mod_packagetracking_code').val().trim() == '')
|
|
|
44 |
{
|
|
|
45 |
|
|
|
46 |
alert('<?php echo __('Wenn sie auf den Status "Ware versendet" wechseln möchten und einen Anbieter für Paketverfolgung ausgewählt haben so muss auch eine Tracking ID hinterlegt werden.', 'wpsg'); ?>');
|
|
|
47 |
|
|
|
48 |
return false;
|
|
|
49 |
|
|
|
50 |
}
|
|
|
51 |
|
|
|
52 |
}
|
|
|
53 |
|
6351 |
hartmut |
54 |
} );
|
|
|
55 |
|
3915 |
daniel |
56 |
/* ]]> */</script>
|