1067 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für den ersten Schritt der Kasse
|
|
|
5 |
* Kundendaten etc.
|
|
|
6 |
*/
|
|
|
7 |
|
|
|
8 |
//wpsg_debug($this->view);
|
|
|
9 |
|
|
|
10 |
?>
|
3444 |
daniel |
11 |
<script type="text/javascript">/* <![CDATA[ */
|
1306 |
daniel |
12 |
|
|
|
13 |
jQuery(document).ready(function() {
|
2330 |
daniel |
14 |
|
2803 |
daniel |
15 |
<?php if ($this->get_option('wpsg_form_validation') == '1') { ?>
|
|
|
16 |
|
2330 |
daniel |
17 |
if (typeof jQuery.validationEngine == "object")
|
|
|
18 |
{
|
|
|
19 |
|
2803 |
daniel |
20 |
jQuery("#form-step2").validationEngine('attach', {promptPosition : "bottomLeft", scroll: false});
|
1306 |
daniel |
21 |
|
2330 |
daniel |
22 |
jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function(){
|
2927 |
daniel |
23 |
jQuery("#form-step2").validationEngine('detach');
|
2330 |
daniel |
24 |
});
|
|
|
25 |
|
|
|
26 |
}
|
1306 |
daniel |
27 |
|
2803 |
daniel |
28 |
<?php } else if ($this->get_option('wpsg_form_validation') == '2') { ?>
|
|
|
29 |
|
|
|
30 |
jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>");
|
|
|
31 |
jQuery.validator.addClassRules('validate[required]', { cRequired: true } );
|
|
|
32 |
jQuery("#form-step2").validate( {
|
|
|
33 |
ignore: '',
|
|
|
34 |
errorClass: 'wpsg_error',
|
|
|
35 |
onsubmit: false,
|
|
|
36 |
showErrors: function(errorMap, errorList) {
|
|
|
37 |
|
|
|
38 |
this.defaultShowErrors();
|
|
|
39 |
|
|
|
40 |
}
|
|
|
41 |
} );
|
|
|
42 |
|
|
|
43 |
jQuery('#wpsg_checkout2button').bind('click', function() {
|
3021 |
daniel |
44 |
|
|
|
45 |
var bReturn = jQuery('#form-step2').validate().form();
|
|
|
46 |
if (jQuery('#form-step2 input.wpsg_error').length > 0) jQuery('#form-step2 input.wpsg_error')[0].focus();
|
|
|
47 |
return bReturn;
|
|
|
48 |
|
2803 |
daniel |
49 |
} );
|
|
|
50 |
|
|
|
51 |
<?php } ?>
|
3444 |
daniel |
52 |
|
|
|
53 |
jQuery('.wpsg_checkout input').bind('keyup', function(e) {
|
|
|
54 |
|
|
|
55 |
if(e.keyCode == 13)
|
|
|
56 |
{
|
|
|
57 |
jQuery('#wpsg_checkout2button').click();
|
|
|
58 |
}
|
|
|
59 |
|
|
|
60 |
} );
|
2803 |
daniel |
61 |
|
1306 |
daniel |
62 |
} );
|
|
|
63 |
|
3444 |
daniel |
64 |
/* ]]> */</script>
|
1306 |
daniel |
65 |
|
3444 |
daniel |
66 |
<div class="wpsg wpsg_checkout">
|
2792 |
daniel |
67 |
|
1067 |
daniel |
68 |
<?php echo $this->writeFrontendMessage(); ?>
|
2792 |
daniel |
69 |
|
1403 |
daniel |
70 |
<form id="form-step2" method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>" enctype="multipart/form-data">
|
1067 |
daniel |
71 |
|
|
|
72 |
<?php /* Einbindung des Logins im Checokut */ ?>
|
|
|
73 |
<?php $this->callMod('wpsg_mod_kundenverwaltung', 'checkout_login'); ?>
|
|
|
74 |
|
2792 |
daniel |
75 |
<div class="wpsg_box" id="wpsg_box_kundendaten">
|
3444 |
daniel |
76 |
|
|
|
77 |
<h1><?php echo __('Kundendaten', 'wpsg'); ?></h1>
|
1131 |
daniel |
78 |
|
2792 |
daniel |
79 |
<div class="wpsg_inner">
|
1131 |
daniel |
80 |
|
2792 |
daniel |
81 |
<div class="wpsg_checkoutblock">
|
|
|
82 |
<label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
|
|
|
83 |
<?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
|
|
|
84 |
</label>
|
|
|
85 |
<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']); ?>" />
|
|
|
86 |
</div>
|
|
|
87 |
|
|
|
88 |
<div class="wpsg_checkoutblock">
|
|
|
89 |
<label for="wpsg_title"><?php echo __('Anrede', 'wpsg'); ?>
|
|
|
90 |
<?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label>
|
|
|
91 |
<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]">
|
|
|
92 |
<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
|
|
|
93 |
<?php foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
|
|
|
94 |
<option value="<?php echo wpsg_hspc($t); ?>" <?php echo (($this->view['basket']['checkout']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
|
|
|
95 |
<?php } ?>
|
|
|
96 |
</select>
|
|
|
97 |
</div>
|
|
|
98 |
|
|
|
99 |
<div class="wpsg_checkoutblock">
|
|
|
100 |
<label for="vname" class="wpsg_checkout"><?php echo __("Vorname", "wpsg"); ?>
|
|
|
101 |
<?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
|
|
|
102 |
</label>
|
|
|
103 |
<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']); ?>" />
|
|
|
104 |
</div>
|
1131 |
daniel |
105 |
|
2792 |
daniel |
106 |
<div class="wpsg_checkoutblock">
|
|
|
107 |
<label for="name" class="wpsg_checkout"><?php echo __("Name", "wpsg"); ?>
|
2880 |
daniel |
108 |
<?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
|
2792 |
daniel |
109 |
</label>
|
|
|
110 |
<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']); ?>" />
|
|
|
111 |
</div>
|
|
|
112 |
|
|
|
113 |
<div class="wpsg_checkoutblock">
|
|
|
114 |
<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?>
|
|
|
115 |
<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
|
|
|
116 |
</label>
|
|
|
117 |
<input class="<?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="email" name="wpsg[checkout][email]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['email']); ?>" />
|
|
|
118 |
</div>
|
|
|
119 |
|
|
|
120 |
<?php if (isset($this->view['pflicht']['emailconfirm']) && $this->view['pflicht']['emailconfirm'] == '1') { ?>
|
|
|
121 |
<div class="wpsg_checkoutblock">
|
|
|
122 |
<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse (Wiederholung)", "wpsg"); ?>
|
|
|
123 |
<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
|
|
|
124 |
</label>
|
|
|
125 |
<input class="<?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="email2" name="wpsg[checkout][email2]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['email2']); ?>" />
|
|
|
126 |
</div>
|
1067 |
daniel |
127 |
<?php } ?>
|
2792 |
daniel |
128 |
|
|
|
129 |
<div class="wpsg_checkoutblock">
|
|
|
130 |
<label for="geb" class="wpsg_checkout"><?php echo __('Geburtsdatum (Format: TT.MM.YYYY)',"wpsg"); ?>
|
|
|
131 |
<?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
|
|
|
132 |
</label>
|
|
|
133 |
<input class="<?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']); ?>" />
|
|
|
134 |
</div>
|
|
|
135 |
|
|
|
136 |
<div class="wpsg_checkoutblock">
|
|
|
137 |
<label for="fax" class="wpsg_checkout"><?php echo __("Fax.", "wpsg"); ?>
|
|
|
138 |
<?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
|
|
|
139 |
</label>
|
|
|
140 |
<input class="<?php echo (($this->view['pflicht']['fax'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("fax", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="fax" name="wpsg[checkout][fax]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['fax']); ?>" />
|
|
|
141 |
</div>
|
|
|
142 |
|
|
|
143 |
<div class="wpsg_checkoutblock">
|
|
|
144 |
<label for="tel" class="wpsg_checkout"><?php echo __("Tel.", "wpsg"); ?>
|
|
|
145 |
<?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
|
|
|
146 |
</label>
|
|
|
147 |
<input class="<?php echo (($this->view['pflicht']['tel'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("tel", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="tel" name="wpsg[checkout][tel]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['tel']); ?>" />
|
|
|
148 |
</div>
|
1221 |
david |
149 |
|
2792 |
daniel |
150 |
<div class="wpsg_checkoutblock">
|
|
|
151 |
<label for="strasse" class="wpsg_checkout"><?php echo __("Strasse Nr.", "wpsg"); ?>
|
|
|
152 |
<?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
|
|
|
153 |
</label>
|
|
|
154 |
<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']); ?>" />
|
|
|
155 |
</div>
|
|
|
156 |
|
|
|
157 |
<div class="wpsg_checkoutblock">
|
|
|
158 |
<label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl", "wpsg"); ?>
|
|
|
159 |
<?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
|
|
|
160 |
</label>
|
|
|
161 |
<input class="<?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']); ?>" />
|
|
|
162 |
</div>
|
|
|
163 |
|
|
|
164 |
<div class="wpsg_checkoutblock">
|
|
|
165 |
<label for="ort" class="wpshopgermany_checkout"><?php echo __("Ort", "wpsg"); ?>
|
|
|
166 |
<?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
|
|
|
167 |
</label>
|
|
|
168 |
<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']); ?>" />
|
|
|
169 |
</div>
|
|
|
170 |
|
|
|
171 |
<div class="wpsg_checkoutblock">
|
|
|
172 |
<label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land", "wpsg"); ?>
|
|
|
173 |
<?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
|
|
|
174 |
</label>
|
|
|
175 |
<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">
|
|
|
176 |
<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
|
|
|
177 |
<?php foreach ($this->view['laender'] as $l) { ?>
|
3426 |
daniel |
178 |
<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>
|
2792 |
daniel |
179 |
<?php } ?>
|
|
|
180 |
</select>
|
|
|
181 |
</div>
|
|
|
182 |
|
|
|
183 |
<div class="wpsg_checkoutblock">
|
|
|
184 |
<label for="wpsg_ustidnr" class="wpshopgermany_checkout"><?php echo __("UStIdNr.", "wpsg"); ?>
|
|
|
185 |
<?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
|
|
|
186 |
</label>
|
|
|
187 |
<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($this->view['basket']['checkout']['ustidnr']); ?>" />
|
|
|
188 |
</div>
|
|
|
189 |
|
|
|
190 |
<?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
|
|
|
191 |
<?php if ($this->get_option('wpsg_kundenvariablen_show') == '1') { ?>
|
|
|
192 |
<?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
|
|
|
193 |
<div class="wpsg_checkoutblock">
|
|
|
194 |
<label class="wpsg_cv" for="wpsg_cv_<?php echo $c_id; ?>">
|
|
|
195 |
<?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
|
|
|
196 |
<?php if ($c['typ'] == '0') { // Textfeld ?>
|
|
|
197 |
<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 echo wpsg_hspc($this->view['basket']['checkout']['custom'][$c_id]); ?>" />
|
|
|
198 |
<?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
|
|
|
199 |
<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; ?>]">
|
|
|
200 |
<option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
|
|
|
201 |
<?php foreach ((array)$arAuswahl as $a) { ?>
|
|
|
202 |
<option value="<?php echo wpsg_hspc($a); ?>" <?php echo (($a == $this->view['basket']['checkout']['custom'][$c_id])?'selected="selected"':''); ?>><?php echo wpsg_hspc($a); ?></option>
|
|
|
203 |
<?php } ?>
|
|
|
204 |
</select>
|
|
|
205 |
<?php } else if ($c['typ'] == '2') { // Checkbox ?>
|
|
|
206 |
<input type="hidden" name="wpsg[checkout][custom][<?php echo $c_id; ?>]" value="0" />
|
|
|
207 |
<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 echo wpsg_hspc(($this->view['basket']['checkout']['custom'][$c_id] == '1')?'checked="checked"':''); ?> />
|
|
|
208 |
<?php } ?>
|
|
|
209 |
</label>
|
|
|
210 |
</div>
|
|
|
211 |
<?php } } ?>
|
1131 |
daniel |
212 |
<?php } ?>
|
2792 |
daniel |
213 |
<?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
|
|
|
214 |
<div class="wpsg_clear"></div>
|
|
|
215 |
|
|
|
216 |
<?php $this->callMods('checkout_customer_inner'); ?>
|
|
|
217 |
|
|
|
218 |
</div>
|
|
|
219 |
|
1131 |
daniel |
220 |
</div>
|
2792 |
daniel |
221 |
|
1403 |
daniel |
222 |
<?php $this->callMods('checkout_inner_prebutton', array(&$this->view)); ?>
|
|
|
223 |
|
1306 |
daniel |
224 |
<div class="wpsg_clear"></div>
|
2792 |
daniel |
225 |
|
|
|
226 |
<div class="wpsg_box">
|
3444 |
daniel |
227 |
<h2><?php echo __('Bestellkommentar', 'wpsg'); ?></h2>
|
2792 |
daniel |
228 |
<div class="wpsg_inner wpsg_commentblock">
|
2932 |
daniel |
229 |
<textarea name="wpsg[checkout][comment]" id="wpsg_checkout_comment"><?php echo wpsg_hspc($this->view['basket']['checkout']['comment']); ?></textarea>
|
2792 |
daniel |
230 |
</div>
|
1206 |
daniel |
231 |
</div>
|
|
|
232 |
|
2780 |
daniel |
233 |
<div class="wpsg_mandatoryfield_hint">
|
|
|
234 |
<?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
|
|
|
235 |
</div>
|
2792 |
daniel |
236 |
|
1067 |
daniel |
237 |
<br />
|
3444 |
daniel |
238 |
|
2792 |
daniel |
239 |
<?php $this->ClearSessionErrors(); ?>
|
3444 |
daniel |
240 |
|
1580 |
daniel |
241 |
<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" />
|
2803 |
daniel |
242 |
<input type="submit" id="wpsg_checkout2button" class="wpsg_button wpsg_checkout2button" value="<?php echo __('Weiter', 'wpsg'); ?>" name="wpsg_checkout" />
|
1067 |
daniel |
243 |
|
|
|
244 |
<div class="wpsg_clear"></div>
|
2792 |
daniel |
245 |
|
|
|
246 |
<br />
|
|
|
247 |
|
|
|
248 |
</form>
|
1067 |
daniel |
249 |
|
2792 |
daniel |
250 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
251 |
|
|
|
252 |
jQuery(document).ready(function() {
|
|
|
253 |
jQuery('#wpsg_checkout_set_comment').bind('change', function() {
|
|
|
254 |
if (jQuery(this).attr('checked') == true || jQuery(this).attr('checked') == "checked") jQuery('#wpsg_checkout_comment').show();
|
|
|
255 |
else jQuery('#wpsg_checkout_comment').hide();
|
|
|
256 |
} );
|
|
|
257 |
} );
|
|
|
258 |
|
|
|
259 |
/* ]]> */</script>
|
1067 |
daniel |
260 |
|
|
|
261 |
</div>
|