Subversion Repositories wpShopGermany4

Rev

Rev 6803 | Rev 7150 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2782 daniel 1
<?php
2
 
3
	/**
4
	 * Template für den Bestellablauf auf einer Seite
5
	 */
6149 hartmut 6
 
2782 daniel 7
?>
3448 daniel 8
<div class="wpsg wpsg_onepagecheckout wpsg_checkout wpsg_checkout2 <?php echo ((isset($_REQUEST['wpsg_basket_ajax']))?'wpsg_basket_ajax':''); ?>">
2782 daniel 9
 
10
	<?php echo $this->writeFrontendMessage(); ?>
2791 daniel 11
 
6149 hartmut 12
	<?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?>
13
		<?php $GLOBALS['step'] = 2; $this->render(WPSG_PATH_VIEW.'/warenkorb/progress.phtml'); ?>
14
	<?php } ?>
2791 daniel 15
	<form id="wpsg_basket_form" name="wpsg_basket_form"  method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>" enctype="multipart/form-data">
6149 hartmut 16
 
17
		<?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 1) { ?>
18
			<?php $this->view['noFormTag'] = true; $this->render(WPSG_PATH_VIEW.'/warenkorb/basket.phtml'); ?>
19
		<?php } ?>
5010 daniel 20
 
2783 daniel 21
		<div class="wpsg_clear"></div>
2782 daniel 22
 
6149 hartmut 23
		<?php /* Einbindung des Logins im Checkout */ ?>
2782 daniel 24
		<?php $this->callMod('wpsg_mod_kundenverwaltung', 'checkout_login'); ?>
25
 
2792 daniel 26
		 <div class="wpsg_box" id="wpsg_box_payship">
3455 daniel 27
 
2792 daniel 28
		 	<div class="wpsg_inner">
29
 
6149 hartmut 30
		 		<?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?>
3455 daniel 31
		 		<div class="wpsg_shipping">
32
 
5140 daniel 33
		 			<h2><?php echo __('Versandarten', 'wpsg'); ?></h2>
3460 daniel 34
 
5140 daniel 35
		 			<div class="shippay_wrap">
36
		 				<?php foreach ($this->view['arShipping'] as $s) { ?>
37
		 				<div class="shippay_item_wrap">
38
 
39
							<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']; ?>" />
40
 
41
		 					<?php if (wpsg_isSizedString($s['logo'])) { ?>
42
							<img class="wpsg_payship_logo" src="<?php echo $s['logo']; ?>" alt="<?php echo $s['name']; ?>" />
43
							<?php } else { ?>
44
							<div class="wpsg_payship_name"><?php echo __($s['name'], 'wpsg'); ?></div>
45
							<?php } ?>
46
		 					<?php if ((isset($s['hint']) && trim($s['hint']) != '') || $s['price'] > 0) { ?>
47
							<div id="shipping_<?php echo $s['id']; ?>_hint" class="shippay_hint">
48
								<?php if ($s['price'] > 0) { ?>
49
								<?php echo __('Gebühr', 'wpsg'); ?>: <?php echo wpsg_ff($s['price'], $this->get_option('wpsg_currency')); ?><br />
2792 daniel 50
								<?php } ?>
5140 daniel 51
								<?php echo $this->replaceUniversalPlatzhalter(__($s['hint'], 'wpsg')); ?>
3455 daniel 52
							</div>
5140 daniel 53
							<?php } ?>
54
 
55
							<div class="shippay_checkmark"></div>
56
 
57
		 				</div>
58
		 				<?php } ?>
59
		 			</div>
60
 
2792 daniel 61
				</div>
6149 hartmut 62
				<?php } ?>
2792 daniel 63
 
