Subversion Repositories wpShopGermany4

Rev

Rev 6872 | Rev 7247 | 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
?>
7150 thomas 8
 
9
<script type="text/javascript">/* <![CDATA[ */
10
 
11
	jQuery(document).ready(function() {
12
 
13
		<?php if ($this->get_option('wpsg_form_validation') == '1') { ?>
14
 
15
		if (typeof jQuery.validationEngine == "object")
16
		{
17
 
18
			jQuery("#form-step2").validationEngine('attach', {promptPosition : "bottomLeft", scroll: false});
19
 
20
			jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function(){
21
				jQuery("#form-step2").validationEngine('detach');
22
			});
23
 
24
		}
25
 
26
		<?php } else if ($this->get_option('wpsg_form_validation') == '2') { ?>
27
 
28
		jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>");
29
		jQuery.validator.addClassRules('validate[required]', { cRequired: true } );
30
		jQuery("#form-step2").validate( {
31
			ignore: '',
32
			errorClass: 'wpsg_error',
33
			onsubmit: false,
34
			showErrors: function(errorMap, errorList) {
35
 
36
				this.defaultShowErrors();
37
 
38
			}
39
		} );
40
 
41
		jQuery('#wpsg_checkout2button').bind('click', function() {
42
 
43
			var bReturn = jQuery('#form-step2').validate().form();
44
			if (jQuery('#form-step2 input.wpsg_error').length > 0) jQuery('#form-step2 input.wpsg_error')[0].focus();
45
			return bReturn;
46
 
47
		} );
48
 
49
		<?php } ?>
50
 
51
	} );
52
 
53
/* ]]> */</script>
54
 
3448 daniel 55
<div class="wpsg wpsg_onepagecheckout wpsg_checkout wpsg_checkout2 <?php echo ((isset($_REQUEST['wpsg_basket_ajax']))?'wpsg_basket_ajax':''); ?>">
2782 daniel 56
 
57
	<?php echo $this->writeFrontendMessage(); ?>
2791 daniel 58
 
6149 hartmut 59
	<?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?>
60
		<?php $GLOBALS['step'] = 2; $this->render(WPSG_PATH_VIEW.'/warenkorb/progress.phtml'); ?>
61
	<?php } ?>
2791 daniel 62
	<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 63
 
64
		<?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 1) { ?>
65
			<?php $this->view['noFormTag'] = true; $this->render(WPSG_PATH_VIEW.'/warenkorb/basket.phtml'); ?>
66
		<?php } ?>
5010 daniel 67
 
2783 daniel 68
		<div class="wpsg_clear"></div>
2782 daniel 69
 
2792 daniel 70
		 <div class="wpsg_box" id="wpsg_box_payship">
3455 daniel 71
 
2792 daniel 72
		 	<div class="wpsg_inner">
73
 
6149 hartmut 74
		 		<?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?>
3455 daniel 75
		 		<div class="wpsg_shipping">
76
 
5140 daniel 77
		 			<h2><?php echo __('Versandarten', 'wpsg'); ?></h2>
3460 daniel 78
 
5140 daniel 79
		 			<div class="shippay_wrap">
80
		 				<?php foreach ($this->view['arShipping'] as $s) { ?>
81
		 				<div class="shippay_item_wrap">
82
 
83
							<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']; ?>" />
84
 
85
		 					<?php if (wpsg_isSizedString($s['logo'])) { ?>
86
							<img class="wpsg_payship_logo" src="<?php echo $s['logo']; ?>" alt="<?php echo $s['name']; ?>" />
87
							<?php } else { ?>
88
							<div class="wpsg_payship_name"><?php echo __($s['name'], 'wpsg'); ?></div>
89
							<?php } ?>
90
		 					<?php if ((isset($s['hint']) && trim($s['hint']) != '') || $s['price'] > 0) { ?>
91
							<div id="shipping_<?php echo $s['id']; ?>_hint" class="shippay_hint">
92
								<?php if ($s['price'] > 0) { ?>
93
								<?php echo __('Gebühr', 'wpsg'); ?>: <?php echo wpsg_ff($s['price'], $this->get_option('wpsg_currency')); ?><br />
2792 daniel 94
								<?php } ?>
5140 daniel 95
								<?php echo $this->replaceUniversalPlatzhalter(__($s['hint'], 'wpsg')); ?>
3455 daniel 96
							</div>
5140 daniel 97
							<?php } ?>
98
 
99
							<div class="shippay_checkmark"></div>
100
 
101
		 				</div>
102
		 				<?php } ?>
