diff options
| author | daniel <noreply@maennchen1.de> | 2026-09-24 12:02:43 +0200 |
|---|---|---|
| committer | daniel <noreply@maennchen1.de> | 2026-09-24 12:02:43 +0200 |
| commit | c84ffa2328951eb26234c1b554a232dd303f0c81 (patch) | |
| tree | 16b78b65075c2382e094c89c2b6aaeb3dc5570c2 /views/mods/mod_onepagecheckout/onepage.phtml | |
| parent | a95de0fa4cd3c617ef08a9679a6c32ae5f676fda (diff) | |
- Feature: SmartCheckout - GARAN Label am Produkt
Diffstat (limited to 'views/mods/mod_onepagecheckout/onepage.phtml')
| -rw-r--r-- | views/mods/mod_onepagecheckout/onepage.phtml | 605 |
1 files changed, 605 insertions, 0 deletions
diff --git a/views/mods/mod_onepagecheckout/onepage.phtml b/views/mods/mod_onepagecheckout/onepage.phtml new file mode 100644 index 0000000..4929524 --- /dev/null +++ b/views/mods/mod_onepagecheckout/onepage.phtml @@ -0,0 +1,605 @@ +<?php + + /** + * Template für den Bestellablauf auf einer Seite + */ + +?> + +<script type="text/javascript">/* <![CDATA[ */ + + jQuery(document).ready(function() { + + <?php if ($this->get_option('wpsg_form_validation') == '1') { ?> + + if (typeof jQuery.validationEngine == "object") + { + + jQuery("#form-step2").validationEngine('attach', {promptPosition : "bottomLeft", scroll: false}); + + jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function(){ + jQuery("#form-step2").validationEngine('detach'); + }); + + } + + <?php } else if ($this->get_option('wpsg_form_validation') == '2') { ?> + + jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>"); + jQuery.validator.addClassRules('validate[required]', { cRequired: true } ); + jQuery("#form-step2").validate( { + ignore: '', + errorClass: 'wpsg_error', + onsubmit: false, + showErrors: function(errorMap, errorList) { + + this.defaultShowErrors(); + + } + } ); + + jQuery('#wpsg_checkout2button').bind('click', function() { + + var bReturn = jQuery('#form-step2').validate().form(); + if (jQuery('#form-step2 input.wpsg_error').length > 0) jQuery('#form-step2 input.wpsg_error')[0].focus(); + return bReturn; + + } ); + + <?php } ?> + + } ); + +/* ]]> */</script> + +<div class="wpsg wpsg_onepagecheckout wpsg_checkout wpsg_checkout2 <?php echo ((isset($_REQUEST['wpsg_basket_ajax']))?'wpsg_basket_ajax':''); ?>"> + + <?php echo $this->writeFrontendMessage(); ?> + + <?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?> + <?php $GLOBALS['step'] = 2; $this->render(WPSG_PATH_VIEW.'/warenkorb/progress.phtml'); ?> + <?php } ?> + <form id="wpsg_basket_form" name="wpsg_basket_form" method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>" enctype="multipart/form-data"> + + <?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 1) { ?> + <?php $this->view['noFormTag'] = true; $this->render(WPSG_PATH_VIEW.'/warenkorb/basket.phtml'); ?> + <?php } ?> + + <div class="wpsg_clear"></div> + + <div class="wpsg_box" id="wpsg_box_payship"> + + <div class="wpsg_inner"> + + <?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?> + <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']) != '') || $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> + <?php } ?> + + <?php if ($this->callMods('checkout_handlePayment') === true) { ?> + + <?php if (!$this->hasMod('wpsg_mod_crefopay')) { ?> + <?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?> + <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']) != '') || $p['preis'] > 0) { ?> + <div id="payment_<?php echo $p['id']; ?>_hint" class="shippay_hint"> + <?php if ($p['preis'] > 0) { ?> + <?php echo __('Gebühr', 'wpsg'); ?>: <?php echo wpsg_ff($p['preis'], $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 } ?> + + <?php } ?> + + <div class="wpsg_clear"></div> + + </div> + + </div> + + <h2><?php echo __('Kundendaten', 'wpsg'); ?></h2> + + <?php if ($this->hasMod('wpsg_mod_kundenverwaltung') && $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutLogin') == '1') { ?> + <div class="onepagecheckout_customer_login" style="border:1px solid #cecece; padding:20px; margin:20px 0;"> + <?php echo wpsg_drawForm_Checkbox('onepagecheckout_customer_login', __('Login für bestehenden Kundenaccount', 'wpsg'), $this->get_option('onepagecheckout_customer_login')); ?> + <div class="onepagecheckout_customer_login_activ" style="display:none; margin:20px 0;"> + <?php $this->callMod('wpsg_mod_kundenverwaltung', 'checkout_login'); ?> + </div> + </div> + <?php } ?> + + <?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')) { ?> + <div class="onepagecheckout_customer_registration" style="border:1px solid #cecece; padding:20px; margin:20px 0;"> + <?php echo wpsg_drawForm_Checkbox('onepagecheckout_customer_registration', __('neuen Kundenaccount registrieren', 'wpsg'), $this->get_option('onepagecheckout_customer_registration')); ?> + <div class="onepagecheckout_customer_registration_activ" style="display:none; margin:20px 0;"> + <?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'checkout_customer_inner'); ?> + </div> + </div> + <?php } ?> + + <div class="onepagecheckout_customer_guest" style="border:1px solid #cecece; padding:20px; margin:20px 0;"> + <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> + <div class="onepagecheckout_customer_guest_activ" style="display:none; margin:20px 0;"> + + <div class="wpsg_box" id="wpsg_box_kundendaten"> + + <div class="wpsg_inner"> + + <?php if ($this->view['pflicht']['firma'] != '2') { ?> + <div class="wpsg_checkoutblock"> + <label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?> + <?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>: + </label> + <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']); ?>" /> + </div> + <?php } ?> + + <?php if ($this->view['pflicht']['anrede'] != '2') { ?> + <div class="wpsg_checkoutblock"> + <label for="wpsg_title"><?php echo __('Anrede', 'wpsg'); ?> + <?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label> + <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]"> + <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option> + <?php $i=0; foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?> + <option value="<?php echo $i; /*wpsg_hspc($t);*/ $i++; ?>" <?php echo (($this->view['basket']['checkout']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option> + <?php } ?> + </select> + </div> + <?php } ?> + + <?php if ($this->view['pflicht']['vname'] != '2') { ?> + <div class="wpsg_checkoutblock"> + <label for="vname" class="wpsg_checkout"><?php echo __("Vorname", "wpsg"); ?> + <?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>: + </label> + <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']); ?>" /> + </div> + <?php } ?> + + <?php if ($this->view['pflicht']['name'] != '2') { ?> + <div class="wpsg_checkoutblock"> + <label for="name" class="wpsg_checkout"><?php echo __("Name", "wpsg"); ?> + <?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>: + </label> + <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']); ?>" /> + </div> + <?php } ?> + + <?php if ($this->view['pflicht']['email'] != '2') { ?> + <div class="wpsg_checkoutblock"> + <label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?> + <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>: + </label> + <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']); ?>" /> + </div> + <?php } ?> + + <?php if (isset($this->view['pflicht']['emailconfirm']) && $this->view['pflicht']['emailconfirm'] == '1') { ?> + <div class="wpsg_checkoutblock"> + <label for="email" class="wpsg_checkout"><?php echo __("E-Mail (Wiederholung)", "wpsg"); ?> + <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>: + </label> + <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']); ?>" /> + </div> + <?php } ?> + + <?php if ($this->view['pflicht']['geb'] != '2') { ?> + <div class="wpsg_checkoutblock"> + <label for="geb" class="wpsg_checkout"><?php echo __('Geburtsdatum (Format: TT.MM.JJJJ)',"wpsg"); ?> + <?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>: + </label> + <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']); ?>" /> + </div> + <?php } ?> + + <?php if ($this->view['pflicht']['fax'] != '2') { ?> + <div class="wpsg_checkoutblock"> + <label for="fax" class="wpsg_checkout"><?php echo __("Fax.", "wpsg"); ?> + <?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>: + </label> + <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']); ?>" /> + </div> + <?php } ?> + + <?php if ($this->view['pflicht']['tel'] != '2') { ?> + <div class="wpsg_checkoutblock"> + <label for="tel" class="wpsg_checkout"><?php echo __("Tel.", "wpsg"); ?> + <?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>: + </label> + <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']); ?>" /> + </div> + <?php } ?> + + <?php if ($this->view['pflicht']['strasse'] != '2') { ?> + + <?php if ($this->view['pflicht']['wpsg_showNr'] === '1') { ?> + + <div class="wpsg_checkoutblock" id="wpsg_streetnr"> + <label for="strasse" class="street wpsg_checkout"><?php echo __('Straße:', 'wpsg'); ?> + <?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?> + <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(wpsg_getStr($this->view['basket']['checkout']['strasse'])); ?>" /> + </label> + <label for="nr" class="nr wpsg_checkout"><?php echo __('Nr:', 'wpsg'); ?> + <?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?> + <input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("nr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="nr" name="wpsg[checkout][nr]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['nr'])); ?>" /> + </label> + </div> + + <?php } else { ?> + + <div class="wpsg_checkoutblock"> + <label for="strasse" class="wpsg_checkout"><?php echo __("Straße Nr.", "wpsg"); ?> + <?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>: + </label> + <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']); ?>" /> + </div> + + <?php } ?> + + <?php } ?> + + <?php if ($this->view['pflicht']['plz'] != '2') { ?> + <div class="wpsg_checkoutblock"> + <label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl", "wpsg"); ?> + <?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>: + </label> + <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']); ?>" /> + </div> + <?php } ?> + + <?php if ($this->view['pflicht']['ort'] != '2') { ?> + <div class="wpsg_checkoutblock"> + <label for="ort" class="wpshopgermany_checkout"><?php echo __("Ort", "wpsg"); ?> + <?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>: + </label> + <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']); ?>" /> + </div> + <?php } ?> + + <?php + $lhidden = ''; + if ($this->hasMod('wpsg_mod_onepagecheckout') && ($this->get_option('wpsg_mod_onepagecheckout_basket') == 1 )) { + $lhidden = 'hidden="hidden"'; + } + ?> + + <?php if ($this->view['pflicht']['land'] != '2') { ?> + <div class="wpsg_checkoutblock" <?php echo $lhidden;?>> + <label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land", "wpsg"); ?> + <?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>: + </label> + <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"> + <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option> + <?php foreach ($this->view['laender'] as $l) { ?> + <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> + <?php } ?> + </select> + </div> + <?php } ?> + + <?php if ($this->view['pflicht']['ustidnr'] != '2') { ?> + <div class="wpsg_checkoutblock"> + <label for="wpsg_ustidnr" class="wpshopgermany_checkout"><?php echo __("UStIdNr.", "wpsg"); ?> + <?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>: + </label> + <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'])); ?>" /> + </div> + <?php } ?> + + <?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?> + <?php if ($this->get_option('wpsg_kundenvariablen_show') == '1') { ?> + <?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?> + <div class="wpsg_checkoutblock"> + <label class="wpsg_cv" for="wpsg_cv_<?php echo $c_id; ?>"> + <?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>: + <?php if ($c['typ'] == '0') { // Textfeld ?> + <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]); ?>" /> + <?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?> + <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; ?>]"> + <option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option> + <?php foreach ((array)$arAuswahl as $a) { ?> + <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> + <?php } ?> + </select> + <?php } else if ($c['typ'] == '2') { // Checkbox ?> + <input type="hidden" name="wpsg[checkout][custom][<?php echo $c_id; ?>]" value="0" /> + <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"':''); ?> /> + <?php } ?> + </label> + </div> + <?php } } ?> + <?php } ?> + <?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?> + + <div class="wpsg_clear"></div> + + <?php /* $this->callMods('checkout_customer_inner'); */ ?> + + <br /> + + <?php $this->callMods('checkout_inner_prebutton', array(&$this->view)); ?> + + <div class="wpsg_box"> + + <h2><?php echo __('Bestellkommentar', 'wpsg'); ?></h2> + + <div class="wpsg_spacer"></div> + + <div class="wpsg_inner wpsg_commentblock"> + <textarea name="wpsg[checkout][comment]" id="wpsg_checkout_comment"><?php echo wpsg_hspc($this->view['basket']['checkout']['comment']); ?></textarea> + </div> + </div> + + <div class="wpsg_mandatoryfield_hint"> + <?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?> + </div> + + </div> + + </div> + + </div> + + </div> + + <br /> + + <?php /* Abfrage Satollo-Newsletter */ ?> + <?php echo $this->callMod('wpsg_mod_nlsatolo', 'checkout_customer_inner'); ?> + + <?php /* Einverständnisabfrage Trusted Shops */ ?> + <?php echo $this->callMod('wpsg_mod_trustedshops', 'checkout_customer_inner'); ?> + + <div class="wpsg_clear"></div> + + <br /> + + <?php $this->ClearSessionErrors(); ?> + + <br /> + + <?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?> + <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" /> + <?php } ?> + <input type="submit" id="wpsg_checkout2button" class="wpsg_button wpsg_checkout2button" value="<?php echo __('Weiter', 'wpsg'); ?>" name="wpsg_checkout" /> + + <div class="wpsg_clear"></div> + + <br /> + + </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('#onepagecheckout_customer_login').bind('change', function() { + + if (jQuery(this).is(':checked')) { + + jQuery('.onepagecheckout_customer_login_activ').show(); + jQuery('.onepagecheckout_customer_guest_label').hide(); + jQuery('.onepagecheckout_customer_registration').hide(); + + } else { + + jQuery('.onepagecheckout_customer_login_activ').hide(); + jQuery('.onepagecheckout_customer_guest_label').show(); + jQuery('.onepagecheckout_customer_registration').show(); + + } + + } ).change(); + + jQuery('#onepagecheckout_customer_registration').bind('change', function() { + + if (jQuery(this).is(':checked')) { + + jQuery('.onepagecheckout_customer_registration_activ, .onepagecheckout_customer_guest_activ').show(); + jQuery('.onepagecheckout_customer_login').hide(); + jQuery('.onepagecheckout_customer_guest_label').hide(); + + } else { + + jQuery('.onepagecheckout_customer_registration_activ, .onepagecheckout_customer_guest_activ').hide(); + jQuery('.onepagecheckout_customer_login').show(); + jQuery('.onepagecheckout_customer_guest_label').show(); + + } + + } ).change(); + + jQuery('#onepagecheckout_customer_guest').bind('change', function() { + + if (jQuery(this).is(':checked')) { + + jQuery('.onepagecheckout_customer_guest_activ').show(); + jQuery('.onepagecheckout_customer_login').hide(); + jQuery('.onepagecheckout_customer_registration').hide(); + + } else { + jQuery('.onepagecheckout_customer_guest_activ').hide(); + jQuery('.onepagecheckout_customer_login').show(); + jQuery('.onepagecheckout_customer_registration').show(); + } + + } ).change(); + + 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)); + + } ); + + jQuery('#wpsg_box_kundendaten input').bind('keypress', function(e) { + + if(e.keyCode == 13) + { + + jQuery('#wpsg_checkout2button').click(); + return false; + + } + + } ); + + jQuery('.shippay input[type="radio"]').bind('change', function() { + + jQuery(this).parents('.shippay_wrap').find('.shippay').removeClass('wpsg_hover'); + + if (jQuery(this).prop("checked")) + { + + jQuery(this).parents('.shippay').addClass('wpsg_hover'); + + } + + wpsg_showPaymentHint(); + wpsg_showShippingHint(); + + } ); + + jQuery('.shippay input[type="radio"]:checked').change(); + jQuery('.shippay').bind('click', function(e) { + + if (jQuery(this).hasClass('wpsg_hover')) return true; + + jQuery(this).find('input[type="radio"]').attr("checked", "checked"); + jQuery(this).find('input[type="radio"]').change(); + + } ); + + <?php if ($this->get_option('wpsg_form_validation') == '1') { ?> + if (typeof jQuery.validationEngine == "object") + { + + jQuery("#wpsg_basket_form").validationEngine('attach', { promptPosition : "bottomLeft", scroll: false } ); + + jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function() { + jQuery("#wpsg_basket_form").validationEngine('detach'); + }); + + } + <?php } else if ($this->get_option('wpsg_form_validation') == '2') { ?> + + jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>"); + jQuery.validator.addClassRules('validate[required]', { cRequired: true } ); + jQuery("#wpsg_basket_form").validate( { + ignore: '', + errorClass: 'wpsg_error', + onsubmit: false, + showErrors: function(errorMap, errorList) { + + this.defaultShowErrors(); + var errors = this.numberOfInvalids(); + + } + } ); + + jQuery('.wpsg_checkout2button').bind('click', function() { + + var bReturn = jQuery('#wpsg_basket_form').validate().form(); + if (jQuery('#wpsg_basket_form input.wpsg_error').length > 0) jQuery('#wpsg_basket_form input.wpsg_error')[0].focus(); + return bReturn; + + } ); + + <?php } ?> + + land = <?php if (wpsg_isSizedInt($this->view['basket']['checkout']['land'])) echo $this->view['basket']['checkout']['land']; + else echo $this->get_option('wpsg_defaultland'); ?>; + + // Land der Rechnungsadresse setzen + //land = jQuery('#set_land').val(); + jQuery('#wpsg_land').val(land); + //alert('land: ' + land); + + } ); + + /* ]]> */</script> + +</div>
\ No newline at end of file |