5010 daniel 64
				<?php if ($this->callMods('checkout_handlePayment') === true) { ?>
2792 daniel 65
 
5010 daniel 66
					<?php if (!$this->hasMod('wpsg_mod_crefopay')) { ?>
6149 hartmut 67
					<?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?>
5010 daniel 68
					<div class="wpsg_payment">
3460 daniel 69
 
5010 daniel 70
						<h2><?php echo __('Zahlungsarten', 'wpsg'); ?></h2>
71
 
5140 daniel 72
						<div class="shippay_wrap">
73
		 				<?php foreach ($this->view['arPayment'] as $p) { ?>
74
		 				<div class="shippay_item_wrap">
75
 
76
							<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']; ?>" />
77
 
78
		 					<div class="wpsg_payship_name"><?php echo __($p['name'], 'wpsg'); ?></div>
79
 
80
		 					<?php if (wpsg_isSizedString($p['logo'])) { ?>
81
							<img class="wpsg_payship_logo" src="<?php echo $p['logo']; ?>" alt="<?php echo $p['name']; ?>" />
82
							<?php } ?>
83
 
6142 hartmut 84
		 					<?php if ((isset($p['hint']) && trim($p['hint']) != '') || $p['preis'] > 0) { ?>
5140 daniel 85
							<div id="payment_<?php echo $p['id']; ?>_hint" class="shippay_hint">
6142 hartmut 86
								<?php if ($p['preis'] > 0) { ?>
87
								<?php echo __('Gebühr', 'wpsg'); ?>: <?php echo wpsg_ff($p['preis'], $this->get_option('wpsg_currency')); ?><br />
5140 daniel 88
								<?php } ?>
89
								<?php echo $this->replaceUniversalPlatzhalter(__($p['hint'], 'wpsg')); ?>
3455 daniel 90
							</div>
5010 daniel 91
							<?php } ?>
5140 daniel 92
 
93
							<div class="shippay_checkmark"></div>
94
 
95
		 				</div>
96
		 				<?php } ?>
6149 hartmut 97
		 				</div>
2792 daniel 98
 
5010 daniel 99
					</div>
100
					<?php } ?>
6149 hartmut 101
					<?php } ?>
5010 daniel 102
 
4323 daniel 103
				<?php } ?>
5010 daniel 104
 
2792 daniel 105
		 		<div class="wpsg_clear"></div>
106
 
107
		 	</div>
108
 
109
		 </div>
110
 
111
		<div class="wpsg_box" id="wpsg_box_kundendaten">
112
 
3448 daniel 113
			<h2><?php echo __('Kundendaten', 'wpsg'); ?></h2>
3460 daniel 114
 
115
			<div class="wpsg_spacer"></div>
116
 
2783 daniel 117
			<div class="wpsg_inner">
2782 daniel 118
 
6872 hartmut 119
				<?php if ($this->view['pflicht']['firma'] != '2') { ?>
2783 daniel 120
				<div class="wpsg_checkoutblock">
121
					<label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
122
					<?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
123
					</label>
124
					<input class="<?php echo (($this->view['pflicht']['firma'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("firma", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_firma" name="wpsg[checkout][firma]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['firma']); ?>" />
125
				</div>
6872 hartmut 126
				<?php } ?>
2783 daniel 127
 