103
		 			</div>
104
 
2792 daniel 105
				</div>
6149 hartmut 106
				<?php } ?>
2792 daniel 107
 
5010 daniel 108
				<?php if ($this->callMods('checkout_handlePayment') === true) { ?>
2792 daniel 109
 
5010 daniel 110
					<?php if (!$this->hasMod('wpsg_mod_crefopay')) { ?>
6149 hartmut 111
					<?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?>
5010 daniel 112
					<div class="wpsg_payment">
3460 daniel 113
 
5010 daniel 114
						<h2><?php echo __('Zahlungsarten', 'wpsg'); ?></h2>
115
 
5140 daniel 116
						<div class="shippay_wrap">
117
		 				<?php foreach ($this->view['arPayment'] as $p) { ?>
118
		 				<div class="shippay_item_wrap">
119
 
120
							<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']; ?>" />
121
 
122
		 					<div class="wpsg_payship_name"><?php echo __($p['name'], 'wpsg'); ?></div>
123
 
124
		 					<?php if (wpsg_isSizedString($p['logo'])) { ?>
125
							<img class="wpsg_payship_logo" src="<?php echo $p['logo']; ?>" alt="<?php echo $p['name']; ?>" />
126
							<?php } ?>
127
 
6142 hartmut 128
		 					<?php if ((isset($p['hint']) && trim($p['hint']) != '') || $p['preis'] > 0) { ?>
5140 daniel 129
							<div id="payment_<?php echo $p['id']; ?>_hint" class="shippay_hint">
6142 hartmut 130
								<?php if ($p['preis'] > 0) { ?>
131
								<?php echo __('Gebühr', 'wpsg'); ?>: <?php echo wpsg_ff($p['preis'], $this->get_option('wpsg_currency')); ?><br />
5140 daniel 132
								<?php } ?>
133
								<?php echo $this->replaceUniversalPlatzhalter(__($p['hint'], 'wpsg')); ?>
3455 daniel 134
							</div>
5010 daniel 135
							<?php } ?>
5140 daniel 136
 
137
							<div class="shippay_checkmark"></div>
138
 
139
		 				</div>
140
		 				<?php } ?>
6149 hartmut 141
		 				</div>
2792 daniel 142
 
5010 daniel 143
					</div>
144
					<?php } ?>
6149 hartmut 145
					<?php } ?>
5010 daniel 146
 
4323 daniel 147
				<?php } ?>
5010 daniel 148
 
2792 daniel 149
		 		<div class="wpsg_clear"></div>
150
 
151
		 	</div>
152
 
153
		 </div>
154
 
7150 thomas 155
		<h2><?php echo __('Kundendaten', 'wpsg'); ?></h2>
2792 daniel 156
 
7150 thomas 157
		<?php if ($this->hasMod('wpsg_mod_kundenverwaltung') && $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutLogin') == '1') { ?>
158
			<div class="onepagecheckout_customer_login" style="border:1px solid #cecece; padding:20px; margin:20px 0;">
159
				<?php echo wpsg_drawForm_Checkbox('onepagecheckout_customer_login', __('Login für bestehenden Kundenaccount', 'wpsg'), $this->get_option('onepagecheckout_customer_login')); ?>
160
				<div class="onepagecheckout_customer_login_activ" style="display:none; margin:20px 0;">
161
					<?php $this->callMod('wpsg_mod_kundenverwaltung', 'checkout_login'); ?>
162
			 	</div>
163
			 </div>
164
		 <?php } ?>
165
 
166
		 <?php if (($this->hasMod('wpsg_mod_kundenverwaltung') && $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegister') == '1') || ($this->hasMod('wpsg_mod_kundenverwaltung') && $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang') == '1'))  { ?>
167
			 <div class="onepagecheckout_customer_registration" style="border:1px solid #cecece; padding:20px; margin:20px 0;">
168
				<?php echo wpsg_drawForm_Checkbox('onepagecheckout_customer_registration', __('neuen Kundenaccount registrieren', 'wpsg'), $this->get_option('onepagecheckout_customer_registration')); ?>
169
			 	<div class="onepagecheckout_customer_registration_activ" style="display:none; margin:20px 0;">
170
				 	<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'checkout_customer_inner'); ?>
