1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
<?php
/**
* Template für die Eingabe der Zahlungs- und Versandinformationen
*/
//wpsg_debug($this->view['basket']['checkout']);
//die();
?>
<div class="wpsg wpsg_checkout2">
<?php echo $this->writeFrontendMessage(); ?>
<?php $GLOBALS['step'] = 3; $this->render(WPSG_PATH_VIEW.'/warenkorb/progress.phtml'); ?>
<form id="wpsg_checkout_form" method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>">
<input type="hidden" value="1" name="wpsg[checkout][send]" />
<div class="wpsg_shipping">
<h2><?php echo __('Versandarten', 'wpsg'); ?></h2>
<div class="shippay_wrap">
<?php foreach ($this->view['arShipping'] as $s) { ?>
<div class="shippay_item_wrap">
<input <?php echo (($this->view['basket']['checkout']['shipping'] == $s['id'] || sizeof($this->view['arShipping']) == 1)?'checked="checked"':''); ?> type="radio" value="<?php echo $s['id']; ?>" name="wpsg[checkout][shipping]" id="shipping_<?php echo $s['id']; ?>" />
<?php if (wpsg_isSizedString($s['logo'])) { ?>
<img class="wpsg_payship_logo" src="<?php echo $s['logo']; ?>" alt="<?php echo $s['name']; ?>" />
<?php } else { ?>
<div class="wpsg_payship_name"><?php echo __($s['name'], 'wpsg'); ?></div>
<?php } ?>
<?php if ((isset($s['hint']) && trim($s['hint']) != '') || wpsg_getFloat($s['price']) > 0) { ?>
<div id="shipping_<?php echo $s['id']; ?>_hint" class="shippay_hint">
<?php if ($s['price'] > 0) { ?>
<?php echo __('Gebühr', 'wpsg'); ?>: <?php echo wpsg_ff($s['price'], $this->get_option('wpsg_currency')); ?><br />
<?php } ?>
<?php echo $this->replaceUniversalPlatzhalter(__($s['hint'], 'wpsg')); ?>
</div>
<?php } ?>
<div class="shippay_checkmark"></div>
</div>
<?php } ?>
</div>
</div>
<br /><br />
<?php if ($this->callMods('checkout_handlePayment') === true) { ?>
<?php if (!$this->hasMod('wpsg_mod_crefopay')) { ?>
<div class="wpsg_payment">
<h2><?php echo __('Zahlungsarten', 'wpsg'); ?></h2>
<div class="shippay_wrap">
<?php foreach ($this->view['arPayment'] as $p) { ?>
<div class="shippay_item_wrap">
<input <?php echo (($this->view['basket']['checkout']['payment'] == $p['id'] || sizeof($this->view['arPayment']) == 1)?'checked="checked"':''); ?> type="radio" value="<?php echo $p['id']; ?>" name="wpsg[checkout][payment]" id="payment_<?php echo $p['id']; ?>" />
<div class="wpsg_payship_name"><?php echo __($p['name'], 'wpsg'); ?></div>
<?php if (wpsg_isSizedString($p['logo'])) { ?>
<img class="wpsg_payship_logo" src="<?php echo $p['logo']; ?>" alt="<?php echo $p['name']; ?>" />
<?php } ?>
<?php if ((isset($p['hint']) && trim($p['hint']) != '') || wpsg_getFloat($p['price']) > 0) { ?>
<div id="payment_<?php echo $p['id']; ?>_hint" class="shippay_hint">
<?php if ($p['price'] > 0) { ?>
<?php echo __('Gebühr', 'wpsg'); ?>: <?php echo wpsg_ff($p['price'], $this->get_option('wpsg_currency')); ?><br />
<?php } ?>
<?php echo $this->replaceUniversalPlatzhalter(__($p['hint'], 'wpsg')); ?>
</div>
<?php } ?>
<div class="shippay_checkmark"></div>
</div>
<?php } ?>
</div>
</div>
<?php } ?>
<?php } ?>
<div class="wpsg_clear"></div>
<br />
<?php $this->callMods('checkout2_inner_prebutton', array(&$this->view)); ?>
<input type="submit" id="wpsg_checkout2button" class="wpsg_button wpsg_overviewbutton" value="<?php echo __('weiter', 'wpsg'); ?>" name="wpsg_checkout2" />
<input type="submit" class="wpsg_button wpsg_checkoutbutton" value="<?php echo __('zurück', 'wpsg'); ?>" name="wpsg_redirect_checkout" />
<div class="wpsg_clear"></div>
</form>
<script type="text/javascript">/* <![CDATA[ */
function wpsg_setShipPay(jqElement)
{
jqElement.parents('.shippay_wrap').find('.shippay_item_wrap').removeClass('shippay_active');
jqElement.addClass('shippay_active');
jqElement.find('input').prop('checked', true);
return true;
}
jQuery(document).ready(function() {
jQuery('.shippay_wrap .shippay_item_wrap').bind('click', function() {
wpsg_setShipPay(jQuery(this));
jQuery.ajax( {
'url': wpsg_ajax.ajaxurl,
'method': 'get',
'data': {
'wpsg[action]': 'updateCheckout',
'wpsg_form_data': jQuery('#wpsg_checkout_form').serialize()
},
'async': true,
'success': function(data) { }
} );
} );
jQuery('.shippay_wrap .shippay_item_wrap').each(function() {
if (jQuery(this).find('input[type="radio"]').prop('checked')) wpsg_setShipPay(jQuery(this));
} );
} );
/* ]]> */</script>
</div>
|