6872 hartmut 128
				<?php if ($this->view['pflicht']['anrede'] != '2') { ?>
2783 daniel 129
				<div class="wpsg_checkoutblock">
130
					<label for="wpsg_title"><?php echo __('Anrede', 'wpsg'); ?>
131
					<?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label>
132
					<select class="<?php echo (($this->view['pflicht']['anrede'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_title" name="wpsg[checkout][title]">
133
						<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
6107 hartmut 134
						<?php $i=0; foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
135
						<option value="<?php echo $i; /*wpsg_hspc($t);*/ $i++; ?>" <?php echo (($this->view['basket']['checkout']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
2783 daniel 136
					<?php } ?>
137
					</select>
138
				</div>
6872 hartmut 139
				<?php } ?>
2783 daniel 140
 
6872 hartmut 141
				<?php if ($this->view['pflicht']['vname'] != '2') { ?>
2783 daniel 142
				<div class="wpsg_checkoutblock">
143
					<label for="vname" class="wpsg_checkout"><?php echo __("Vorname", "wpsg"); ?>
144
					<?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
145
					</label>
146
					<input class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("vname", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="vname" name="wpsg[checkout][vname]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['vname']); ?>" />
147
				</div>
6872 hartmut 148
				<?php } ?>
2782 daniel 149
 
6872 hartmut 150
				<?php if ($this->view['pflicht']['name'] != '2') { ?>
2783 daniel 151
				<div class="wpsg_checkoutblock">
152
					<label for="name" class="wpsg_checkout"><?php echo __("Name", "wpsg"); ?>
6142 hartmut 153
					<?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
2783 daniel 154
					</label>
155
					<input class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="name" name="wpsg[checkout][name]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['name']); ?>" />
156
				</div>
6872 hartmut 157
				<?php } ?>
2783 daniel 158
 
6872 hartmut 159
				<?php if ($this->view['pflicht']['email'] != '2') { ?>
2783 daniel 160
				<div class="wpsg_checkoutblock">
161
					<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?>
162
					<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
163
					</label>
4904 daniel 164
					<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email" name="wpsg[checkout][email]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['email']); ?>" />
2783 daniel 165
				</div>
6872 hartmut 166
				<?php } ?>
2783 daniel 167
 
168
				<?php if (isset($this->view['pflicht']['emailconfirm']) && $this->view['pflicht']['emailconfirm'] == '1') { ?>
169
				<div class="wpsg_checkoutblock">
3459 daniel 170
					<label for="email" class="wpsg_checkout"><?php echo __("E-Mail (Wiederholung)", "wpsg"); ?>
2783 daniel 171
					<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
172
					</label>
4904 daniel 173
					<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email2" name="wpsg[checkout][email2]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['email2']); ?>" />
2783 daniel 174
				</div>
2782 daniel 175
				<?php } ?>
2783 daniel 176
 
6872 hartmut 177
				<?php if ($this->view['pflicht']['geb'] != '2') { ?>
2783 daniel 178
				<div class="wpsg_checkoutblock">
4940 daniel 179
					<label for="geb" class="wpsg_checkout"><?php echo __('Geburtsdatum (Format: TT.MM.JJJJ)',"wpsg"); ?>
2783 daniel 180
					<?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
181
					</label>
4941 daniel 182
					<input class="wpsg_input_text <?php echo (($this->view['pflicht']['geb'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("geb", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="geb" name="wpsg[checkout][geb]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['geb']); ?>" />
2783 daniel 183
				</div>
6872 hartmut 184
				<?php } ?>
2783 daniel 185
 
6872 hartmut 186
				<?php if ($this->view['pflicht']['fax'] != '2') { ?>
2783 daniel 187
				<div class="wpsg_checkoutblock">
188
					<label for="fax" class="wpsg_checkout"><?php echo __("Fax.", "wpsg"); ?>
189
					<?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
190
					</label>
4904 daniel 191
					<input class="wpsg_input_text <?php echo (($this->view['pflicht']['fax'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("fax", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="fax" name="wpsg[checkout][fax]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['fax']); ?>" />
2783 daniel 192
				</div>
6872 hartmut 193
				<?php } ?>
2783 daniel 194
 
6872 hartmut 195
				<?php if ($this->view['pflicht']['tel'] != '2') { ?>
2783 daniel 196
				<div class="wpsg_checkoutblock">
197
					<label for="tel" class="wpsg_checkout"><?php echo __("Tel.", "wpsg"); ?>
198
					<?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
199
					</label>
4904 daniel 200
					<input class="wpsg_input_text <?php echo (($this->view['pflicht']['tel'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("tel", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="tel" name="wpsg[checkout][tel]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['tel']); ?>" />
2783 daniel 201
				</div>
6872 hartmut 202
				<?php } ?>
2782 daniel 203
 
6872 hartmut 204
				<?php if ($this->view['pflicht']['strasse'] != '2') { ?>
2783 daniel 205
				<div class="wpsg_checkoutblock">
6053 hartmut 206
					<label for="strasse" class="wpsg_checkout"><?php echo __("Straße Nr.", "wpsg"); ?>
2783 daniel 207
					<?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
208
					</label>
209
					<input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="strasse" name="wpsg[checkout][strasse]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['strasse']); ?>" />
210
				</div>
6872 hartmut 211
				<?php } ?>
2783 daniel 212
 