171
			 	</div>
172
			 </div>
173
		 <?php } ?>
174
 
175
		 <div class="onepagecheckout_customer_guest" style="border:1px solid #cecece; padding:20px; margin:20px 0;">
176
		 	<div class="onepagecheckout_customer_guest_label"><?php echo wpsg_drawForm_Checkbox('onepagecheckout_customer_guest', __('Als Gast bestellen', 'wpsg'), $this->get_option('onepagecheckout_customer_guest')); ?></div>
177
		 	<div class="onepagecheckout_customer_guest_activ" style="display:none; margin:20px 0;">
178
 
179
				<div class="wpsg_box" id="wpsg_box_kundendaten">
180
 
181
					<div class="wpsg_inner">
2782 daniel 182
 
7150 thomas 183
						<?php if ($this->view['pflicht']['firma'] != '2') { ?>
184
						<div class="wpsg_checkoutblock">
185
							<label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
186
							<?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
187
							</label>
188
							<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']); ?>" />
189
						</div>
190
						<?php } ?>
191
 
192
						<?php if ($this->view['pflicht']['anrede'] != '2') { ?>
193
						<div class="wpsg_checkoutblock">
194
							<label for="wpsg_title"><?php echo __('Anrede', 'wpsg'); ?>
195
							<?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label>
196
							<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]">
197
								<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
198
								<?php $i=0; foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
199
								<option value="<?php echo $i; /*wpsg_hspc($t);*/ $i++; ?>" <?php echo (($this->view['basket']['checkout']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
200
							<?php } ?>
201
							</select>
202
						</div>
203
						<?php } ?>
204
 
205
						<?php if ($this->view['pflicht']['vname'] != '2') { ?>
206
						<div class="wpsg_checkoutblock">
207
							<label for="vname" class="wpsg_checkout"><?php echo __("Vorname", "wpsg"); ?>
208
							<?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
209
							</label>
210
							<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']); ?>" />
211
						</div>
212
						<?php } ?>
2783 daniel 213
 
7150 thomas 214
						<?php if ($this->view['pflicht']['name'] != '2') { ?>
215
						<div class="wpsg_checkoutblock">
216
							<label for="name" class="wpsg_checkout"><?php echo __("Name", "wpsg"); ?>
217
							<?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
218
							</label>
219
							<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']); ?>" />
220
						</div>
2783 daniel 221
						<?php } ?>
7150 thomas 222
 
223
						<?php if ($this->view['pflicht']['email'] != '2') { ?>
224
						<div class="wpsg_checkoutblock">
225
							<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?>
226
							<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
227
							</label>
228
							<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']); ?>" />
229
						</div>
2783 daniel 230
						<?php } ?>
7150 thomas 231
 
232
						<?php if (isset($this->view['pflicht']['emailconfirm']) && $this->view['pflicht']['emailconfirm'] == '1') { ?>
233
						<div class="wpsg_checkoutblock">
234
							<label for="email" class="wpsg_checkout"><?php echo __("E-Mail (Wiederholung)", "wpsg"); ?>
235
							<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
236
							</label>
237
							<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']); ?>" />
238
						</div>
239
						<?php } ?>
240
 
241
						<?php if ($this->view['pflicht']['geb'] != '2') { ?>
242
						<div class="wpsg_checkoutblock">
243
							<label for="geb" class="wpsg_checkout"><?php echo __('Geburtsdatum (Format: TT.MM.JJJJ)',"wpsg"); ?>
244
							<?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
245
							</label>
246
							<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']); ?>" />
247
						</div>
248
						<?php } ?>
249
 
250
						<?php if ($this->view['pflicht']['fax'] != '2') { ?>
251
						<div class="wpsg_checkoutblock">
252
							<label for="fax" class="wpsg_checkout"><?php echo __("Fax.", "wpsg"); ?>
253
							<?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
254
							</label>
255
							<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']); ?>" />
256
						</div>
257
						<?php } ?>
258
 
259
						<?php if ($this->view['pflicht']['tel'] != '2') { ?>
260
						<div class="wpsg_checkoutblock">
261
							<label for="tel" class="wpsg_checkout"><?php echo __("Tel.", "wpsg"); ?>
262
							<?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
263
							</label>
264
							<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']); ?>" />
265
						</div>
266
						<?php } ?>
