Subversion Repositories wpShopGermany4

Rev

Rev 8388 | Details | Compare with Previous | Last modification | View Log | RSS feed

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