6872 hartmut 213
				<?php if ($this->view['pflicht']['plz'] != '2') { ?>
2783 daniel 214
				<div class="wpsg_checkoutblock">
215
					<label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl", "wpsg"); ?>
216
					<?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
217
					</label>
5382 daniel 218
					<input class="wpsg_input_text <?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="plz" name="wpsg[checkout][plz]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['plz']); ?>" />
2783 daniel 219
				</div>
6872 hartmut 220
				<?php } ?>
2783 daniel 221
 
6872 hartmut 222
				<?php if ($this->view['pflicht']['ort'] != '2') { ?>
2783 daniel 223
				<div class="wpsg_checkoutblock">
224
					<label for="ort" class="wpshopgermany_checkout"><?php echo __("Ort", "wpsg"); ?>
225
					<?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
226
					</label>
227
					<input class="<?php echo (($this->view['pflicht']['ort'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ort", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="ort" name="wpsg[checkout][ort]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['ort']); ?>" />
228
				</div>
6872 hartmut 229
				<?php } ?>
2783 daniel 230
 
6149 hartmut 231
				<?php
232
					$lhidden = '';
233
					if ($this->hasMod('wpsg_mod_onepagecheckout') && ($this->get_option('wpsg_mod_onepagecheckout_basket') == 1 )) {
234
						$lhidden = 'hidden="hidden"';
235
					}
236
				?>
237
 
6872 hartmut 238
				<?php if ($this->view['pflicht']['land'] != '2') { ?>
6149 hartmut 239
				<div class="wpsg_checkoutblock" <?php echo $lhidden;?>>
2783 daniel 240
					<label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land", "wpsg"); ?>
241
					<?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
242
					</label>
243
					<select name="wpsg[checkout][land]" class="<?php echo (($this->view['pflicht']['land'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_land">
244
						<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
245
						<?php foreach ($this->view['laender'] as $l) { ?>
3426 daniel 246
						<option value="<?php echo wpsg_hspc($l['id']); ?>" <?php echo (($l['id'] == $this->view['basket']['checkout']['land'])?'selected="selected"':(($this->get_option('wpsg_defaultland') == $l['id'])?'selected="selected"':'')); ?>><?php echo wpsg_hspc(__($l['name'], 'wpsg')); ?></option>
2783 daniel 247
						<?php } ?>
248
					</select>
249
				</div>
6872 hartmut 250
				<?php } ?>
2783 daniel 251
 
6872 hartmut 252
				<?php if ($this->view['pflicht']['ustidnr'] != '2') { ?>
2783 daniel 253
				<div class="wpsg_checkoutblock">
254
					<label for="wpsg_ustidnr" class="wpshopgermany_checkout"><?php echo __("UStIdNr.", "wpsg"); ?>
255
					<?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
256
					</label>
6142 hartmut 257
					<input class="<?php echo (($this->view['pflicht']['ustidnr'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ustidnr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_ustidnr" name="wpsg[checkout][ustidnr]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['ustidnr'])); ?>" />
2783 daniel 258
				</div>
6872 hartmut 259
				<?php } ?>
2783 daniel 260
 
261
				<?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
262
				<?php if ($this->get_option('wpsg_kundenvariablen_show') == '1') { ?>
263
				<?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
264
				<div class="wpsg_checkoutblock">
265
					<label class="wpsg_cv" for="wpsg_cv_<?php echo $c_id; ?>">
266
						<?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
267
						<?php if ($c['typ'] == '0') { // Textfeld ?>
6803 hartmut 268
						<input class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[checkout][custom][<?php echo $c_id; ?>]" type="text" value="<?php if (isset($this->view['basket']['checkout']['custom'][$c_id])) echo wpsg_hspc($this->view['basket']['checkout']['custom'][$c_id]); ?>" />
2783 daniel 269
						<?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
270
						<select class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[checkout][custom][<?php echo $c_id; ?>]">
271
							<option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
272
							<?php foreach ((array)$arAuswahl as $a) { ?>
6803 hartmut 273
							<option value="<?php echo wpsg_hspc($a); ?>" <?php if (isset($this->view['basket']['checkout']['custom'][$c_id])) echo (($a == $this->view['basket']['checkout']['custom'][$c_id])?'selected="selected"':''); ?>><?php echo wpsg_hspc($a); ?></option>
2783 daniel 274
							<?php } ?>
275
						</select>
276
						<?php } else if ($c['typ'] == '2') { // Checkbox ?>
277
						<input type="hidden" name="wpsg[checkout][custom][<?php echo $c_id; ?>]" value="0" />
6803 hartmut 278
						<input class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> checkbox" type="checkbox" value="1" name="wpsg[checkout][custom][<?php echo $c_id; ?>]" value="1" <?php if(isset($this->view['basket']['checkout']['custom'][$c_id])) echo wpsg_hspc(($this->view['basket']['checkout']['custom'][$c_id] == '1')?'checked="checked"':''); ?> />
2783 daniel 279
						<?php } ?>
280
					</label>
281
				</div>
282
				<?php } } ?>