267
 
268
						<?php if ($this->view['pflicht']['strasse'] != '2') { ?>
269
						<div class="wpsg_checkoutblock">
270
							<label for="strasse" class="wpsg_checkout"><?php echo __("Straße Nr.", "wpsg"); ?>
271
							<?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
272
							</label>
273
							<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']); ?>" />
274
						</div>
275
						<?php } ?>
276
 
277
						<?php if ($this->view['pflicht']['plz'] != '2') { ?>
278
						<div class="wpsg_checkoutblock">
279
							<label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl", "wpsg"); ?>
280
							<?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
281
							</label>
282
							<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']); ?>" />
283
						</div>
284
						<?php } ?>
285
 
286
						<?php if ($this->view['pflicht']['ort'] != '2') { ?>
287
						<div class="wpsg_checkoutblock">
288
							<label for="ort" class="wpshopgermany_checkout"><?php echo __("Ort", "wpsg"); ?>
289
							<?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
290
							</label>
291
							<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']); ?>" />
292
						</div>
293
						<?php } ?>
294
 
295
						<?php
296
							$lhidden = '';
297
							if ($this->hasMod('wpsg_mod_onepagecheckout') && ($this->get_option('wpsg_mod_onepagecheckout_basket') == 1 )) {
298
								$lhidden = 'hidden="hidden"';
299
							}
300
						?>
301
 
302
						<?php if ($this->view['pflicht']['land'] != '2') { ?>
303
						<div class="wpsg_checkoutblock" <?php echo $lhidden;?>>
304
							<label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land", "wpsg"); ?>
305
							<?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
306
							</label>
307
							<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">
308
								<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
309
								<?php foreach ($this->view['laender'] as $l) { ?>
310
								<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>
311
								<?php } ?>
312
							</select>
313
						</div>
314
						<?php } ?>
315
 
316
						<?php if ($this->view['pflicht']['ustidnr'] != '2') { ?>
317
						<div class="wpsg_checkoutblock">
318
							<label for="wpsg_ustidnr" class="wpshopgermany_checkout"><?php echo __("UStIdNr.", "wpsg"); ?>
319
							<?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
320
							</label>
321
							<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'])); ?>" />
322
						</div>
323
						<?php } ?>
324
 
325
						<?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
326
						<?php if ($this->get_option('wpsg_kundenvariablen_show') == '1') { ?>
327
						<?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
328
						<div class="wpsg_checkoutblock">
329
							<label class="wpsg_cv" for="wpsg_cv_<?php echo $c_id; ?>">
330
								<?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
331
								<?php if ($c['typ'] == '0') { // Textfeld ?>
332
								<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]); ?>" />
333
								<?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
334
								<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; ?>]">
335
									<option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
336
									<?php foreach ((array)$arAuswahl as $a) { ?>
337
									<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>
338
									<?php } ?>
339
								</select>
340
								<?php } else if ($c['typ'] == '2') { // Checkbox ?>
341
								<input type="hidden" name="wpsg[checkout][custom][<?php echo $c_id; ?>]" value="0" />
342
								<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"':''); ?> />
343
								<?php } ?>
344
							</label>
345
						</div>
346
						<?php } } ?>
347
						<?php } ?>
348
						<?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
349
 
350
						<div class="wpsg_clear"></div>
351
 
352
						<?php /* $this->callMods('checkout_customer_inner'); */ ?>
353
 
354
						<br />
355
 
356
						<?php $this->callMods('checkout_inner_prebutton', array(&$this->view)); ?>
357
 
358
						<div class="wpsg_box">
359
 
360
							<h2><?php echo __('Bestellkommentar', 'wpsg'); ?></h2>
361
 
362
							<div class="wpsg_spacer"></div>
363
 
364
							<div class="wpsg_inner wpsg_commentblock">
365
								<textarea name="wpsg[checkout][comment]" id="wpsg_checkout_comment"><?php echo wpsg_hspc($this->view['basket']['checkout']['comment']); ?></textarea>
366
							</div>
367
						</div>
368
 
369
						<div class="wpsg_mandatoryfield_hint">
370
							<?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
371
						</div>
372
 
373
					</div>
2783 daniel 374
 
7150 thomas 375
				</div>
2783 daniel 376
 
7150 thomas 377
		 	</div>
2783 daniel 378
 
7150 thomas 379
		 </div>
380
 
381
		 <br />
382
 
383
		<?php /* Abfrage Satollo-Newsletter */ ?>
384
		<?php echo $this->callMod('wpsg_mod_nlsatolo', 'checkout_customer_inner'); ?>
385
 
386
		<?php /* Einverständnisabfrage Trusted Shops */ ?>
387
		<?php echo $this->callMod('wpsg_mod_trustedshops', 'checkout_customer_inner'); ?>
2782 daniel 388
 
7150 thomas 389
		<div class="wpsg_clear"></div>
2783 daniel 390
 
2782 daniel 391
		<br />
392
 
393
		<?php $this->ClearSessionErrors(); ?>
394
 
395
		<br />
396
 
6149 hartmut 397
		<?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?>
2791 daniel 398
		<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 399
		<?php } ?>
3647 daniel 400
		<input type="submit" id="wpsg_checkout2button" class="wpsg_button wpsg_checkout2button" value="<?php echo __('Weiter', 'wpsg'); ?>" name="wpsg_checkout" />
2782 daniel 401
 
2866 daniel 402
		<div class="wpsg_clear"></div>
403
 
2782 daniel 404
		<br />
405
 
406
	</form>
407
 
408
	<script type="text/javascript">/* <![CDATA[ */
5140 daniel 409
 
410
		function wpsg_setShipPay(jqElement)
411
		{
412
 
413
			jqElement.parents('.shippay_wrap').find('.shippay_item_wrap').removeClass('shippay_active');
414
			jqElement.addClass('shippay_active');
415
 
416
			jqElement.find('input').prop('checked', true);
417
 
418
			return true;
419
 
420
		}
2791 daniel 421
 