2782 daniel 283
				<?php } ?>
2783 daniel 284
				<?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
285
 
2791 daniel 286
				<div class="wpsg_clear"></div>
287
 
288
				<?php $this->callMods('checkout_customer_inner'); ?>
2783 daniel 289
 
290
			</div>
291
 
2782 daniel 292
		</div>
2783 daniel 293
 
2782 daniel 294
		<?php $this->callMods('checkout_inner_prebutton', array(&$this->view)); ?>
295
 
296
		<div class="wpsg_clear"></div>
2783 daniel 297
 
298
		<div class="wpsg_box">
3460 daniel 299
 
3448 daniel 300
			<h2><?php echo __('Bestellkommentar', 'wpsg'); ?></h2>
3460 daniel 301
 
302
			<div class="wpsg_spacer"></div>
303
 
2783 daniel 304
			<div class="wpsg_inner wpsg_commentblock">
3432 daniel 305
				<textarea name="wpsg[checkout][comment]" id="wpsg_checkout_comment"><?php echo wpsg_hspc($this->view['basket']['checkout']['comment']); ?></textarea>
2783 daniel 306
			</div>
2782 daniel 307
		</div>
308
 
309
		<div class="wpsg_mandatoryfield_hint">
310
			<?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
311
		</div>
312
 
313
		<br />
314
 
315
		<?php $this->ClearSessionErrors(); ?>
316
 
317
		<br />
318
 
6149 hartmut 319
		<?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?>
2791 daniel 320
		<input type="submit" onclick="location.href='<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>'; return false;" class="wpsg_button wpsg_basketbutton" value="<?php echo __('Zurück zum Warenkorb', 'wpsg'); ?>" name="wpsg_redirect_basket" />
6149 hartmut 321
		<?php } ?>
3647 daniel 322
		<input type="submit" id="wpsg_checkout2button" class="wpsg_button wpsg_checkout2button" value="<?php echo __('Weiter', 'wpsg'); ?>" name="wpsg_checkout" />
2782 daniel 323
 
2866 daniel 324
		<div class="wpsg_clear"></div>
325
 
2782 daniel 326
		<br />
327
 
328
	</form>
329
 
330
	<script type="text/javascript">/* <![CDATA[ */
5140 daniel 331
 
332
		function wpsg_setShipPay(jqElement)
333
		{
334
 
335
			jqElement.parents('.shippay_wrap').find('.shippay_item_wrap').removeClass('shippay_active');
336
			jqElement.addClass('shippay_active');
337
 
338
			jqElement.find('input').prop('checked', true);
339
 
340
			return true;
341
 
342
		}
2791 daniel 343
 