2782 daniel 422
		jQuery(document).ready(function() {
2791 daniel 423
 
7150 thomas 424
			jQuery('#onepagecheckout_customer_login').bind('change', function() {
425
 
426
				if (jQuery(this).is(':checked')) {
427
 
428
					jQuery('.onepagecheckout_customer_login_activ').show();
429
					jQuery('.onepagecheckout_customer_guest_label').hide();
430
					jQuery('.onepagecheckout_customer_registration').hide();
431
 
432
				} else {
433
 
434
					jQuery('.onepagecheckout_customer_login_activ').hide();
435
					jQuery('.onepagecheckout_customer_guest_label').show();
436
					jQuery('.onepagecheckout_customer_registration').show();
437
 
438
				}
439
 
440
			} ).change();
441
 
442
			jQuery('#onepagecheckout_customer_registration').bind('change', function() {
443
 
444
				if (jQuery(this).is(':checked')) {
445
 
446
					jQuery('.onepagecheckout_customer_registration_activ, .onepagecheckout_customer_guest_activ').show();
447
					jQuery('.onepagecheckout_customer_login').hide();
448
					jQuery('.onepagecheckout_customer_guest_label').hide();
449
 
450
				} else {
451
 
452
					jQuery('.onepagecheckout_customer_registration_activ, .onepagecheckout_customer_guest_activ').hide();
453
					jQuery('.onepagecheckout_customer_login').show();
454
					jQuery('.onepagecheckout_customer_guest_label').show();
455
 
456
				}
457
 
458
			} ).change();
459
 
460
			jQuery('#onepagecheckout_customer_guest').bind('change', function() {
461
 
462
				if (jQuery(this).is(':checked')) {
463
 
464
					jQuery('.onepagecheckout_customer_guest_activ').show();
465
					jQuery('.onepagecheckout_customer_login').hide();
466
					jQuery('.onepagecheckout_customer_registration').hide();
467
 
468
				} else {
469
					jQuery('.onepagecheckout_customer_guest_activ').hide();
470
					jQuery('.onepagecheckout_customer_login').show();
471
					jQuery('.onepagecheckout_customer_registration').show();
472
				}
473
 
474
			} ).change();
475
 
5140 daniel 476
			jQuery('.shippay_wrap .shippay_item_wrap').bind('click', function() {
477
 
478
				wpsg_setShipPay(jQuery(this));
479
 
480
				jQuery.ajax( {
481
					'url': wpsg_ajax.ajaxurl,
482
					'method': 'get',
483
					'data': {
484
						'wpsg[action]': 'updateCheckout',
485
						'wpsg_form_data': jQuery('#wpsg_checkout_form').serialize()
486
					},
487
					'async': true,
488
					'success': function(data) { }
489
				} );
490
 
491
			} );
492
 
493
			jQuery('.shippay_wrap .shippay_item_wrap').each(function() {
494
 
495
				if (jQuery(this).find('input[type="radio"]').prop('checked')) wpsg_setShipPay(jQuery(this));
496
 
497
			} );
498
 
3647 daniel 499
			jQuery('#wpsg_box_kundendaten input').bind('keypress', function(e) {
500
 
501
				if(e.keyCode == 13)
502
			    {
503
 
504
			        jQuery('#wpsg_checkout2button').click();
505
			        return false;
506
 
507
			    }
508
 
509
			} );
510
 
3455 daniel 511
			jQuery('.shippay input[type="radio"]').bind('change', function() {
512
 
513
				jQuery(this).parents('.shippay_wrap').find('.shippay').removeClass('wpsg_hover');
514
 
515
				if (jQuery(this).prop("checked"))
516
				{
517
 
518
					jQuery(this).parents('.shippay').addClass('wpsg_hover');
519
 
520
				}
3589 daniel 521
 
3457 daniel 522
				wpsg_showPaymentHint();
4126 daniel 523
				wpsg_showShippingHint();
3455 daniel 524
 
525
			} );
526
 
527
			jQuery('.shippay input[type="radio"]:checked').change();
528
			jQuery('.shippay').bind('click', function(e) {
529
 
3589 daniel 530
				if (jQuery(this).hasClass('wpsg_hover')) return true;
3523 daniel 531
 
3455 daniel 532
				jQuery(this).find('input[type="radio"]').attr("checked", "checked");
533
				jQuery(this).find('input[type="radio"]').change();
534
 
535
			} );
536
 
2791 daniel 537
			<?php if ($this->get_option('wpsg_form_validation') == '1') { ?>
2782 daniel 538
			if (typeof jQuery.validationEngine == "object")
539
			{
540
 
3647 daniel 541
				jQuery("#wpsg_basket_form").validationEngine('attach', { promptPosition : "bottomLeft", scroll: false } );
542
 
543
				jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function() {
544
					jQuery("#wpsg_basket_form").validationEngine('detach');
545
				});
2782 daniel 546
 
547
			}
2791 daniel 548
			<?php } else if ($this->get_option('wpsg_form_validation') == '2') { ?>
549
 
550
			jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>");
551
			jQuery.validator.addClassRules('validate[required]', { cRequired: true } );
552
			jQuery("#wpsg_basket_form").validate( {
553
				ignore: '',
554
				errorClass: 'wpsg_error',
555
				onsubmit: false,
556
				showErrors: function(errorMap, errorList) {
2783 daniel 557
 
2791 daniel 558
					this.defaultShowErrors();
559
					var errors = this.numberOfInvalids();
560
 
561
				}
562
			} );
563
 
2868 daniel 564
			jQuery('.wpsg_checkout2button').bind('click', function() {
3021 daniel 565
 
566
				var bReturn = jQuery('#wpsg_basket_form').validate().form();
567
				if (jQuery('#wpsg_basket_form input.wpsg_error').length > 0) jQuery('#wpsg_basket_form input.wpsg_error')[0].focus();
568
				return bReturn;
569
 
2783 daniel 570
			} );
2791 daniel 571
 
3647 daniel 572
			<?php } ?>
6149 hartmut 573
 
6803 hartmut 574
			land = <?php if (wpsg_isSizedInt($this->view['basket']['checkout']['land'])) echo $this->view['basket']['checkout']['land'];
575
					else echo $this->get_option('wpsg_defaultland'); ?>;
576
 
6149 hartmut 577
			// Land der Rechnungsadresse setzen
6803 hartmut 578
			//land = jQuery('#set_land').val();
6149 hartmut 579
			jQuery('#wpsg_land').val(land);
580
			//alert('land: ' + land);
3448 daniel 581
 
2782 daniel 582
		} );
583
 
584
	/* ]]> */</script>
5382 daniel 585
 
2782 daniel 586
</div>