2782 daniel 344
		jQuery(document).ready(function() {
2791 daniel 345
 
5140 daniel 346
			jQuery('.shippay_wrap .shippay_item_wrap').bind('click', function() {
347
 
348
				wpsg_setShipPay(jQuery(this));
349
 
350
				jQuery.ajax( {
351
					'url': wpsg_ajax.ajaxurl,
352
					'method': 'get',
353
					'data': {
354
						'wpsg[action]': 'updateCheckout',
355
						'wpsg_form_data': jQuery('#wpsg_checkout_form').serialize()
356
					},
357
					'async': true,
358
					'success': function(data) { }
359
				} );
360
 
361
			} );
362
 
363
			jQuery('.shippay_wrap .shippay_item_wrap').each(function() {
364
 
365
				if (jQuery(this).find('input[type="radio"]').prop('checked')) wpsg_setShipPay(jQuery(this));
366
 
367
			} );
368
 
3647 daniel 369
			jQuery('#wpsg_box_kundendaten input').bind('keypress', function(e) {
370
 
371
				if(e.keyCode == 13)
372
			    {
373
 
374
			        jQuery('#wpsg_checkout2button').click();
375
			        return false;
376
 
377
			    }
378
 
379
			} );
380
 
3455 daniel 381
			jQuery('.shippay input[type="radio"]').bind('change', function() {
382
 
383
				jQuery(this).parents('.shippay_wrap').find('.shippay').removeClass('wpsg_hover');
384
 
385
				if (jQuery(this).prop("checked"))
386
				{
387
 
388
					jQuery(this).parents('.shippay').addClass('wpsg_hover');
389
 
390
				}
3589 daniel 391
 
3457 daniel 392
				wpsg_showPaymentHint();
4126 daniel 393
				wpsg_showShippingHint();
3455 daniel 394
 
395
			} );
396
 
397
			jQuery('.shippay input[type="radio"]:checked').change();
398
			jQuery('.shippay').bind('click', function(e) {
399
 
3589 daniel 400
				if (jQuery(this).hasClass('wpsg_hover')) return true;
3523 daniel 401
 
3455 daniel 402
				jQuery(this).find('input[type="radio"]').attr("checked", "checked");
403
				jQuery(this).find('input[type="radio"]').change();
404
 
405
			} );
406
 
2791 daniel 407
			<?php if ($this->get_option('wpsg_form_validation') == '1') { ?>
2782 daniel 408
			if (typeof jQuery.validationEngine == "object")
409
			{
410
 
3647 daniel 411
				jQuery("#wpsg_basket_form").validationEngine('attach', { promptPosition : "bottomLeft", scroll: false } );
412
 
413
				jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function() {
414
					jQuery("#wpsg_basket_form").validationEngine('detach');
415
				});
2782 daniel 416
 
417
			}
2791 daniel 418
			<?php } else if ($this->get_option('wpsg_form_validation') == '2') { ?>
419
 
420
			jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>");
421
			jQuery.validator.addClassRules('validate[required]', { cRequired: true } );
422
			jQuery("#wpsg_basket_form").validate( {
423
				ignore: '',
424
				errorClass: 'wpsg_error',
425
				onsubmit: false,
426
				showErrors: function(errorMap, errorList) {
2783 daniel 427
 
2791 daniel 428
					this.defaultShowErrors();
429
					var errors = this.numberOfInvalids();
430
 
431
				}
432
			} );
433
 
2868 daniel 434
			jQuery('.wpsg_checkout2button').bind('click', function() {
3021 daniel 435
 
436
				var bReturn = jQuery('#wpsg_basket_form').validate().form();
437
				if (jQuery('#wpsg_basket_form input.wpsg_error').length > 0) jQuery('#wpsg_basket_form input.wpsg_error')[0].focus();
438
				return bReturn;
439
 
2783 daniel 440
			} );
2791 daniel 441
 
3647 daniel 442
			<?php } ?>
6149 hartmut 443
 
6803 hartmut 444
			land = <?php if (wpsg_isSizedInt($this->view['basket']['checkout']['land'])) echo $this->view['basket']['checkout']['land'];
445
					else echo $this->get_option('wpsg_defaultland'); ?>;
446
 
6149 hartmut 447
			// Land der Rechnungsadresse setzen
6803 hartmut 448
			//land = jQuery('#set_land').val();
6149 hartmut 449
			jQuery('#wpsg_land').val(land);
450
			//alert('land: ' + land);
3448 daniel 451
 
2782 daniel 452
		} );
453
 
454
	/* ]]> */</script>
5382 daniel 455
 
2782 daniel 456
</div>