summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaniel <noreply@maennchen1.de>2026-09-24 10:49:44 +0200
committerdaniel <noreply@maennchen1.de>2026-09-24 10:49:44 +0200
commit19a8938fa3b41a6c6ed1e15c20586f860f4a637b (patch)
tree353780fc47092183e6825bde59435208377bdb38
parentca5fd820c76aa73f64c9ca7966bac32a89ac9248 (diff)
- Feature: PHP 8.3 Kompatibilität
- Feature: SmartCheckout - Ersatz für EinSeitenCheckout - Feature: Optik im Frontend an moderne Themes angepasst
-rw-r--r--views/css/admin.css16
-rw-r--r--views/css/frontend.css48
-rw-r--r--views/mods/mod_creditcard/paymenthint.phtml52
-rw-r--r--views/mods/mod_deliverytime/settings_edit.phtml18
-rw-r--r--views/mods/mod_discount/settings_edit.phtml130
-rw-r--r--views/mods/mod_fuellmenge/priceinfo.phtml7
-rw-r--r--views/mods/mod_kundenverwaltung/checkout_login.phtml2
-rw-r--r--views/mods/mod_onepagecheckout/onepage.phtml605
-rw-r--r--views/mods/mod_onepagecheckout/settings_edit.phtml11
-rw-r--r--views/mods/mod_ordercondition/overview_top.phtml5
-rw-r--r--views/mods/mod_orderupload/basket_row_upload_target.phtml2
-rw-r--r--views/mods/mod_ordervars/checkout_inner_prebutton.phtml8
-rw-r--r--views/mods/mod_paypalapi/paypalplus.phtml15
-rw-r--r--views/mods/mod_paypalapi/settings_edit.phtml447
-rw-r--r--views/mods/mod_productvars/renderTemplate.phtml64
-rw-r--r--views/mods/mod_revocation/wp_footer.phtml10
-rw-r--r--views/mods/mod_revocation/wpsg_producttemplate_afterButton.phtml4
-rw-r--r--views/mods/mod_revocation/wpsg_revocation.css133
-rw-r--r--views/mods/mod_scaleprice/product_bottom.phtml4
-rw-r--r--views/mods/mod_smartcheckout/checkout.phtml492
-rw-r--r--views/mods/mod_smartcheckout/settings_edit.phtml25
-rw-r--r--views/order/product_table.phtml14
-rw-r--r--views/warenkorb/basket.phtml25
-rw-r--r--views/warenkorb/overview.phtml11
-rw-r--r--views/warenkorb/progress.phtml23
25 files changed, 1075 insertions, 1096 deletions
diff --git a/views/css/admin.css b/views/css/admin.css
index d41b510..acb2381 100644
--- a/views/css/admin.css
+++ b/views/css/admin.css
@@ -468,9 +468,19 @@
/* Modul Rabatt */
.wpsg_mod_discount_hirarchieorder input { display:none; }
.wpsg_mod_discount_hirarchieorder li { border:1px solid #C4C4C4; border-radius:5px; width:100%; display:inline-block; margin-bottom:5px; padding:5px 5px 5px 5px; font-size:12px; cursor:move; }
-.wpsg_mod_discount_seriescol { width:33%; float:left; font-size:12px; line-height:30px; }
-.wpsg_mod_discount_seriescol input { width:70%; line-height:20px; float:right; }
-.wpsg_mod_discount_seriescol:nth-child(2) strong { width:70%; float:right; }
+.wpsg_mod_discount_series_wrap { width:100%; padding:10px 0; clear:both; }
+.wpsg_mod_discount_series_wrap h4 { margin:0 0 10px 0; }
+#wpsg-bs .wpsg_mod_discount_series_wrap .info { margin-top:20px; }
+.wpsg_mod_discount_series { width:100%; margin-bottom:15px; }
+.wpsg_mod_discount_series th, .wpsg_mod_discount_series td { vertical-align:middle !important; }
+.wpsg_mod_discount_series .col_value { width:45%; }
+.wpsg_mod_discount_series .col_rabatt { width:35%; }
+.wpsg_mod_discount_series .col_typ { width:15%; }
+.wpsg_mod_discount_series .col_action { width:5%; min-width:40px; text-align:center; }
+.wpsg_mod_discount_series .col_value input { width:calc(100% - 50px); text-align:right; }
+.wpsg_mod_discount_series .col_rabatt input { width:100%; max-width:none; text-align:right; }
+.wpsg_mod_discount_series .col_typ select { width:100%; max-width:none; text-align:left; text-align-last:left; }
+.wpsg_mod_discount_series .wpsg_mod_discount_series_first { display:inline-block; width:calc(100% - 50px); padding:0 7px; text-align:right; box-sizing:border-box; }
#beschreibung_ifr { height:500px; }
diff --git a/views/css/frontend.css b/views/css/frontend.css
index b24f229..c94ece2 100644
--- a/views/css/frontend.css
+++ b/views/css/frontend.css
@@ -66,6 +66,40 @@ input.wpsg_error { border-color:red !important; border:1px solid red; }
&:hover > .tooltip { opacity:1; pointer-events:all; z-index:1; }
}
}
+
+/*
+ * Shop-Container mit "alignwide" in Themes mit Inhaltskarte (z.B. Kadence "content-style-boxed")
+ *
+ * Das Theme zieht alignwide-Blöcke mit negativen Außenabständen bis an den Rand der Karte, der Shop verliert dadurch
+ * den Innenabstand der Karte. Die Container bleiben deshalb dort innerhalb des Innenabstands.
+ */
+html body.content-style-boxed .entry-content .wpsg.alignwide { margin-left:0; margin-right:0; width:auto; max-width:100%; }
+
+/*
+ * GARAN Label: Absicherung gegen Theme-Regeln
+ *
+ * Das Label ist auf feste Pixelmaße mit content-box gebaut. Viele Themes setzen global
+ * box-sizing:border-box (auch für ::before/::after), eigene Zeilenhöhen sowie Farbe und
+ * Unterstreichung für Links im Inhaltsbereich (z.B. Astra: ".ast-single-post .entry-content a").
+ * "html body" hebt die Spezifität über solche Theme-Selektoren, ohne !important zu brauchen.
+ */
+html body .wpsg_product_garan_wrap,
+html body .wpsg_product_garan_wrap *,
+html body .wpsg_product_garan_wrap *::before,
+html body .wpsg_product_garan_wrap *::after { box-sizing:content-box; }
+html body .wpsg_product_garan_wrap { line-height:1; }
+html body .wpsg_product_garan_wrap a.wpsg_product_garan,
+html body .wpsg_product_garan_wrap a.wpsg_product_garan:hover,
+html body .wpsg_product_garan_wrap a.wpsg_product_garan:focus,
+html body .wpsg_product_garan_wrap a.wpsg_product_garan:visited { color:#000000; background-color:#FFFFFF; text-decoration:none; line-height:30px; box-shadow:none; }
+html body .wpsg_product_garan_wrap a.wpsg_product_garan * { color:inherit; text-decoration:none; letter-spacing:normal; text-transform:none; }
+html body .wpsg_product_garan_wrap a.wpsg_product_garan > .years,
+html body .wpsg_product_garan_wrap a.wpsg_product_garan > .title { display:inline-block; height:30px; line-height:30px; vertical-align:top; }
+html body .wpsg_product_garan_wrap a.wpsg_product_garan .tooltip,
+html body .wpsg_product_garan_wrap a.wpsg_product_garan .tooltip .inner,
+html body .wpsg_product_garan_wrap a.wpsg_product_garan .tooltip .flexline { line-height:1.2; }
+html body .wpsg_product_garan_wrap a.wpsg_product_garan .tooltip .trans_wrap { line-height:1.4; }
+html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max-width:none; height:auto; margin:0; border:0; box-shadow:none; }
/* Basket Widget */
.wpsg_basket_widget .wpshopgermany_linktokasse { float:right; margin-top:1rem; }
@@ -320,6 +354,15 @@ input.wpsg_error { border-color:red !important; border:1px solid red; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_mod_productvariants_product_wrap { margin-top:0.75em; margin-bottom:0.75em; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_mod_productvariants_product_wrap select { width:100%; box-sizing:border-box; padding:0.75em; line-height:1.5em; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_informationarea { margin-top:1.5em; margin-bottom:1.5em; }
+/* Produktvariablen im Produkttemplate: Beschriftung über dem Feld, Felder über die volle Breite */
+.wpsg_productform .wpsg_mod_productvars { display:flex; flex-direction:column; gap:0.75em; margin-top:0.75em; margin-bottom:0.75em; }
+.wpsg_productform .wpsg_mod_productvars_row { display:flex; flex-direction:column; gap:0.3em; }
+.wpsg_productform .wpsg_produkt_wrapper .wpsg_mod_productvars_label { font-weight:normal; font-size:0.9em; opacity:0.75; }
+.wpsg_productform .wpsg_mod_productvars_input { width:100%; box-sizing:border-box; padding:0.6em 0.75em; line-height:1.5em; border:1px solid rgba(127, 127, 127, 0.35); border-radius:3px; background:none; color:inherit; font:inherit; }
+.wpsg_productform textarea.wpsg_mod_productvars_input { resize:vertical; }
+.wpsg_productform .wpsg_produkt_wrapper .wpsg_mod_productvars_check { display:flex; align-items:center; gap:0.5em; font-weight:normal; cursor:pointer; }
+.wpsg_productform .wpsg_mod_productvars_check input[type="checkbox"] { flex:0 0 auto; margin:0; }
+.wpsg_productform .wpsg_mod_productvars .wpsg_required { color:#b3261e; margin-left:0.15em; }
.wpsg_productform .wpsg_produkt_wrapper label { font-weight:bold; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_buttonarea input[type="text"] { box-sizing:border-box; padding:0.7em; line-height:1.5em; font-size:1rem; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_buttonarea input[type="submit"] { font-family:inherit; cursor:pointer; float:right; box-sizing: border-box; padding:0.25rem 1rem; line-height:1.5em; font-size:inherit; border:1px solid black; }
@@ -541,11 +584,6 @@ input.wpsg_error { border-color:red !important; border:1px solid red; }
.wpsg_progress span.done:after { content:" "; background-color:#C5C5C5; width:100%; height:10px; display:block; top:0px; position:absolute; }
.wpsg_progress span.current:after { width:50%; }
-/* Modul "EinSeitenCheckout */
-.onepagecheckout_customer_guest_activ .wpsg_mod_shippingadress h2,
-.onepagecheckout_customer_guest_activ .wpsg_mod_shippingadress .wpsg_spacer { display:none; }
-.onepagecheckout_customer_guest_activ .wpsg_mod_shippingadress .wpsg_inner { margin-bottom:20px; }
-
/* Modul "CrowdFunding" */
.wpsg_mod_funding_progress .wpsg_mod_funding_state { border:1px solid #C5C5C5; margin-bottom:1rem; box-sizing:border-box; width:100%; height:25px; line-height:25px; }
.wpsg_mod_funding_progress .wpsg_mod_funding_state > .bar { width:90%; float:left; height:100%; display:table; }
diff --git a/views/mods/mod_creditcard/paymenthint.phtml b/views/mods/mod_creditcard/paymenthint.phtml
index b13e45f..bfece1b 100644
--- a/views/mods/mod_creditcard/paymenthint.phtml
+++ b/views/mods/mod_creditcard/paymenthint.phtml
@@ -54,24 +54,24 @@
<?php echo __('Gültigkeit', 'wpsg'); ?><span class="wpsg_required">*</span>:
<!-- <input class="<?php echo ((in_array("mod_creditcard_gueltig", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_creditcard[gueltig]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['wpsg_mod_creditcard']['gueltig'])); ?>" /> -->
+ <?php
+
+ // Monat und Jahr werden serverseitig ausgegeben, damit die Auswahl auch ohne Script (z.B. im SmartCheckout) funktioniert
+ $strMonth = wpsg_getStr($this->view['wpsg_mod_creditcard']['gueltigm'], '12');
+ $strYear = wpsg_getStr($this->view['wpsg_mod_creditcard']['gueltigj']);
+
+ ?>
<select name="wpsg_mod_creditcard[gueltigm]" id="wpsg_mod_creditcard_gueltigm"
class="<?php echo ((in_array('mod_creditcard_gueltigm', (array)$this->view['error']))?'wpsg_error':''); ?>" >
- <option value="01">01</option>
- <option value="02">02</option>
- <option value="03">03</option>
- <option value="04">04</option>
- <option value="05">05</option>
- <option value="06">06</option>
- <option value="07">07</option>
- <option value="08">08</option>
- <option value="09">09</option>
- <option value="10">10</option>
- <option value="11">11</option>
- <option value="12" selected="selected">12</option>
+ <?php for ($m = 1; $m <= 12; $m++) { $strValue = sprintf('%02d', $m); ?>
+ <option value="<?php echo esc_attr($strValue); ?>" <?php echo (($strValue === $strMonth)?'selected="selected"':''); ?>><?php echo esc_html($strValue); ?></option>
+ <?php } ?>
</select>
<select name="wpsg_mod_creditcard[gueltigj]" id="wpsg_mod_creditcard_gueltigj"
class="<?php echo ((in_array('mod_creditcard_gueltigj', (array)$this->view['error']))?'wpsg_error':''); ?>" >
-
+ <?php for ($y = intval(date('Y')); $y < intval(date('Y')) + 6; $y++) { $strValue = strval($y); ?>
+ <option value="<?php echo esc_attr($strValue); ?>" <?php echo (($strValue === $strYear)?'selected="selected"':''); ?>><?php echo esc_html($strValue); ?></option>
+ <?php } ?>
</select>
</label>
</div>
@@ -86,32 +86,6 @@
<script>
-jQuery(document).ready(function() {
- var gm,
- gj,
- sel1,
- i,
- dt,
- garr;
-
- gm="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['gueltigm']); ?>";
- gj="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['gueltigj']); ?>";
-
- dt = new Date();
- dt = dt.getFullYear();
- sel1 = document.getElementById("wpsg_mod_creditcard_gueltigj");
- for (i = 0; i < 6; i++) {
- newopt = new Option(dt + i, dt + i, false, false);
- sel1.options[i] = newopt;
- }
- //gm = '06';
- //gj = '2018';
- jQuery('#wpsg_mod_creditcard_gueltigm').val(gm);
- jQuery('#wpsg_mod_creditcard_gueltigj').val(gj);
-
-
-});
-
//alert(jQuery("#wpsg_mod_creditcard_knr").length);
//$(document).on("input", "#wpsg_mod_creditcard_knr", function () {
jQuery("#wpsg_mod_creditcard_knr").on("input", function () {
diff --git a/views/mods/mod_deliverytime/settings_edit.phtml b/views/mods/mod_deliverytime/settings_edit.phtml
index 974e871..a63bed2 100644
--- a/views/mods/mod_deliverytime/settings_edit.phtml
+++ b/views/mods/mod_deliverytime/settings_edit.phtml
@@ -62,15 +62,19 @@
jQuery(document).ready(function() {
- jQuery('#wpsg_mod_deliverytime_mode_select_values').bind('input', function() {
+ // Auswahl "Standard Lieferzeit" aus allen eingetragenen Lieferzeiten neu aufbauen (Index = Wert, wie serverseitig)
+ jQuery('#wpsg_mod_deliverytime_mode_select_values').bind('input', function() {
- val = jQuery('#wpsg_mod_deliverytime_mode_select_values').val();
- arVal = val.split(',');
- jQuery('#wpsg_mod_deliverytime_mode_select_default').empty();
- for (i = 0; i < 3; i++) {
- jQuery('#wpsg_mod_deliverytime_mode_select_default').append('<option value=' + i + '>' + arVal[i] + '</option>');
+ var arVal = jQuery('#wpsg_mod_deliverytime_mode_select_values').val().split(',');
+ var el_select = jQuery('#wpsg_mod_deliverytime_mode_select_default');
+
+ el_select.empty();
+
+ for (var i = 0; i < arVal.length; i++) {
+
+ el_select.append(jQuery('<option></option>').val(i).text(arVal[i].trim()));
}
-
+
} );
jQuery('#wpsg_mod_deliverytime_mode').bind('change', function() {
diff --git a/views/mods/mod_discount/settings_edit.phtml b/views/mods/mod_discount/settings_edit.phtml
index 33e6d02..d2b645c 100644
--- a/views/mods/mod_discount/settings_edit.phtml
+++ b/views/mods/mod_discount/settings_edit.phtml
@@ -57,29 +57,83 @@
</div>
<div role="tabpanel" class="tab-pane" id="tab2">
- <?php echo wpsg_drawForm_TextStart(); ?>
- <div class="wpsg_mod_discount_seriescol"><strong><?php echo __('Bestellwert', 'wpsg'); ?></strong></div>
- <div class="wpsg_mod_discount_seriescol"><strong><?php echo __('Rabatt', 'wpsg'); ?></strong></div>
- <div class="wpsg_mod_discount_seriescol"><strong><?php echo __('Löschen', 'wpsg'); ?></strong></div>
- <div class="wpsg_clear"></div>
-
- <div class="wpsg_mod_discount_seriescol"><?php echo __('ab', 'wpsg').' '.wpsg_ff(0, $this->get_option('wpsg_currency')); ?></div>
- <div class="wpsg_mod_discount_seriescol wpsg_mod_discount_seriescol_sub"><input type="text" name="value[0][rabatt]" value="<?php echo wpsg_ff(@$this->view['data'][0]['rabatt']); ?>" /></div>
- <div class="wpsg_clear"></div>
-
- <?php foreach ($this->view['data'] as $k => $v) { if ($k > 0) { ?>
- <div class="wpsg_mod_discount_seriescol"><?php echo __('ab', 'wpsg').' '.wpsg_ff($v['value'], $this->get_option('wpsg_currency')); ?></div>
- <div class="wpsg_mod_discount_seriescol wpsg_mod_discount_seriescol_sub"><input type="text" name="value[<?php echo $k; ?>][rabatt]" value="<?php echo wpsg_ff($v['rabatt']); ?>" /></div>
- <div class="wpsg_mod_discount_seriescol wpsg_mod_discount_seriescol_sub"><input type="checkbox" name="value[<?php echo $k; ?>][del]" value="1" style="width:20px; float:left; margin-left:20px;"/></div>
- <input type="hidden" name="value[<?php echo $k; ?>][value]" value="<?php echo $v['value']; ?>" /><div class="wpsg_clear"></div>
- <?php } } ?>
-
- <div class="wpsg_mod_discount_seriescol"><?php echo __('ab', 'wpsg'); ?> <input type="text" name="neu[value]" value="" /> <?php echo $this->get_option('wpsg_currency'); ?></div>
- <div class="wpsg_mod_discount_seriescol"><input type="text" name="neu[rabatt]" value="" /></div>
- <a id="wkrimage" style="margin-left:5px;" class="wpsg-glyphicon glyphicon glyphicon-plus" alt="Hinzufügen"></a>
- <div class="wpsg_clear"></div>
- <?php echo wpsg_drawForm_TextEnd(__('Staffelung', 'wpsg'), array('noP' => true)); ?>
-
+ <?php
+
+ $strCurrency = (string)$this->get_option('wpsg_currency');
+ $arSeries = (array)($this->view['wpsg_mod_discount']['series']??[]);
+
+ ?>
+
+ <?php /* Die Staffel nutzt die volle Breite des Reiters, daher ohne Label-Spalte von wpsg_drawForm_TextStart() */ ?>
+ <div class="wpsg_mod_discount_series_wrap">
+
+ <h4><?php echo esc_html__('Staffelung', 'wpsg'); ?></h4>
+
+ <table class="table table-body-striped wpsg_mod_discount_series" id="wpsg_mod_discount_series">
+ <thead>
+ <tr>
+ <th class="col_value"><?php echo esc_html__('ab Bestellwert', 'wpsg'); ?></th>
+ <th class="col_rabatt"><?php echo esc_html__('Rabatt', 'wpsg'); ?></th>
+ <th class="col_typ"><?php echo esc_html__('Art', 'wpsg'); ?></th>
+ <th class="col_action"></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach (array_values($arSeries) as $index => $row) { ?>
+ <tr class="wpsg_mod_discount_series_row">
+ <td class="col_value">
+ <?php if ($index === 0) { ?>
+ <input type="hidden" name="wpsg_mod_discount_series[0][value]" value="0" />
+ <span class="wpsg_mod_discount_series_first"><?php echo esc_html(wpsg_ff(0)); ?></span> <?php echo esc_html($strCurrency); ?>
+ <?php } else { ?>
+ <input type="text" name="wpsg_mod_discount_series[<?php echo intval($index); ?>][value]" value="<?php echo esc_attr(wpsg_ff($row['value'])); ?>" /> <?php echo esc_html($strCurrency); ?>
+ <?php } ?>
+ </td>
+ <td class="col_rabatt">
+ <input type="text" name="wpsg_mod_discount_series[<?php echo intval($index); ?>][rabatt]" value="<?php echo esc_attr(wpsg_ff($row['rabatt'])); ?>" />
+ </td>
+ <td class="col_typ">
+ <select name="wpsg_mod_discount_series[<?php echo intval($index); ?>][typ]">
+ <option value="fix" <?php echo (($row['typ'] === 'fix')?'selected="selected"':''); ?>><?php echo esc_html($strCurrency); ?></option>
+ <option value="percent" <?php echo (($row['typ'] === 'percent')?'selected="selected"':''); ?>>%</option>
+ </select>
+ </td>
+ <td class="col_action">
+ <?php if ($index > 0) { ?>
+ <a href="#" class="wpsg-glyphicon glyphicon glyphicon-trash wpsg_mod_discount_series_remove" title="<?php echo esc_attr__('Staffel entfernen', 'wpsg'); ?>"></a>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ </table>
+
+ <?php /* Vorlage für neue Zeilen, __INDEX__ wird per JavaScript ersetzt */ ?>
+ <script type="text/html" id="wpsg_mod_discount_series_template">
+ <tr class="wpsg_mod_discount_series_row">
+ <td class="col_value">
+ <input type="text" name="wpsg_mod_discount_series[__INDEX__][value]" value="" /> <?php echo esc_html($strCurrency); ?>
+ </td>
+ <td class="col_rabatt">
+ <input type="text" name="wpsg_mod_discount_series[__INDEX__][rabatt]" value="" />
+ </td>
+ <td class="col_typ">
+ <select name="wpsg_mod_discount_series[__INDEX__][typ]">
+ <option value="fix"><?php echo esc_html($strCurrency); ?></option>
+ <option value="percent">%</option>
+ </select>
+ </td>
+ <td class="col_action">
+ <a href="#" class="wpsg-glyphicon glyphicon glyphicon-trash wpsg_mod_discount_series_remove" title="<?php echo esc_attr__('Staffel entfernen', 'wpsg'); ?>"></a>
+ </td>
+ </tr>
+ </script>
+
+ <button type="button" class="button" id="wpsg_mod_discount_series_add"><span class="glyphicon glyphicon-plus"></span> <?php echo esc_html__('Staffel hinzufügen', 'wpsg'); ?></button>
+
+ <p class="info"><?php echo esc_html__('Maßgeblich ist der Bestellwert des Warenkorbs. Es gilt die höchste erreichte Staffel, die Reihenfolge der Zeilen spielt keine Rolle und wird beim Speichern sortiert. Leere Zeilen werden ignoriert, Änderungen werden erst mit "Speichern" übernommen.', 'wpsg'); ?></p>
+
+ </div>
</div>
<div role="tabpanel" class="tab-pane" id="tab3">
@@ -106,8 +160,24 @@
wpsg_switchUniversalDiscount();
} );
- jQuery('#wkrimage').bind('click', function() {
- jQuery('#submit').trigger('click');
+ // Staffel des Warenkorbrabattes: Zeilen hinzufügen und entfernen, gespeichert wird mit dem Formular
+ var wpsg_mod_discount_series_index = jQuery('#wpsg_mod_discount_series tbody tr').length;
+
+ jQuery('#wpsg_mod_discount_series_add').on('click', function() {
+
+ var strRow = jQuery('#wpsg_mod_discount_series_template').html().replace(/__INDEX__/g, wpsg_mod_discount_series_index++);
+
+ jQuery('#wpsg_mod_discount_series tbody').append(strRow);
+ jQuery('#wpsg_mod_discount_series tbody tr:last input:first').trigger('focus');
+
+ } );
+
+ jQuery('#wpsg_mod_discount_series').on('click', '.wpsg_mod_discount_series_remove', function() {
+
+ jQuery(this).closest('tr').remove();
+
+ return false;
+
} );
wpsg_switchUniversalDiscount();
@@ -117,10 +187,12 @@
function wpsg_mod_discount_restoredefaulthierarchie()
{
- jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .general'));
- jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .product'));
- jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .productgroup'));
- jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .customer'));
+ var el_list = jQuery('ul.wpsg_mod_discount_hirarchieorder');
+
+ el_list.append(el_list.children('.general'));
+ el_list.append(el_list.children('.product'));
+ el_list.append(el_list.children('.productgroup'));
+ el_list.append(el_list.children('.customer'));
return false;
diff --git a/views/mods/mod_fuellmenge/priceinfo.phtml b/views/mods/mod_fuellmenge/priceinfo.phtml
index f7a6365..35067c0 100644
--- a/views/mods/mod_fuellmenge/priceinfo.phtml
+++ b/views/mods/mod_fuellmenge/priceinfo.phtml
@@ -2,6 +2,9 @@
/**
* Anzeige der Grundpreisinformationen im Produkttemplate
+ *
+ * Der Grundpreis wird wie alle Preise mit zwei Nachkommastellen formatiert, Füllmenge und
+ * Bezugsgröße bleiben ohne erzwungene Nachkommastellen (100 g, 1 kg).
*/
?>
@@ -11,7 +14,7 @@
<span class="wpsg_mod_fuellmenge_info"><?php echo wpsg_translate(
__('#1# (#2# / #3#)', 'wpsg'),
wpsg_ff($this->view['wpsg_mod_fuellmenge']['fmenge'], $this->view['wpsg_mod_fuellmenge']['feinheit'], true, 0),
- wpsg_ff($this->view['wpsg_mod_fuellmenge']['fmenge_preis'], $this->get_option('wpsg_currency'), true, 0),
+ wpsg_ff($this->view['wpsg_mod_fuellmenge']['fmenge_preis'], $this->get_option('wpsg_currency')),
wpsg_ff($this->view['wpsg_mod_fuellmenge']['referencevalue'],$this->view['wpsg_mod_fuellmenge']['referenceunit'], true, 0)
); ?></span>
@@ -19,7 +22,7 @@
<div class="wpsg_mod_fuellmenge_info"><?php echo wpsg_translate(
__('(#1# / #2#)', 'wpsg'),
- wpsg_ff($this->view['wpsg_mod_fuellmenge']['fmenge_preis'], $this->get_option('wpsg_currency'), true, 0),
+ wpsg_ff($this->view['wpsg_mod_fuellmenge']['fmenge_preis'], $this->get_option('wpsg_currency')),
wpsg_ff($this->view['wpsg_mod_fuellmenge']['referencevalue'], $this->view['wpsg_mod_fuellmenge']['referenceunit'], true, 0)
); ?></div>
diff --git a/views/mods/mod_kundenverwaltung/checkout_login.phtml b/views/mods/mod_kundenverwaltung/checkout_login.phtml
index e7ab23a..1f16a93 100644
--- a/views/mods/mod_kundenverwaltung/checkout_login.phtml
+++ b/views/mods/mod_kundenverwaltung/checkout_login.phtml
@@ -38,7 +38,7 @@
<div class="wpsg_checkoutblock">
<a class="wpsg_pwdvergessen_link" href="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getPwdVergessenURL'); ?>">Passwort vergessen?</a>
- <input type="submit" class="wpsg_button wpsg_mod_kundenverwaltung_login" value="<?php echo __('Login', 'wpsg'); ?>" name="wpsg_mod_kundenverwaltung_login" />
+ <input type="submit" class="wpsg_button wpsg_mod_kundenverwaltung_login" value="<?php echo __('Login', 'wpsg'); ?>" name="wpsg_mod_kundenverwaltung_login" formnovalidate />
</div>
<div class="wpsg_clearer"></div><br />
diff --git a/views/mods/mod_onepagecheckout/onepage.phtml b/views/mods/mod_onepagecheckout/onepage.phtml
deleted file mode 100644
index b02f25c..0000000
--- a/views/mods/mod_onepagecheckout/onepage.phtml
+++ /dev/null
@@ -1,605 +0,0 @@
-<?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
diff --git a/views/mods/mod_onepagecheckout/settings_edit.phtml b/views/mods/mod_onepagecheckout/settings_edit.phtml
index e225915..8a09d96 100644
--- a/views/mods/mod_onepagecheckout/settings_edit.phtml
+++ b/views/mods/mod_onepagecheckout/settings_edit.phtml
@@ -1,9 +1,14 @@
<?php
/**
- * Template für die Einstellungen des "OnepageCheckout" Moduls
+ * Einstellungen des ehemaligen EinSeitenCheckouts: nur noch der Hinweis auf den SmartCheckout
*/
+ $url_smartcheckout = $this->view['wpsg_mod_onepagecheckout']['url_smartcheckout'];
+
?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_onepagecheckout_page', __('Seite für den "EinSeitenCheckout"', 'wpsg'), $this->view['arPages'], $this->get_option('wpsg_mod_onepagecheckout_page'), array('help' => 'wpsg_mod_onepagecheckout_page')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_onepagecheckout_basket', __('Warenkorb in EinSeitenCheckout integrieren', 'wpsg'), $this->get_option('wpsg_mod_onepagecheckout_basket'), array('help' => 'wpsg_mod_onepagecheckout_basket')); ?> \ No newline at end of file
+<div class="alert alert-warning">
+ <p><strong><?php echo esc_html__('Den EinSeitenCheckout gibt es nicht mehr.', 'wpsg'); ?></strong></p>
+ <p><?php echo esc_html__('Der Bestellablauf auf einer Seite wird jetzt vom neuen SmartCheckout übernommen: Warenkorb, Kundendaten, Versand, Zahlung und Zusammenfassung auf einer Seite, serverseitig berechnet. Dieses Modul hat keine Funktion mehr und kann deaktiviert werden.', 'wpsg'); ?></p>
+ <p><a class="button" href="<?php echo esc_url($url_smartcheckout); ?>"><?php echo esc_html__('Zu den Einstellungen des SmartCheckouts', 'wpsg'); ?></a></p>
+</div>
diff --git a/views/mods/mod_ordercondition/overview_top.phtml b/views/mods/mod_ordercondition/overview_top.phtml
index 3ad7b70..1c3d832 100644
--- a/views/mods/mod_ordercondition/overview_top.phtml
+++ b/views/mods/mod_ordercondition/overview_top.phtml
@@ -7,11 +7,14 @@
// Die Mindestlänge, damit der Text in einer Scrollbox angezeigt wird
$minLength = 1000;
+ // Bereits akzeptierte Bestellbedingungen, z.B. nach der Rückkehr von PayPal
+ $arAccepted = $this->getAcceptedConditions($this->view['basket']??null);
+
?>
<?php foreach ($this->view['wpsg_mod_ordercondition']['data'] as $oc) { ?>
<div class="wpsg_agb" id="wpsg_agb_<?php echo $oc['id']; ?>">
<label>
- <input type="checkbox" value="1" name="wpsg_mod_ordercondition[<?php echo $oc['id']; ?>]" required />
+ <input type="checkbox" value="1" name="wpsg_mod_ordercondition[<?php echo $oc['id']; ?>]" required <?php echo ((in_array(strval($oc['id']), $arAccepted['ordercondition'], true))?'checked="checked"':''); ?> />
<?php if (strlen($oc['text']) < $minLength) { ?>
<?php echo $oc['text']; ?>
<?php } else { ?>
diff --git a/views/mods/mod_orderupload/basket_row_upload_target.phtml b/views/mods/mod_orderupload/basket_row_upload_target.phtml
index d5e1022..12d567c 100644
--- a/views/mods/mod_orderupload/basket_row_upload_target.phtml
+++ b/views/mods/mod_orderupload/basket_row_upload_target.phtml
@@ -36,6 +36,6 @@
<?php if ($this->view['wpsg_mod_orderupload']['oProduct']->wpsg_mod_orderupload_set > sizeof($this->view['wpsg_mod_orderupload']['arFiles'])) { ?>
<input type="file" id="wpsg_mod_orderupload_<?php echo $this->view['wpsg_mod_orderupload']['product_index']; ?>_file" name="wpsg_mod_orderupload[<?php echo $this->view['wpsg_mod_orderupload']['product_index']; ?>]" multiple="multiple" />
- <input type="button" onclick="return wpsg_mod_orderupload_upload(<?php echo $this->view['wpsg_mod_orderupload']['product_index']; ?>, <?php echo $this->view['wpsg_mod_orderupload']['product_id']; ?>);" id="wpsg_mod_orderupload_<?php echo $this->view['wpsg_mod_orderupload']['product_index']; ?>_button" value="<?php echo __('Hochladen', 'wpsg'); ?>" />
+ <input type="button" data-sc-autoupload="1" onclick="return wpsg_mod_orderupload_upload(<?php echo $this->view['wpsg_mod_orderupload']['product_index']; ?>, <?php echo $this->view['wpsg_mod_orderupload']['product_id']; ?>);" id="wpsg_mod_orderupload_<?php echo $this->view['wpsg_mod_orderupload']['product_index']; ?>_button" value="<?php echo __('Hochladen', 'wpsg'); ?>" />
<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_ordervars/checkout_inner_prebutton.phtml b/views/mods/mod_ordervars/checkout_inner_prebutton.phtml
index fb109a3..cbcc59e 100644
--- a/views/mods/mod_ordervars/checkout_inner_prebutton.phtml
+++ b/views/mods/mod_ordervars/checkout_inner_prebutton.phtml
@@ -13,11 +13,11 @@
<div class="wpsg_inner">
<?php foreach ((array)$this->view['wpsg_mod_ordervars']['data'] as $ov) { ?>
- <div class="wpsg_checkoutblock">
+ <div class="wpsg_checkoutblock<?php echo (($ov['typ'] == '3')?' wpsg_mod_ordervars_check':''); ?>">
<?php if ($ov['typ'] == '3') { // Checkbox ?>
<label class="wpshopgermany_checkout" for="wpsg_mod_ordervars_<?php echo $ov['id']; ?>">
<input type="hidden" value="0" name="wpsg_mod_ordervars[<?php echo $ov['id']; ?>]" />
- <input class="<?php echo ((in_array("wpsg_mod_ordervars_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_mod_ordervars_<?php echo $ov['id']; ?>" <?php echo ((wpsg_getStr($_SESSION['wpsg']['wpsg_mod_ordervars'][$ov['id']]) == '1')?'checked="checked"':''); ?> type="checkbox" value="1" name="wpsg_mod_ordervars[<?php echo $ov['id']; ?>]" /><?php echo $this->callMod('wpsg_mod_ordervars', 'getNameById', array($ov['id'])); ?><?php if ($ov['pflicht'] == '1') { ?><span class="wpsg_required">*</span><?php } ?>
+ <input class="<?php echo ((in_array("wpsg_mod_ordervars_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_mod_ordervars_<?php echo $ov['id']; ?>" <?php echo ((wpsg_getStr($_SESSION['wpsg']['wpsg_mod_ordervars'][$ov['id']]) == '1')?'checked="checked"':''); ?> type="checkbox" value="1" name="wpsg_mod_ordervars[<?php echo $ov['id']; ?>]" <?php echo (($ov['pflicht'] == '1')?'required':''); ?> /><span class="wpsg_mod_ordervars_text"><?php echo $this->callMod('wpsg_mod_ordervars', 'getNameById', array($ov['id'])); ?><?php if ($ov['pflicht'] == '1') { ?><span class="wpsg_required">*</span><?php } ?></span>
</label>
<?php } else { ?>
<label class="wpshopgermany_checkout" for="wpsg_mod_ordervars_<?php echo $ov['id']; ?>">
@@ -26,14 +26,14 @@
</label>
<div class="wpsg_mod_ordervars_field">
<?php if ($ov['typ'] == '1') { // Auswahlfeld ?>
- <select class="<?php echo ((in_array("wpsg_mod_ordervars_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?> <?php echo (($ov['pflicht'] == '1')?'validate[required]':''); ?>" name="wpsg_mod_ordervars[<?php echo $ov['id']; ?>]" id="wpsg_mod_ordervars_<?php echo $ov['id']; ?>">
+ <select class="<?php echo ((in_array("wpsg_mod_ordervars_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?> <?php echo (($ov['pflicht'] == '1')?'validate[required]':''); ?>" name="wpsg_mod_ordervars[<?php echo $ov['id']; ?>]" id="wpsg_mod_ordervars_<?php echo $ov['id']; ?>" <?php echo (($ov['pflicht'] == '1')?'required':''); ?>>
<option value=""><?php echo __('Bitte wählen', 'wpsg'); ?></option>
<?php $ov['auswahl'] = explode('|', $ov['auswahl']); foreach ((array)$ov['auswahl'] as $option) { ?>
<option <?php echo ((wpsg_getStr($_SESSION['wpsg']['wpsg_mod_ordervars'][$ov['id']]) == $option)?'selected="selected"':''); ?> value="<?php echo wpsg_hspc($option); ?>"><?php echo wpsg_hspc($option); ?></option>
<?php } ?>
</select>
<?php } else if ($ov['typ'] == '2') { // Textfeld ?>
- <input class="<?php echo ((in_array("wpsg_mod_ordervars_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?> <?php echo (($ov['pflicht'] == '1')?'validate[required]':''); ?>" type="text" name="wpsg_mod_ordervars[<?php echo $ov['id']; ?>]" value="<?php echo wpsg_hspc(wpsg_getStr($_SESSION['wpsg']['wpsg_mod_ordervars'][$ov['id']])); ?>" id="wpsg_mod_ordervars_<?php echo $ov['id']; ?>" />
+ <input class="<?php echo ((in_array("wpsg_mod_ordervars_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?> <?php echo (($ov['pflicht'] == '1')?'validate[required]':''); ?>" type="text" name="wpsg_mod_ordervars[<?php echo $ov['id']; ?>]" value="<?php echo wpsg_hspc(wpsg_getStr($_SESSION['wpsg']['wpsg_mod_ordervars'][$ov['id']])); ?>" id="wpsg_mod_ordervars_<?php echo $ov['id']; ?>" <?php echo (($ov['pflicht'] == '1')?'required':''); ?> />
<?php } ?>
</div>
<?php } ?>
diff --git a/views/mods/mod_paypalapi/paypalplus.phtml b/views/mods/mod_paypalapi/paypalplus.phtml
index 541da34..a2edc85 100644
--- a/views/mods/mod_paypalapi/paypalplus.phtml
+++ b/views/mods/mod_paypalapi/paypalplus.phtml
@@ -13,21 +13,6 @@
"language": "de_DE",
"preselection": "<?php echo (($_SESSION['wpsg']['checkout']['payment'] == '10')?'paypal':'none')?>",
"country": "DE",
- <?php if ($this->hasMod('wpsg_mod_onepagecheckout') && wpsg_get_the_id() == $this->get_option('wpsg_mod_onepagecheckout_page')) { ?>
- "onContinue": function(event) {
-
- jQuery('#wpsg_basket_form').attr('target', 'wpsg_hiddenTarget');
- jQuery('#wpsg_basket_form').append('<input name="wpsg_checkout" value="ppp" id="wpsg_hidden_action" />');
- jQuery('#wpsg_basket_form').append('<input name="wpsg[checkout][payment]" value="ppp" id="wpsg_hidden_payment" />');
- jQuery('#wpsg_basket_form').trigger('submit');
- jQuery('#wpsg_basket_form').removeAttr('target');
- jQuery('#wpsg_hidden_action').remove();
- jQuery('#wpsg_hidden_payment').remove();
-
- //PAYPAL.apps.PPP.doCheckout();
-
- },
- <?php } ?>
<?php if (@$this->view['wpsg_order_done'] !== true) { ?>
"onLoad": function() { if (typeof wpsg_mod_paypalapi_load == 'function') wpsg_mod_paypalapi_load(); },
"buttonLocation": "outside",
diff --git a/views/mods/mod_paypalapi/settings_edit.phtml b/views/mods/mod_paypalapi/settings_edit.phtml
index 510ba2d..1a55494 100644
--- a/views/mods/mod_paypalapi/settings_edit.phtml
+++ b/views/mods/mod_paypalapi/settings_edit.phtml
@@ -1,223 +1,224 @@
-<?php
-
- /**
- * Template für die Einstellungen des PayPal API Moduls
- */
-
-?>
-
-<?php echo wpsg_drawForm_Select('wpsg_mod_paypalapi_version', __('API Version', 'wpsg'), ['v1' => 'V1', 'v2' => 'V2'], $this->get_option('wpsg_mod_paypalapi_version'), []); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_clientid', __('Client ID', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_clientid'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_clientid', 'hint' => wpsg_translate(__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'))); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_secret', __('Secret', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_secret'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_secret', 'hint' => wpsg_translate(__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'))); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_sandbox', __('Sandbox', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_sandbox'), array('help' => 'wpsg_mod_paypal_sandbox')); ?>
-
-<div class="wpsg_mod_sandbox_layer" style="display:none;">
-
- <?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_sandbox_clientid', __('Client ID (Sandbox)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_sandbox_clientid'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_clientid')); ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_sandbox_secret', __('Secret (Sandbox)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_sandbox_secret'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_secret')); ?>
-
- <br />
-
-</div>
-
-<br />
-
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_currency', __('Währungscode (Standard: EUR)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_currency'), array('help' => 'wpsg_mod_paypal_currency')); ?>
-
-<br />
-
-<?php echo wpsg_drawForm_Input('', __('WebHook URL', 'wpsg'), $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'webHook', array(), true), array('readonly' => true, 'help' => 'wpsg_mod_paypal_webhook_url')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_create', __('Beim speichern versuchen den WebHook anzumelden.', 'wpsg'), 0, array('labelright' => true, 'noDoubleDot' => true, 'help' => 'wpsg_mod_paypal_createwebhook')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_webhook_log', __('WebHook Anfragen protokollieren', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_webhook_log'), array('labelright' => true)); ?>
-<div class="layer_wpsg_mod_paypalapi_webhook_log layer_wpsg_mod_paypalapi_webhook_log_1">
- <?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_webhook_logfile', '', $this->get_option('wpsg_mod_paypalapi_webhook_logfile'), array('hint' => __('Absoluter Pfad zur Protokolldatei, Schreibrechte beachten.', 'wpsg'))); ?>
-</div>
-
-<br />
-
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_paypalapi_gebuehr')), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_paypalapi_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_paypalapi_mwst'), array('help' => 'wpsg_shippay_mwst')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
-
-<br />
-
-<?php echo wpsg_drawForm_Link('wpsg_mod_paypalapi_link', __('Stornierung bei Statuswechsel', 'wpsg'),
- __('Bearbeiten', 'wpsg'), array('help' => 'wpsg_mod_paypalapi_link', 'class' => 'wpsg_mod_paypalapi_stornostate')); ?>
-
-
-<div class="wpsg_mod_paypalapi_stornostate_layer" style="display:none;">
-
- <?php foreach ($this->arStatus as $status_id => $status_label) { $arStornoStatus = (array)$this->get_option('wpsg_mod_paypalapi_stornostate'); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_stornostate['.$status_id.']', __($status_label, 'wpsg'), wpsg_getInt($arStornoStatus[$status_id]), array('labelright' => true)); ?>
- <?php } ?>
-
- <br />
-
-</div>
-
-<br />
-
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_aktiv', __('PayPal für neue Bestellungen erlauben', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_aktiv'), array('help' => 'wpsg_shippay_activ')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_plus_aktiv', __('PayPal Plus aktivieren', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_plus_aktiv'), array('help' => 'wpsg_mod_paypalapi_plus_aktiv')); ?>
-<?php /*
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_giropay_aktiv', __('GiroPay aktivieren', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_giropay_aktiv'), array('help' => 'wpsg_mod_paypalapi_giropay_aktiv ')); ?>
-
-<div id="wpsg_mod_paypalapi_giropay_aktiv_layer">
- <?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_giropay_name', __('Bezeichnung (GiroPay)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_giropay_name'), array('help' => 'wpsg_shippay_name')); ?>
- <?php echo wpsg_drawForm_Textarea('wpsg_mod_paypalapi_giropay_hint', __('Hinweistext (GiroPay)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_giropay_hint'), array('help' => 'wpsg_shippay_hint')); ?>
-</div>
-*/ ?>
-
-<div class="wpsg_mod_paypalapi_plus_aktiv_layer wpsg_mod_paypalapi_plus_aktiv_layer_1">
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_plus_basket', __('Zahlungsauswahl im Warenkorb', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_plus_basket'), array('help' => 'wpsg_mod_paypalapi_plus_basket')); ?>
-</div>
-
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress', __('PayPal Express aktivieren (Button im Warenkorb)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress'), array('help' => 'wpsg_mod_paypalapi_paypalexpress')); ?>
-<div class="wpsg_mod_paypalapi_plus_aktiv">
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress_forceSSL', __('SSL für ReturnURL erzwingen', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_forceSSL'), array('help' => 'wpsg_mod_paypalapi_paypalexpress_forceSSL')); ?>
- <?php echo wpsg_drawForm_Input('', __('Return URL', 'wpsg'), $this->getUrl(
- wpsg_ShopController::URL_BASKET,
- 'wpsg_mod_paypalapi',
- 'startPayPalExpress',
- array(),
- ((wpsg_isSizedInt($this->get_option('wpsg_mod_paypalapi_paypalexpress_forceSSL')))?true:false)
- ), array('readonly' => true, 'help' => 'wpsg_mod_paypalapi_paypalexpress_returnurl')); ?>
- <br />
-</div>
-
-<div class="wpsg_mod_paypalapi_plus_inaktiv">
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_autostart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_autostart'), array('help' => 'wpsg_shippay_paystart')); ?>
-</div>
-
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress_details', __('Warenkorbdetails übertragen', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_details'), array('help' => 'wpsg_mod_paypalapi_paypalexpress_details')); ?>
-
-<br />
-
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_experience_label', __('Bezeichnung im PayPal Zahlungsinterface', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_experience_label'), array('help' => 'wpsg_mod_paypalapi_experience_label', 'hint' => __('Max. 127 Zeichen', 'wpsg'))); ?>
-
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_experience_logo', __('URL für ein Logo im PayPal Zahlungsinterface', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_experience_logo'), array('help' => 'wpsg_mod_paypalapi_experience_logo', 'hint' => __('gif|png|jpg, Max. 190x60', 'wpsg'))); ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_paypalapi_experience_locale_code', __('Sprache im PayPal Zahlungsinterface', 'wpsg'), array(
- 'DE' => __('Deutsch', 'wpsg'),
- 'GB' => __('Englisch', 'wpsg'),
- 'FR' => __('Französisch', 'wpsg')
-), $this->get_option('wpsg_mod_paypalapi_experience_locale_code'), array('help' => 'wpsg_mod_paypalapi_experience_locale_code')); ?>
-<br />
-
-
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_paypalexpress_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_name'), array('help' => 'wpsg_shippay_name')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_paypalexpress_subject', __('Betreff für Zahlung', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_subject'), array('help' => 'wpsg_mod_paypal_subject')); ?>
-<?php echo wpsg_drawForm_Textarea('wpsg_mod_paypalapi_plus_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_plus_hint'), array('help' => 'wpsg_shippay_hint')); ?>
-
-<script>
-
- jQuery(document).ready(function() {
-
- var wpsg_mod_paypalapi_version = jQuery('#wpsg_mod_paypalapi_version').val();
-
- jQuery('#wpsg_mod_paypalapi_version').on('change', function() {
-
- if (jQuery(this).val() === 'v2' && wpsg_mod_paypalapi_version === 'v1') {
-
- alert('<?php echo __('Beim Wechseln von V1 auf V2 sollte eine neue App im PayPal Developer Intervace angelegt werden.', 'wpsg'); ?>');
-
- }
-
- });
-
- jQuery('#wpsg_mod_paypalapi_plus_aktiv').on('change', function() {
-
- jQuery('.wpsg_mod_paypalapi_plus_aktiv_layer').hide();
- jQuery('.wpsg_mod_paypalapi_plus_aktiv_layer_' + jQuery(this).val()).show();
-
- } ).change();
-
- jQuery('#wpsg_mod_paypalapi_webhook_log').bind('change', function() {
-
- jQuery('.layer_wpsg_mod_paypalapi_webhook_log').hide();
-
- if (jQuery(this).is(':checked'))
- {
-
- jQuery('.layer_wpsg_mod_paypalapi_webhook_log_1').show();
-
- }
-
- } ).change();
-
- jQuery('#wpsg_mod_paypalapi_sandbox').bind('change', function() {
-
- if (jQuery(this).is(':checked')) jQuery('.wpsg_mod_sandbox_layer').show();
- else jQuery('.wpsg_mod_sandbox_layer').hide();
-
- } ).change();
-
- jQuery('#wpsg_mod_paypalapi_plus_aktiv').bind('change', function() {
-
- if (jQuery(this).is(':checked'))
- {
-
- jQuery('.wpsg_mod_paypalapi_plus_aktiv').show();
- jQuery('.wpsg_mod_paypalapi_plus_inaktiv').hide();
-
- }
- else
- {
-
- jQuery('.wpsg_mod_paypalapi_plus_aktiv').hide();
- jQuery('.wpsg_mod_paypalapi_plus_inaktiv').show();
-
- }
-
- } ).change();
-
- jQuery('.wpsg_mod_paypalapi_stornostate').bind('click', function() {
-
- jQuery('.wpsg_mod_paypalapi_stornostate_layer').toggle();
-
- if (jQuery('.wpsg_mod_paypalapi_stornostate_layer').is(':visible')) jQuery(this).html('<?php echo __('Ausblenden', 'wpsg'); ?>');
- else jQuery(this).html('<?php echo __('Bearbeiten', 'wpsg'); ?>');
-
- return false;
-
- } );
-
- } );
-
- const el_wpsg_mod_paypalapi_plus_aktiv = document.getElementById('wpsg_mod_paypalapi_plus_aktiv');
- //const el_wpsg_mod_paypalapi_giropay_aktiv = document.getElementById('wpsg_mod_paypalapi_giropay_aktiv');
- //const el_wpsg_mod_paypalapi_giropay_aktiv_layer = document.getElementById('wpsg_mod_paypalapi_giropay_aktiv_layer');
-
- el_wpsg_mod_paypalapi_plus_aktiv.addEventListener('change', event => {
-
- if (el_wpsg_mod_paypalapi_plus_aktiv.checked) {
-
- //el_wpsg_mod_paypalapi_giropay_aktiv.disabled = true;
- //el_wpsg_mod_paypalapi_giropay_aktiv.checked = false;
-
- } else {
-
- //el_wpsg_mod_paypalapi_giropay_aktiv.disabled = false;
-
- }
-
- });
-
- /*
- el_wpsg_mod_paypalapi_giropay_aktiv.addEventListener('change', event => {
-
- if (el_wpsg_mod_paypalapi_giropay_aktiv.checked) {
-
- el_wpsg_mod_paypalapi_giropay_aktiv_layer.style.display = 'block';
-
- } else {
-
- el_wpsg_mod_paypalapi_giropay_aktiv_layer.style.display = 'none';
-
- }
-
- });*/
-
- el_wpsg_mod_paypalapi_plus_aktiv.dispatchEvent(new Event('change'));
- //el_wpsg_mod_paypalapi_giropay_aktiv.dispatchEvent(new Event('change'));
-
-</script> \ No newline at end of file
+<?php
+
+ /**
+ * Template für die Einstellungen des PayPal API Moduls
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_paypalapi_version', __('API Version', 'wpsg'), ['v1' => 'V1', 'v2' => 'V2'], $this->get_option('wpsg_mod_paypalapi_version'), []); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_clientid', __('Client ID', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_clientid'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_clientid', 'hint' => wpsg_translate(__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'))); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_secret', __('Secret', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_secret'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_secret', 'hint' => wpsg_translate(__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'))); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_sandbox', __('Sandbox', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_sandbox'), array('help' => 'wpsg_mod_paypal_sandbox')); ?>
+
+<div class="wpsg_mod_sandbox_layer" style="display:none;">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_sandbox_clientid', __('Client ID (Sandbox)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_sandbox_clientid'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_clientid')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_sandbox_secret', __('Secret (Sandbox)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_sandbox_secret'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_secret')); ?>
+
+ <br />
+
+</div>
+
+<br />
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_currency', __('Währungscode (Standard: EUR)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_currency'), array('help' => 'wpsg_mod_paypal_currency')); ?>
+
+<br />
+
+<?php echo wpsg_drawForm_Input('', __('WebHook URL', 'wpsg'), $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'webHook', array(), true), array('readonly' => true, 'help' => 'wpsg_mod_paypal_webhook_url')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_create', __('Beim speichern versuchen den WebHook anzumelden.', 'wpsg'), 0, array('labelright' => true, 'noDoubleDot' => true, 'help' => 'wpsg_mod_paypal_createwebhook')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_webhook_log', __('WebHook Anfragen protokollieren', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_webhook_log'), array('labelright' => true)); ?>
+<div class="layer_wpsg_mod_paypalapi_webhook_log layer_wpsg_mod_paypalapi_webhook_log_1">
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_webhook_logfile', '', $this->get_option('wpsg_mod_paypalapi_webhook_logfile'), array('hint' => __('Absoluter Pfad zur Protokolldatei, Schreibrechte beachten.', 'wpsg'))); ?>
+</div>
+
+<br />
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_paypalapi_gebuehr')), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_paypalapi_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_paypalapi_mwst'), array('help' => 'wpsg_shippay_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
+
+<br />
+
+<?php echo wpsg_drawForm_Link('wpsg_mod_paypalapi_link', __('Stornierung bei Statuswechsel', 'wpsg'),
+ __('Bearbeiten', 'wpsg'), array('help' => 'wpsg_mod_paypalapi_link', 'class' => 'wpsg_mod_paypalapi_stornostate')); ?>
+
+
+<div class="wpsg_mod_paypalapi_stornostate_layer" style="display:none;">
+
+ <?php foreach ($this->arStatus as $status_id => $status_label) { $arStornoStatus = (array)$this->get_option('wpsg_mod_paypalapi_stornostate'); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_stornostate['.$status_id.']', __($status_label, 'wpsg'), wpsg_getInt($arStornoStatus[$status_id]), array('labelright' => true)); ?>
+ <?php } ?>
+
+ <br />
+
+</div>
+
+<br />
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_aktiv', __('PayPal für neue Bestellungen erlauben', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_aktiv'), array('help' => 'wpsg_shippay_activ')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_plus_aktiv', __('PayPal Plus aktivieren', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_plus_aktiv'), array('help' => 'wpsg_mod_paypalapi_plus_aktiv')); ?>
+<?php /*
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_giropay_aktiv', __('GiroPay aktivieren', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_giropay_aktiv'), array('help' => 'wpsg_mod_paypalapi_giropay_aktiv ')); ?>
+
+<div id="wpsg_mod_paypalapi_giropay_aktiv_layer">
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_giropay_name', __('Bezeichnung (GiroPay)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_giropay_name'), array('help' => 'wpsg_shippay_name')); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_paypalapi_giropay_hint', __('Hinweistext (GiroPay)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_giropay_hint'), array('help' => 'wpsg_shippay_hint')); ?>
+</div>
+*/ ?>
+
+<div class="wpsg_mod_paypalapi_plus_aktiv_layer wpsg_mod_paypalapi_plus_aktiv_layer_1">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_plus_basket', __('Zahlungsauswahl im Warenkorb', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_plus_basket'), array('help' => 'wpsg_mod_paypalapi_plus_basket')); ?>
+</div>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress', __('PayPal Express aktivieren (Button im Warenkorb)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress'), array('help' => 'wpsg_mod_paypalapi_paypalexpress')); ?>
+<div class="wpsg_mod_paypalapi_plus_aktiv">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress_forceSSL', __('SSL für ReturnURL erzwingen', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_forceSSL'), array('help' => 'wpsg_mod_paypalapi_paypalexpress_forceSSL')); ?>
+ <?php echo wpsg_drawForm_Input('', __('Return URL', 'wpsg'), $this->getUrl(
+ wpsg_ShopController::URL_BASKET,
+ 'wpsg_mod_paypalapi',
+ 'startPayPalExpress',
+ array(),
+ ((wpsg_isSizedInt($this->get_option('wpsg_mod_paypalapi_paypalexpress_forceSSL')))?true:false)
+ ), array('readonly' => true, 'help' => 'wpsg_mod_paypalapi_paypalexpress_returnurl')); ?>
+ <br />
+</div>
+
+<div class="wpsg_mod_paypalapi_plus_inaktiv">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_autostart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_autostart'), array('help' => 'wpsg_shippay_paystart')); ?>
+</div>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress_details', __('Warenkorbdetails übertragen', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_details'), array('help' => 'wpsg_mod_paypalapi_paypalexpress_details')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_preauth', __('Zahlung vor Bestellabschluss autorisieren', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_preauth'), array('hint' => __('Der Button „zahlungspflichtig bestellen“ lautet bei PayPal „Mit PayPal bezahlen“. Der Kunde autorisiert die Zahlung bei PayPal und schließt die Bestellung danach zahlungspflichtig ab, erst dann wird der Betrag eingezogen. Ändert sich die Bestellung, muss erneut autorisiert werden. Nur mit API Version v2.', 'wpsg'))); ?>
+
+<br />
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_experience_label', __('Bezeichnung im PayPal Zahlungsinterface', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_experience_label'), array('help' => 'wpsg_mod_paypalapi_experience_label', 'hint' => __('Max. 127 Zeichen', 'wpsg'))); ?>
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_experience_logo', __('URL für ein Logo im PayPal Zahlungsinterface', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_experience_logo'), array('help' => 'wpsg_mod_paypalapi_experience_logo', 'hint' => __('gif|png|jpg, Max. 190x60', 'wpsg'))); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_paypalapi_experience_locale_code', __('Sprache im PayPal Zahlungsinterface', 'wpsg'), array(
+ 'DE' => __('Deutsch', 'wpsg'),
+ 'GB' => __('Englisch', 'wpsg'),
+ 'FR' => __('Französisch', 'wpsg')
+), $this->get_option('wpsg_mod_paypalapi_experience_locale_code'), array('help' => 'wpsg_mod_paypalapi_experience_locale_code')); ?>
+<br />
+
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_paypalexpress_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_name'), array('help' => 'wpsg_shippay_name')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_paypalexpress_subject', __('Betreff für Zahlung', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_subject'), array('help' => 'wpsg_mod_paypal_subject')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_paypalapi_plus_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_plus_hint'), array('help' => 'wpsg_shippay_hint')); ?>
+
+<script>
+
+ jQuery(document).ready(function() {
+
+ var wpsg_mod_paypalapi_version = jQuery('#wpsg_mod_paypalapi_version').val();
+
+ jQuery('#wpsg_mod_paypalapi_version').on('change', function() {
+
+ if (jQuery(this).val() === 'v2' && wpsg_mod_paypalapi_version === 'v1') {
+
+ alert('<?php echo __('Beim Wechseln von V1 auf V2 sollte eine neue App im PayPal Developer Intervace angelegt werden.', 'wpsg'); ?>');
+
+ }
+
+ });
+
+ jQuery('#wpsg_mod_paypalapi_plus_aktiv').on('change', function() {
+
+ jQuery('.wpsg_mod_paypalapi_plus_aktiv_layer').hide();
+ jQuery('.wpsg_mod_paypalapi_plus_aktiv_layer_' + jQuery(this).val()).show();
+
+ } ).change();
+
+ jQuery('#wpsg_mod_paypalapi_webhook_log').bind('change', function() {
+
+ jQuery('.layer_wpsg_mod_paypalapi_webhook_log').hide();
+
+ if (jQuery(this).is(':checked'))
+ {
+
+ jQuery('.layer_wpsg_mod_paypalapi_webhook_log_1').show();
+
+ }
+
+ } ).change();
+
+ jQuery('#wpsg_mod_paypalapi_sandbox').bind('change', function() {
+
+ if (jQuery(this).is(':checked')) jQuery('.wpsg_mod_sandbox_layer').show();
+ else jQuery('.wpsg_mod_sandbox_layer').hide();
+
+ } ).change();
+
+ jQuery('#wpsg_mod_paypalapi_plus_aktiv').bind('change', function() {
+
+ if (jQuery(this).is(':checked'))
+ {
+
+ jQuery('.wpsg_mod_paypalapi_plus_aktiv').show();
+ jQuery('.wpsg_mod_paypalapi_plus_inaktiv').hide();
+
+ }
+ else
+ {
+
+ jQuery('.wpsg_mod_paypalapi_plus_aktiv').hide();
+ jQuery('.wpsg_mod_paypalapi_plus_inaktiv').show();
+
+ }
+
+ } ).change();
+
+ jQuery('.wpsg_mod_paypalapi_stornostate').bind('click', function() {
+
+ jQuery('.wpsg_mod_paypalapi_stornostate_layer').toggle();
+
+ if (jQuery('.wpsg_mod_paypalapi_stornostate_layer').is(':visible')) jQuery(this).html('<?php echo __('Ausblenden', 'wpsg'); ?>');
+ else jQuery(this).html('<?php echo __('Bearbeiten', 'wpsg'); ?>');
+
+ return false;
+
+ } );
+
+ } );
+
+ const el_wpsg_mod_paypalapi_plus_aktiv = document.getElementById('wpsg_mod_paypalapi_plus_aktiv');
+ //const el_wpsg_mod_paypalapi_giropay_aktiv = document.getElementById('wpsg_mod_paypalapi_giropay_aktiv');
+ //const el_wpsg_mod_paypalapi_giropay_aktiv_layer = document.getElementById('wpsg_mod_paypalapi_giropay_aktiv_layer');
+
+ el_wpsg_mod_paypalapi_plus_aktiv.addEventListener('change', event => {
+
+ if (el_wpsg_mod_paypalapi_plus_aktiv.checked) {
+
+ //el_wpsg_mod_paypalapi_giropay_aktiv.disabled = true;
+ //el_wpsg_mod_paypalapi_giropay_aktiv.checked = false;
+
+ } else {
+
+ //el_wpsg_mod_paypalapi_giropay_aktiv.disabled = false;
+
+ }
+
+ });
+
+ /*
+ el_wpsg_mod_paypalapi_giropay_aktiv.addEventListener('change', event => {
+
+ if (el_wpsg_mod_paypalapi_giropay_aktiv.checked) {
+
+ el_wpsg_mod_paypalapi_giropay_aktiv_layer.style.display = 'block';
+
+ } else {
+
+ el_wpsg_mod_paypalapi_giropay_aktiv_layer.style.display = 'none';
+
+ }
+
+ });*/
+
+ el_wpsg_mod_paypalapi_plus_aktiv.dispatchEvent(new Event('change'));
+ //el_wpsg_mod_paypalapi_giropay_aktiv.dispatchEvent(new Event('change'));
+
+</script>
diff --git a/views/mods/mod_productvars/renderTemplate.phtml b/views/mods/mod_productvars/renderTemplate.phtml
index 8c349af..ba8cf58 100644
--- a/views/mods/mod_productvars/renderTemplate.phtml
+++ b/views/mods/mod_productvars/renderTemplate.phtml
@@ -2,33 +2,51 @@
/**
* Template für die Integration der Produktvariablen in das Template
+ *
+ * Die Beschriftung steht über dem Feld, Checkboxen stehen mit ihrem Text in einer Zeile.
+ * Pflichtfelder tragen required, der leere Platzhalter der Auswahl wird serverseitig zu not_set.
+ * Die Klassen wpsg_mod_productvars_row, _label und _input bleiben für bestehende Anpassungen im Theme erhalten.
*/
-?>
+ $template_index = intval($this->view['wpsg_mod_productvars']['template_index']??0);
+?>
<div class="wpsg_mod_productvars">
<?php foreach ($this->view['wpsg_mod_productvars']['data'] as $pv) { ?>
- <div class="wpsg_mod_productvars_row">
- <div class="wpsg_mod_productvars_label">
- <?php echo __($pv['name'], 'wpsg'); ?> <?php if ($pv['pflicht'] == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
- </div>
- <div class="wpsg_mod_productvars_input">
- <?php if ($pv['typ'] == '1') { // Auswahlfeld ?>
- <select name="wpsg_mod_productvars[<?php echo $pv['id']; ?>]">
- <option value="not_set"><?php echo __('Bitte wählen', 'wpsg'); ?></option>
- <?php foreach ((array)$pv['auswahl'] as $option) { ?>
- <option <?php echo ((wpsg_isSizedString($pv['value'], wpsg_hspc($option)))?'selected="selected"':''); ?> value="<?php echo wpsg_hspc($option); ?>"><?php echo wpsg_hspc($option); ?></option>
- <?php } ?>
- </select>
- <?php } else if ($pv['typ'] == '2') { // Textfeld ?>
- <input type="text" name="wpsg_mod_productvars[<?php echo $pv['id']; ?>]" value="<?php echo wpsg_hspc(wpsg_getStr($pv['value'])); ?>" />
- <?php } else if ($pv['typ'] == '3') { // Checkbox ?>
- <input type="hidden" value="0" name="wpsg_mod_productvars[<?php echo $pv['id']; ?>]" />
- <input <?php echo ((wpsg_isSizedString($pv['value'], '1'))?'checked="checked"':''); ?> type="checkbox" value="1" name="wpsg_mod_productvars[<?php echo $pv['id']; ?>]" />
- <?php } else if ($pv['typ'] == '4') { // Mehrzeiliges Textfeld ?>
- <textarea rows="5" name="wpsg_mod_productvars[<?php echo $pv['id']; ?>]"><?php echo wpsg_hspc(wpsg_getStr($pv['value'])); ?></textarea>
- <?php } ?>
- </div>
+ <?php
+
+ $field_name = 'wpsg_mod_productvars['.$pv['id'].']';
+ $field_id = 'wpsg_mod_productvars_'.$template_index.'_'.$pv['id'];
+ $value = wpsg_getStr($pv['value']);
+ $bRequired = ($pv['pflicht'] == '1');
+ $strRequired = (($bRequired)?'<span class="wpsg_required" aria-hidden="true">*</span>':'');
+
+ ?>
+ <div class="wpsg_mod_productvars_row wpsg_mod_productvars_typ<?php echo intval($pv['typ']); ?>">
+
+ <?php if ($pv['typ'] == '3') { // Checkbox ?>
+ <label class="wpsg_mod_productvars_check">
+ <input type="hidden" value="0" name="<?php echo esc_attr($field_name); ?>" />
+ <input <?php echo (($value === '1')?'checked="checked"':''); ?> type="checkbox" value="1" name="<?php echo esc_attr($field_name); ?>"<?php echo (($bRequired)?' required':''); ?> />
+ <span><?php echo wpsg_hspc(__($pv['name'], 'wpsg')); ?><?php echo $strRequired; ?></span>
+ </label>
+ <?php } else { ?>
+ <label class="wpsg_mod_productvars_label" for="<?php echo esc_attr($field_id); ?>"><?php echo wpsg_hspc(__($pv['name'], 'wpsg')); ?><?php echo $strRequired; ?></label>
+
+ <?php if ($pv['typ'] == '1') { // Auswahlfeld ?>
+ <select class="wpsg_mod_productvars_input" id="<?php echo esc_attr($field_id); ?>" name="<?php echo esc_attr($field_name); ?>"<?php echo (($bRequired)?' required':''); ?>>
+ <option value=""><?php echo __('Bitte wählen', 'wpsg'); ?></option>
+ <?php foreach ((array)$pv['auswahl'] as $option) { ?>
+ <option <?php echo (($value === wpsg_hspc($option))?'selected="selected"':''); ?> value="<?php echo wpsg_hspc($option); ?>"><?php echo wpsg_hspc($option); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($pv['typ'] == '4') { // Mehrzeiliges Textfeld ?>
+ <textarea class="wpsg_mod_productvars_input" id="<?php echo esc_attr($field_id); ?>" rows="3" name="<?php echo esc_attr($field_name); ?>"<?php echo (($bRequired)?' required':''); ?>><?php echo wpsg_hspc($value); ?></textarea>
+ <?php } else { // Textfeld ?>
+ <input class="wpsg_mod_productvars_input" type="text" id="<?php echo esc_attr($field_id); ?>" name="<?php echo esc_attr($field_name); ?>" value="<?php echo wpsg_hspc($value); ?>"<?php echo (($bRequired)?' required':''); ?> />
+ <?php } ?>
+ <?php } ?>
+
</div>
<?php } ?>
-</div> \ No newline at end of file
+</div>
diff --git a/views/mods/mod_revocation/wp_footer.phtml b/views/mods/mod_revocation/wp_footer.phtml
index 9e7a404..bc3878e 100644
--- a/views/mods/mod_revocation/wp_footer.phtml
+++ b/views/mods/mod_revocation/wp_footer.phtml
@@ -204,14 +204,14 @@
};
- // Button am Produkt
- document.querySelectorAll('.wpsg_revocation_product_button').forEach(el => {
+ // Button am Produkt, delegiert, damit auch nachträglich gerenderte Buttons (z.B. im SmartCheckout) reagieren
+ document.addEventListener('click', event => {
- el.addEventListener('click', event => {
+ const el = event.target.closest('.wpsg_revocation_product_button');
- open_dialog(el);
+ if (el === null) return;
- });
+ open_dialog(el);
});
diff --git a/views/mods/mod_revocation/wpsg_producttemplate_afterButton.phtml b/views/mods/mod_revocation/wpsg_producttemplate_afterButton.phtml
index f09d3be..dd3921e 100644
--- a/views/mods/mod_revocation/wpsg_producttemplate_afterButton.phtml
+++ b/views/mods/mod_revocation/wpsg_producttemplate_afterButton.phtml
@@ -18,9 +18,9 @@
<?php if (\wpsg_ShopController::getShop()->get_option('wpsg_mod_revocation_view_product') === '1') { ?>
- <div class="wpsg_revocation_product_button" data-product_anr="<?php echo \wpsg_ShopController::getShop()->view['data']['anr']; ?>">
+ <div class="wpsg_revocation_product_button" data-product_anr="<?php echo \esc_attr((string)(\wpsg_ShopController::getShop()->view['data']['anr']??'')); ?>">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true"><title>Vertrag widerrufen</title><path d="M13.5,8H12V13L16.28,15.54L17,14.33L13.5,12.25V8M13,3A9,9 0 0,0 4,12H1L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3" /></svg>
- <p class="wpsg_revocation_product_button_text">Vertrag widerrufen</p>
+ <p class="wpsg_revocation_product_button_text"><?php echo \esc_html__('Vertrag widerrufen', 'wpsg'); ?></p>
</div>
<?php } ?>
diff --git a/views/mods/mod_revocation/wpsg_revocation.css b/views/mods/mod_revocation/wpsg_revocation.css
index 4ebad37..b74f0bb 100644
--- a/views/mods/mod_revocation/wpsg_revocation.css
+++ b/views/mods/mod_revocation/wpsg_revocation.css
@@ -1,87 +1,66 @@
-#wpsg_revocation_button { position:fixed; right:0; top:25%; display:flex; gap:1rem; align-items:center; justify-content:flex-start; flex-wrap:nowrap; transform:translateX(calc(100% - (50px + 1rem + 0.5rem))); cursor:pointer; z-index:10;
- background-color:white; border:1px solid black; border-radius:0.5rem; padding:0.5rem 1rem 0.5rem 0.5rem; transition:all 0.4s;
- svg { width:50px; fill:black; }
- span { white-space:nowrap; }
- &:hover { transform:translateX(0.5rem); }
-}
+/* Widerrufsformular — schlichte Gestaltung passend zum SmartCheckout: dünne Linien, gedämpfte Beschriftungen, Farbe vom Theme */
-#wpsg_revocation_dialog {
- z-index:10; opacity:0; pointer-events:none; transition:all 0.4s;
- position:fixed; left:0; top:0; height:100vh; width:100vw;
- background-color:rgba(0,0,0,0.5); display:flex; align-items:center; justify-content:center;
- &.visible { opacity:1; pointer-events:all; }
- .inner { width:calc(100% - 3rem); height:auto; max-width:800px; max-height:800px;
- border:1px solid black; position:relative;
- background-color:white; border-radius:0.5rem; padding:1rem; display:flex; flex-direction:column;
- & > .loading { transition:all 0.2s; opacity:0; pointer-events:none; background-color:rgba(0, 0, 0, 0.25); position:absolute; z-index:2; left:0; top:0; height:100%; width:100%; display:flex; align-items:center; justify-content:center; }
- & > .header { height:50px; flex-shrink:0; flex-grow:0;
- display:flex; align-items:center; justify-content:space-between; font-size:2rem; font-weight:bold;
- .close { width:30px; height:30px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
- }
- & > .content { flex-grow:0.2; overflow-y:auto; margin-top:1rem; margin-bottom:1rem; }
- & > .footer { flex-shrink:0; flex-grow:0; display:flex; align-items:center; justify-content:start; height: 35px; margin-bottom: 2rem;}
- #wpsg_error { padding-left:5px; color:red; }
- }
- &.loading > .inner > .loading { opacity:1; pointer-events:all; }
-}
+#wpsg_revocation_button, #wpsg_revocation_dialog, .wpsg_revocation_product_button, .wpsg_revocation_page, .wpsg_mod_kundenverwaltung_order { --rv-line:rgba(127, 127, 127, 0.35); --rv-line-soft:rgba(127, 127, 127, 0.2); --rv-flat:rgba(127, 127, 127, 0.08); --rv-error:#b3261e; --rv-success:#2e7d32; --rv-radius:3px; }
-.wpsg_revocation_product_button {
- flex-shrink:0; display:inline-flex; align-items:center; gap:0.5rem;
- width:auto; min-height:35px; padding:0.25rem 0.5rem;
- border:1px solid black; cursor:pointer;
-}
+/* Button am Produkt (Produkttemplate, SmartCheckout) */
+.wpsg_revocation_product_button { display:inline-flex; align-items:center; gap:0.4rem; width:auto; padding:0.35rem 0.7rem; border:1px solid var(--rv-line); border-radius:var(--rv-radius); background:none; color:inherit; font-size:0.85rem; line-height:1.2; cursor:pointer; user-select:none; transition:background-color 0.15s ease-out, border-color 0.15s ease-out; }
+.wpsg_revocation_product_button:hover { background:var(--rv-flat); border-color:currentColor; }
+.wpsg_revocation_product_button > svg { flex:0 0 16px; width:16px; height:16px; fill:currentColor; opacity:0.7; }
+/* Doppelte Klasse, damit Theme-Regeln wie ".entry-content p { margin-bottom:… }" nicht in den Button durchschlagen */
+.wpsg_revocation_product_button .wpsg_revocation_product_button_text { margin:0; padding:0; font-size:inherit; line-height:inherit; color:inherit; text-align:left; white-space:nowrap; }
-.wpsg_revocation_product_button > svg {
- flex:0 0 24px; width:24px; height:24px; fill:currentColor;
-}
+/* Flyout am rechten Bildschirmrand, im Ruhezustand ist nur das Symbol sichtbar */
+#wpsg_revocation_button { position:fixed; right:0; top:25%; z-index:10; display:flex; align-items:center; gap:0.6rem; flex-wrap:nowrap; padding:0.6rem 0.9rem 0.6rem 0.6rem; border:1px solid var(--rv-line); border-right:0; border-radius:var(--rv-radius) 0 0 var(--rv-radius); background-color:#FFFFFF; color:#1d1d1d; font-size:0.9rem; box-shadow:0 2px 10px rgba(0, 0, 0, 0.08); cursor:pointer; transform:translateX(calc(100% - (26px + 1.2rem))); transition:transform 0.3s ease-out; }
+#wpsg_revocation_button:hover, #wpsg_revocation_button:focus-within { transform:translateX(0); }
+#wpsg_revocation_button svg { flex:0 0 26px; width:26px; height:26px; fill:currentColor; opacity:0.8; }
+#wpsg_revocation_button span { white-space:nowrap; }
-.wpsg_revocation_product_button_text {
- margin: 0;
-}
+/* Dialog */
+#wpsg_revocation_dialog { position:fixed; left:0; top:0; z-index:100000; display:flex; align-items:center; justify-content:center; width:100vw; height:100vh; padding:1rem; box-sizing:border-box; background-color:rgba(0, 0, 0, 0.45); opacity:0; pointer-events:none; transition:opacity 0.2s ease-out; }
+#wpsg_revocation_dialog.visible { opacity:1; pointer-events:all; }
+#wpsg_revocation_dialog * { box-sizing:border-box; }
+#wpsg_revocation_dialog .inner { position:relative; display:flex; flex-direction:column; width:100%; max-width:640px; max-height:calc(100vh - 2rem); padding:1.5rem; border-radius:var(--rv-radius); background-color:#FFFFFF; color:#1d1d1d; box-shadow:0 10px 40px rgba(0, 0, 0, 0.2); }
+#wpsg_revocation_dialog .inner > .header { display:flex; flex:0 0 auto; align-items:center; justify-content:space-between; gap:1rem; padding-bottom:1rem; border-bottom:1px solid var(--rv-line-soft); font-size:1.1rem; font-weight:600; line-height:1.3; }
+#wpsg_revocation_dialog .inner > .header .close { display:flex; align-items:center; justify-content:center; width:28px; height:28px; color:inherit; opacity:0.6; cursor:pointer; transition:opacity 0.15s ease-out; }
+#wpsg_revocation_dialog .inner > .header .close:hover { opacity:1; }
+#wpsg_revocation_dialog .inner > .header .close svg { width:20px; height:20px; fill:currentColor; }
+#wpsg_revocation_dialog .inner > .content { flex:1 1 auto; min-height:0; overflow-y:auto; margin:1rem 0; }
+#wpsg_revocation_dialog .inner > .footer { display:flex; flex:0 0 auto; align-items:center; justify-content:flex-end; gap:0.75rem; padding-top:1rem; border-top:1px solid var(--rv-line-soft); }
+#wpsg_revocation_dialog .inner > .loading { position:absolute; left:0; top:0; z-index:2; display:flex; align-items:center; justify-content:center; width:100%; height:100%; border-radius:var(--rv-radius); background-color:rgba(255, 255, 255, 0.7); opacity:0; pointer-events:none; transition:opacity 0.2s ease-out; }
+#wpsg_revocation_dialog.loading > .inner > .loading { opacity:1; pointer-events:all; }
-#wpsg_revocation_form { display:flex; flex-direction:column; gap:0.5rem; width:100%;
- .wpsg_revocation_order_product > div { width:100%; }
- .form_field { display:flex; width:100%; flex-direction:column; gap:0.125rem;
- .label { color: black; font-size: 1.25rem; }
- .value { display:flex; justify-content:stretch; gap:0.25rem;
- input, textarea, select { width:auto; flex-grow:1; min-height:30px; text-indent:0.25rem; flex-shrink:1; }
- textarea { min-height:90px; padding:0.25rem; }
- select { height:36px; }
- input[type="number"] { flex-shrink:2; flex-grow:0; }
- }
- }
-}
+/* Absende-Button im Dialog und auf der Formularseite */
+#wpsg_revocation_dialog .wpsg_revocation_button_submit, .wpsg_revocation_page .wpsg_revocation_page_submit_wrap button, .wpsg_revocation_page .wpsg_revocation_page_submit_wrap input[type="submit"] { display:inline-flex; align-items:center; justify-content:center; min-height:0; margin:0; padding:0.65rem 1.1rem; border:1px solid currentColor; border-radius:var(--rv-radius); background:none; color:inherit; font:inherit; font-weight:600; line-height:1.2; text-shadow:none; box-shadow:none; cursor:pointer; transition:background-color 0.15s ease-out; }
+#wpsg_revocation_dialog .wpsg_revocation_button_submit:hover, .wpsg_revocation_page .wpsg_revocation_page_submit_wrap button:hover, .wpsg_revocation_page .wpsg_revocation_page_submit_wrap input[type="submit"]:hover { background:var(--rv-flat); }
-.wpsg_mod_kundenverwaltung_order {
- .wpsg_revocation_order_product { display:inline-flex; align-items:center; gap:0.5rem; border:1px solid black; border-radius:0.5rem; padding:0.5rem;
- margin-bottom:1rem; user-select:none; flex-direction: row;
- & > svg { height:30px; width:30px; }
- & > input { width:25px; height:25px; flex-shrink:0; }
- & > .inner { cursor:pointer; }
- }
-}
+/* Formular (Dialog und eigenständige Seite) */
+#wpsg_revocation_form, #wpsg_revocation_page_form { display:flex; flex-direction:column; gap:1rem; width:100%; margin:0; }
+#wpsg_revocation_form .wpsg_revocation_order_product, #wpsg_revocation_page_form .wpsg_revocation_order_product { display:flex; flex-direction:column; gap:0.9rem; margin:0; padding:1rem; border:1px solid var(--rv-line-soft); border-radius:var(--rv-radius); min-width:0; }
+#wpsg_revocation_form .wpsg_revocation_order_product > div, #wpsg_revocation_page_form .wpsg_revocation_order_product > div { display:flex; flex-direction:column; gap:0.9rem; width:100%; }
+#wpsg_revocation_form legend, #wpsg_revocation_page_form legend { padding:0 0.35rem; font-size:0.95rem; font-weight:600; }
+#wpsg_revocation_form .form_field, #wpsg_revocation_page_form .form_field { display:flex; flex-direction:column; gap:0.3rem; width:100%; }
+#wpsg_revocation_form .form_field .label, #wpsg_revocation_page_form .form_field .label { color:inherit; font-size:0.85rem; opacity:0.7; }
+#wpsg_revocation_form .form_field .value, #wpsg_revocation_page_form .form_field .value { display:flex; gap:0.5rem; justify-content:stretch; }
+#wpsg_revocation_form .form_field .value input, #wpsg_revocation_form .form_field .value textarea, #wpsg_revocation_form .form_field .value select, #wpsg_revocation_page_form .form_field .value input, #wpsg_revocation_page_form .form_field .value textarea, #wpsg_revocation_page_form .form_field .value select { flex:1 1 auto; width:auto; min-width:0; min-height:0; margin:0; padding:0.55rem 0.7rem; border:1px solid var(--rv-line); border-radius:var(--rv-radius); background:none; color:inherit; font:inherit; text-indent:0; box-shadow:none; }
+#wpsg_revocation_form .form_field .value input:focus, #wpsg_revocation_form .form_field .value textarea:focus, #wpsg_revocation_form .form_field .value select:focus, #wpsg_revocation_page_form .form_field .value input:focus, #wpsg_revocation_page_form .form_field .value textarea:focus, #wpsg_revocation_page_form .form_field .value select:focus { border-color:currentColor; outline:none; }
+#wpsg_revocation_form .form_field .value input[readonly], #wpsg_revocation_page_form .form_field .value input[readonly] { background:var(--rv-flat); }
+#wpsg_revocation_form .form_field .value input[type="number"], #wpsg_revocation_page_form .form_field .value input[type="number"] { flex:0 0 6rem; }
+#wpsg_revocation_form .form_field .value textarea, #wpsg_revocation_page_form .form_field .value textarea { min-height:5.5rem; resize:vertical; }
+#wpsg_revocation_form > p, #wpsg_revocation_page_form .wpsg_revocation_page_datenschutz { margin:0; font-size:0.85rem; opacity:0.7; }
+
+/* Meldungen */
+#wpsg_revocation_dialog #wpsg_error, #wpsg_revocation_page_form #wpsg_error, #wpsg_revocation_page_form .wpsg_error { margin:0; padding:0.6rem 0.9rem; border-left:3px solid var(--rv-error); background:var(--rv-flat); color:inherit; list-style:none; }
+#wpsg_revocation_dialog #msg_target:empty { display:none; }
+.wpsg_revocation_page_success { padding:0.6rem 0.9rem; border-left:3px solid var(--rv-success); background:var(--rv-flat); color:inherit; }
-.wpsg_amount_label {
- word-break: normal;
-}
/* Eigenständige Widerrufsformular-Seite (kein Popup) */
-.wpsg_revocation_page { width:100%; max-width:800px; margin:0 auto; }
+.wpsg_revocation_page { width:100%; max-width:640px; margin:0 auto; }
+.wpsg_revocation_page .wpsg_revocation_page_submit_wrap { margin-top:0.25rem; }
-#wpsg_revocation_page_form { display:flex; flex-direction:column; gap:0.5rem; width:100%;
- .wpsg_revocation_order_product { border:1px solid #ddd; border-radius:0.5rem; padding:1rem; margin:0 0 1rem 0; }
- .wpsg_revocation_order_product > div { width:100%; }
- .form_field { display:flex; width:100%; flex-direction:column; gap:0.125rem;
- .label { color:black; font-size:1.25rem; }
- .value { display:flex; justify-content:stretch; gap:0.25rem;
- input, textarea, select { width:auto; flex-grow:1; min-height:30px; text-indent:0.25rem; flex-shrink:1; }
- textarea { min-height:90px; padding:0.25rem; }
- select { height:36px; }
- input[type="number"] { flex-shrink:2; flex-grow:0; }
- }
- }
- #wpsg_error, .wpsg_error { padding-left:5px; color:red; list-style:none; margin:0 0 1rem 0; }
- .wpsg_revocation_page_submit_wrap { margin-top:0.5rem; }
-}
+/* Auswahl der Produkte in der Bestellübersicht des Kundenkontos */
+.wpsg_mod_kundenverwaltung_order .wpsg_revocation_order_product { display:inline-flex; flex-direction:row; align-items:center; gap:0.5rem; margin-bottom:1rem; padding:0.4rem 0.7rem; border:1px solid var(--rv-line); border-radius:var(--rv-radius); font-size:0.85rem; user-select:none; }
+.wpsg_mod_kundenverwaltung_order .wpsg_revocation_order_product > svg { flex:0 0 18px; width:18px; height:18px; fill:currentColor; opacity:0.7; }
+.wpsg_mod_kundenverwaltung_order .wpsg_revocation_order_product > input { flex-shrink:0; width:16px; height:16px; margin:0; }
+.wpsg_mod_kundenverwaltung_order .wpsg_revocation_order_product > .inner { cursor:pointer; }
-.wpsg_revocation_page_success { padding:1rem; border:1px solid #2e7d32; border-radius:0.5rem; background:#edf7ed; color:#2e7d32; }
-.wpsg_revocation_page_datenschutz { margin:0.5rem 0; }
+.wpsg_amount_label { word-break:normal; }
diff --git a/views/mods/mod_scaleprice/product_bottom.phtml b/views/mods/mod_scaleprice/product_bottom.phtml
index 970f616..e59189b 100644
--- a/views/mods/mod_scaleprice/product_bottom.phtml
+++ b/views/mods/mod_scaleprice/product_bottom.phtml
@@ -27,7 +27,7 @@
<?php } ?>
<?php echo __(' kostet das Produkt ', 'wpsg'); ?>
<?php echo wpsg_ff($this->view['wpsg_mod_scaleprice']['base'], $this->get_option('wpsg_currency')); ?> <?php // echo $this->get_option('wpsg_mod_scaleprice_unit'); ?>
- <?php $this->callMod('wpsg_mod_fuellmenge', 'renderPriceInfo', array($this->view['wpsg_mod_scaleprice']['base'], $this->view['data']['fmenge'], $this->view['data']['id'])); ?>
+ <?php $this->callMod('wpsg_mod_fuellmenge', 'renderPriceInfo', array($this->view['wpsg_mod_scaleprice']['base']??0, $this->view['data']['fmenge']??0, $this->view['data']['id'])); ?>
</li>
<?php } ?>
@@ -41,7 +41,7 @@
<?php } ?>
<?php echo __(' kostet das Produkt ', 'wpsg'); ?>
<?php echo wpsg_ff($scale['value'], $this->get_option('wpsg_currency')); ?> <?php //echo $this->get_option('wpsg_mod_scaleprice_unit'); ?>
- <?php $this->callMod('wpsg_mod_fuellmenge', 'renderPriceInfo', array($scale['value'], $this->view['data']['fmenge'] , $this->view['data']['id'])); ?>
+ <?php $this->callMod('wpsg_mod_fuellmenge', 'renderPriceInfo', array($scale['value']??0, $this->view['data']['fmenge']??0 , $this->view['data']['id'])); ?>
</li>
<?php } ?>
</ul>
diff --git a/views/mods/mod_smartcheckout/checkout.phtml b/views/mods/mod_smartcheckout/checkout.phtml
new file mode 100644
index 0000000..e6fa74f
--- /dev/null
+++ b/views/mods/mod_smartcheckout/checkout.phtml
@@ -0,0 +1,492 @@
+<?php
+
+ /**
+ * Template des modernen EinSeitenCheckouts
+ *
+ * Das Markup ist das DOM-Template der Vue-Anwendung aus views/js/smartcheckout.js.
+ * Gerechnet und formatiert wird ausschließlich serverseitig, die Anwendung stellt nur
+ * dar, was ihr der Server im Zustand liefert.
+ */
+
+ $state = $this->view['smartcheckout'];
+ $layout = (($this->get_option('wpsg_mod_smartcheckout_layout') === '1')?'single':'split');
+
+?>
+<script type="application/json" id="wpsg_smartcheckout_state"><?php echo wp_json_encode($state, JSON_HEX_TAG | JSON_HEX_AMP); ?></script>
+
+<noscript>
+ <div class="wpsg wpsg_smartcheckout_noscript">
+ <?php echo wpsg_translate(__('Für den Bestellablauf auf einer Seite wird JavaScript benötigt. Bitte aktivieren Sie JavaScript oder nutzen Sie den #1#.', 'wpsg'), '<a href="'.esc_url($state['url']['basket']).'">'.esc_html__('klassischen Warenkorb', 'wpsg').'</a>'); ?>
+ </div>
+</noscript>
+
+<div class="wpsg alignwide wpsg_smartcheckout wpsg_smartcheckout_<?php echo esc_attr($layout); ?>" id="wpsg_smartcheckout" v-cloak>
+
+ <form
+ id="wpsg_smartcheckout_form"
+ method="post"
+ action="<?php echo esc_url($state['url']['checkout']); ?>"
+ enctype="multipart/form-data"
+ @submit="onSubmit"
+ >
+
+ <input type="hidden" name="wpsg_smartcheckout_nonce" :value="state.nonce" />
+
+ <div class="sc_messages" role="status" aria-live="polite">
+ <div v-for="(message, index) in state.messages" :key="index" class="sc_message" :class="'sc_message_' + message.type" v-html="message.text"></div>
+ </div>
+
+ <div class="sc_empty" v-if="state.empty">
+ <h2><?php echo esc_html__('Ihr Warenkorb ist leer', 'wpsg'); ?></h2>
+ <p><?php echo esc_html__('Legen Sie ein Produkt in den Warenkorb, um die Bestellung abzuschließen.', 'wpsg'); ?></p>
+ </div>
+
+ <div class="sc_layout" v-else :class="{ 'sc_busy': busy }">
+
+ <div class="sc_main">
+
+ <?php /* Schritt 1: Warenkorb */ ?>
+ <section class="sc_box" aria-labelledby="sc_title_basket">
+ <h2 class="sc_title" id="sc_title_basket"><span class="sc_step">1</span><?php echo esc_html__('Ihr Warenkorb', 'wpsg'); ?></h2>
+
+ <div class="sc_modul_basket sc_modul_dynamic" v-if="state.html.basketTop" v-html="state.html.basketTop"></div>
+
+ <div class="sc_products">
+
+ <div class="sc_product" v-for="product in state.products" :key="product.index">
+
+ <div class="sc_product_image" v-if="product.image">
+ <img :src="product.image" :alt="product.name" loading="lazy" />
+ </div>
+
+ <div class="sc_product_body">
+
+ <?php /* Angaben der Module vor dem Produkt, z.B. Maße beim Druckshop */ ?>
+ <div class="sc_product_before sc_modul_dynamic" v-if="product.before" v-html="product.before"></div>
+
+ <div class="sc_product_name">
+ <a v-if="product.link" :href="product.link">{{ product.name }}</a>
+ <span v-else>{{ product.name }}</span>
+ </div>
+
+ <div class="sc_product_desc" v-if="product.shortdesc" v-html="product.shortdesc"></div>
+ <div class="sc_product_extra sc_modul_dynamic" v-if="product.extra" v-html="product.extra"></div>
+ <div class="sc_product_revocation" v-if="product.revocation" v-html="product.revocation"></div>
+
+ <div class="sc_product_tax" v-if="state.showTax">
+ <?php echo esc_html__('MwSt.', 'wpsg'); ?> {{ product.tax_value }}
+ </div>
+
+ </div>
+
+ <div class="sc_product_amount">
+
+ <div class="sc_stepper" v-if="!product.fixed">
+ <button type="button" class="sc_stepper_btn" @click="changeAmount(product, -1)" :disabled="busy" :aria-label="'<?php echo esc_js(__('Menge verringern', 'wpsg')); ?>'">&minus;</button>
+ <input
+ type="text"
+ inputmode="numeric"
+ class="sc_stepper_input"
+ :name="'wpsg[menge][' + product.index + ']'"
+ v-model="amounts[product.index]"
+ @change="refresh"
+ :aria-label="'<?php echo esc_js(__('Menge', 'wpsg')); ?>'"
+ />
+ <button type="button" class="sc_stepper_btn" @click="changeAmount(product, 1)" :disabled="busy" :aria-label="'<?php echo esc_js(__('Menge erhöhen', 'wpsg')); ?>'">+</button>
+ </div>
+
+ <div class="sc_stepper sc_stepper_fixed" v-else>
+ <input type="hidden" :name="'wpsg[menge][' + product.index + ']'" :value="product.amount" />
+ <span class="sc_stepper_static">{{ product.amount }}</span>
+ </div>
+
+ <button type="button" class="sc_remove" @click="removeProduct(product)" :disabled="busy">
+ <?php echo esc_html__('Entfernen', 'wpsg'); ?>
+ </button>
+
+ </div>
+
+ <div class="sc_product_price">
+ <div class="sc_product_price_total">{{ product.price_total }}</div>
+ <div class="sc_product_price_single" v-if="product.amount !== 1">{{ product.price }} <?php echo esc_html__('je Stück', 'wpsg'); ?></div>
+ </div>
+
+ <?php /* Eingabefelder der Module (z.B. Produktvariablen) über die volle Breite der Position */ ?>
+ <div class="sc_product_fields sc_modul_dynamic" v-if="product.fields" v-html="product.fields"></div>
+
+ </div>
+
+ </div>
+
+ <div class="sc_modul_basket sc_modul_dynamic" v-if="state.html.basketAfterProducts" v-html="state.html.basketAfterProducts"></div>
+
+ <?php if ($this->hasMod('wpsg_mod_gutschein')) { ?>
+ <div class="sc_voucher">
+
+ <label class="sc_voucher_label" for="wpsg_smartcheckout_voucher"><?php echo esc_html__('Gutscheincode', 'wpsg'); ?></label>
+
+ <div class="sc_voucher_row">
+ <input
+ type="text"
+ id="wpsg_smartcheckout_voucher"
+ class="sc_voucher_input"
+ :class="{ 'sc_invalid': voucherError }"
+ name="wpsg[gutschein]"
+ v-model="voucher"
+ @keydown.enter.prevent="addVoucher"
+ />
+ <button type="button" class="sc_button sc_button_secondary" @click="addVoucher" :disabled="busy || voucher === ''">
+ <?php echo esc_html__('Einlösen', 'wpsg'); ?>
+ </button>
+ </div>
+
+ <div class="sc_voucher_list" v-if="state.hasVouchers">
+ <div class="sc_voucher_item" v-for="item in state.vouchers" :key="item.id">
+ <span class="sc_voucher_code"><template v-if="item.coupon"><?php echo esc_html__('Wertgutschein', 'wpsg'); ?> </template>{{ item.code }}</span>
+ <span class="sc_voucher_partial" v-if="item.partial"><?php echo esc_html__('teilweise angerechnet', 'wpsg'); ?></span>
+ <span class="sc_voucher_value">{{ item.value }}</span>
+ <button type="button" class="sc_remove" @click="removeVoucher(item)" :disabled="busy"><?php echo esc_html__('Entfernen', 'wpsg'); ?></button>
+ </div>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ </section>
+
+ <?php /* Schritt 2: Kundendaten */ ?>
+ <section class="sc_box" aria-labelledby="sc_title_customer">
+ <h2 class="sc_title" id="sc_title_customer"><span class="sc_step">2</span><?php echo esc_html__('Ihre Daten', 'wpsg'); ?></h2>
+
+ <?php /* Login und Registrierung der Kundenverwaltung, serverseitig gerendert */ ?>
+ <div class="sc_modul_login" v-pre>
+ <?php echo \wpsgSmartcheckout\State::renderMod('wpsg_mod_kundenverwaltung', 'checkout_login'); ?>
+ </div>
+
+ <div class="sc_fields">
+
+ <div
+ class="sc_field"
+ v-for="field in state.fields"
+ :key="field.name"
+ :class="['sc_field_' + field.width, { 'sc_invalid': hasError(field.name) }]"
+ >
+
+ <label class="sc_label" :for="'wpsg_sc_' + field.name">
+ {{ field.label }}<span class="sc_required" v-if="field.required" aria-hidden="true">*</span>
+ </label>
+
+ <select
+ v-if="field.type === 'select'"
+ class="sc_input"
+ :id="'wpsg_sc_' + field.name"
+ :name="fieldName(field)"
+ :required="field.required"
+ v-model="form[field.name]"
+ @change="refresh"
+ >
+ <option value="-1"><?php echo esc_html__('Bitte auswählen', 'wpsg'); ?></option>
+ <option v-for="option in field.options" :key="option.value" :value="option.value">{{ option.label }}</option>
+ </select>
+
+ <template v-else-if="field.type === 'checkbox'">
+ <input type="hidden" :name="fieldName(field)" value="0" />
+ <input
+ type="checkbox"
+ class="sc_checkbox"
+ :id="'wpsg_sc_' + field.name"
+ :name="fieldName(field)"
+ value="1"
+ :required="field.required"
+ v-model="form[field.name]"
+ true-value="1"
+ false-value="0"
+ @change="refresh"
+ />
+ </template>
+
+ <input
+ v-else
+ class="sc_input"
+ :type="field.type"
+ :id="'wpsg_sc_' + field.name"
+ :name="fieldName(field)"
+ :required="field.required"
+ :autocomplete="field.autocomplete || 'off'"
+ v-model="form[field.name]"
+ @change="refresh"
+ @paste="field.nopaste ? $event.preventDefault() : null"
+ />
+
+ </div>
+
+ </div>
+
+ <?php /* Erweiterungen der Module innerhalb der Kundendaten */ ?>
+ <div class="sc_modul_customer" v-pre>
+ <?php echo \wpsgSmartcheckout\State::renderMod('wpsg_mod_kundenverwaltung', 'checkout_customer_inner'); ?>
+ <?php echo \wpsgSmartcheckout\State::renderMod('wpsg_mod_nlsatolo', 'checkout_customer_inner'); ?>
+ <?php echo \wpsgSmartcheckout\State::renderMod('wpsg_mod_trustedshops', 'checkout_customer_inner'); ?>
+ <?php echo \wpsgSmartcheckout\State::renderMod('wpsg_mod_newsletter', 'checkout_customer_inner'); ?>
+ </div>
+
+ <div class="sc_hint">
+ <?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="sc_required">*</span>'); ?>
+ </div>
+
+ </section>
+
+ <?php /* Abweichende Lieferanschrift und weitere Module vor dem Abschluss */ ?>
+ <?php $strPreButton = \wpsgSmartcheckout\State::renderHook('checkout_inner_prebutton', [&$this->view]); ?>
+ <?php if (trim($strPreButton) !== '') { ?>
+ <section class="sc_box sc_modul_extra" v-pre>
+ <?php echo $strPreButton; ?>
+ </section>
+ <?php } ?>
+
+ <?php /* Blöcke der Module, die sich mit jeder Antwort ändern (z.B. Bestellupload) */ ?>
+ <section class="sc_box sc_modul_upload sc_modul_dynamic" v-if="state.html.checkoutDynamic" v-html="state.html.checkoutDynamic"></section>
+
+ <?php /* Schritt 3: Versandart */ ?>
+ <section class="sc_box" v-if="state.shipping.show" aria-labelledby="sc_title_shipping">
+ <h2 class="sc_title" id="sc_title_shipping"><span class="sc_step">3</span><?php echo esc_html__('Versandart', 'wpsg'); ?></h2>
+
+ <div class="sc_choices" :class="{ 'sc_invalid': hasError('shipping') }">
+
+ <label class="sc_choice" v-for="item in state.shipping.list" :key="item.id" :class="{ 'sc_choice_active': form.shipping === item.id }">
+
+ <?php /* Radio, Logo und Bezeichnung auf einer Zeile, die Beschreibung darunter */ ?>
+ <span class="sc_choice_head">
+ <input type="radio" name="wpsg[checkout][shipping]" :value="item.id" v-model="form.shipping" @change="refresh" />
+ <img class="sc_choice_logo" v-if="item.logo" :src="item.logo" :alt="item.name" />
+ <span class="sc_choice_name">{{ item.name }}</span>
+ <span class="sc_choice_price" v-if="item.price">{{ item.price }}</span>
+ </span>
+ <span class="sc_choice_hint" v-if="item.hint" v-html="item.hint"></span>
+
+ </label>
+
+ </div>
+
+ </section>
+
+ <?php /* Schritt 4: Zahlungsart */ ?>
+ <section class="sc_box" v-if="state.payment.show" aria-labelledby="sc_title_payment">
+ <h2 class="sc_title" id="sc_title_payment"><span class="sc_step">4</span><?php echo esc_html__('Zahlungsart', 'wpsg'); ?></h2>
+
+ <div class="sc_choices" :class="{ 'sc_invalid': hasError('payment') }">
+
+ <label class="sc_choice" v-for="item in state.payment.list" :key="item.id" :class="{ 'sc_choice_active': form.payment === item.id }">
+
+ <?php /* Radio, Logo und Bezeichnung auf einer Zeile, Beschreibung und Zusatzangaben darunter */ ?>
+ <span class="sc_choice_head">
+ <input type="radio" name="wpsg[checkout][payment]" :value="item.id" v-model="form.payment" @change="refresh" />
+ <img class="sc_choice_logo" v-if="item.logo" :src="item.logo" :alt="item.name" />
+ <span class="sc_choice_name">{{ item.name }}</span>
+ <span class="sc_choice_price" v-if="item.price">{{ item.price }}</span>
+ </span>
+ <span class="sc_choice_hint" v-if="item.hint" v-html="item.hint"></span>
+ <span class="sc_choice_extra" v-if="item.extra" v-html="item.extra"></span>
+
+ </label>
+
+ </div>
+
+ <?php /* Zahlungsmodule, die eigene Eingabefelder mitbringen */ ?>
+ <div class="sc_modul_payment sc_modul_dynamic" v-if="state.html.paymentInner" v-html="state.html.paymentInner"></div>
+
+ </section>
+
+ <?php /* Bestellkommentar */ ?>
+ <section class="sc_box" aria-labelledby="sc_title_comment">
+ <h2 class="sc_title" id="sc_title_comment"><?php echo esc_html__('Bestellkommentar', 'wpsg'); ?></h2>
+
+ <label class="sc_label sc_label_hidden" for="wpsg_sc_comment"><?php echo esc_html__('Bestellkommentar', 'wpsg'); ?></label>
+ <textarea class="sc_textarea" id="wpsg_sc_comment" name="wpsg[checkout][comment]" rows="4" v-model="form.comment"></textarea>
+
+ </section>
+
+ </div>
+
+ <?php /* Zusammenfassung */ ?>
+ <aside class="sc_side" aria-labelledby="sc_title_sum">
+
+ <div class="sc_summary">
+
+ <h2 class="sc_title" id="sc_title_sum"><?php echo esc_html__('Zusammenfassung', 'wpsg'); ?></h2>
+
+ <div class="sc_sum_rows">
+
+ <div class="sc_sum_row">
+ <span class="sc_sum_label"><?php echo esc_html__('Zwischensumme', 'wpsg'); ?></span>
+ <span class="sc_sum_value">{{ state.sum.products }}</span>
+ </div>
+
+ <div class="sc_sum_row" v-if="state.sum.hasDiscount">
+ <span class="sc_sum_label"><?php echo esc_html__('Rabatt', 'wpsg'); ?><template v-if="state.sum.discountPercent"> ({{ state.sum.discountPercent }})</template></span>
+ <span class="sc_sum_value">{{ state.sum.discount }}</span>
+ </div>
+
+ <div class="sc_sum_row" v-if="state.sum.hasVoucher">
+ <span class="sc_sum_label"><?php echo esc_html__('Gutschein', 'wpsg'); ?></span>
+ <span class="sc_sum_value">{{ state.sum.voucher }}</span>
+ </div>
+
+ <div class="sc_sum_row" v-if="state.shipping.show">
+ <span class="sc_sum_label"><?php echo esc_html__('Versandkosten', 'wpsg'); ?></span>
+ <span class="sc_sum_value">{{ state.sum.shipping }}</span>
+ </div>
+
+ <div class="sc_sum_row" v-if="state.sum.hasPayment">
+ <span class="sc_sum_label"><?php echo esc_html__('Zahlungsgebühr', 'wpsg'); ?></span>
+ <span class="sc_sum_value">{{ state.sum.payment }}</span>
+ </div>
+
+ <template v-if="state.smallBusiness">
+
+ <div class="sc_sum_note">{{ state.smallBusinessText }}</div>
+
+ <div class="sc_sum_row sc_sum_total">
+ <span class="sc_sum_label"><?php echo esc_html__('Gesamtpreis', 'wpsg'); ?></span>
+ <span class="sc_sum_value">{{ state.sum.brutto }}</span>
+ </div>
+
+ <?php /* Nach Anrechnung der Wertgutscheine */ ?>
+ <div class="sc_sum_row sc_sum_total sc_sum_topay" v-if="state.sum.hasTopay">
+ <span class="sc_sum_label"><?php echo esc_html__('Zu zahlen', 'wpsg'); ?></span>
+ <span class="sc_sum_value">{{ state.sum.topay }}</span>
+ </div>
+
+ </template>
+
+ <template v-else>
+
+ <div class="sc_sum_row">
+ <span class="sc_sum_label"><?php echo esc_html__('Gesamtpreis (Netto)', 'wpsg'); ?></span>
+ <span class="sc_sum_value">{{ state.sum.netto }}</span>
+ </div>
+
+ <div class="sc_sum_row" v-for="(tax, index) in state.sum.tax" :key="index">
+ <span class="sc_sum_label"><?php echo esc_html__('zuzüglich MwSt.', 'wpsg'); ?> ({{ tax.name }})</span>
+ <span class="sc_sum_value">{{ tax.sum }}</span>
+ </div>
+
+ <div class="sc_sum_row sc_sum_total">
+ <span class="sc_sum_label"><?php echo esc_html__('Gesamtpreis (Brutto)', 'wpsg'); ?></span>
+ <span class="sc_sum_value">{{ state.sum.brutto }}</span>
+ </div>
+
+ <?php /* Nach Anrechnung der Wertgutscheine */ ?>
+ <div class="sc_sum_row sc_sum_total sc_sum_topay" v-if="state.sum.hasTopay">
+ <span class="sc_sum_label"><?php echo esc_html__('Zu zahlen', 'wpsg'); ?></span>
+ <span class="sc_sum_value">{{ state.sum.topay }}</span>
+ </div>
+
+ </template>
+
+ </div>
+
+ <div class="sc_modul_sum sc_modul_dynamic" v-if="state.html.sumRowEnd" v-html="state.html.sumRowEnd"></div>
+
+ <div class="sc_modul_sum sc_modul_dynamic" v-if="state.html.sumPreButton" v-html="state.html.sumPreButton"></div>
+
+ <?php /* Bestellbedingungen und weitere Zustimmungen der Module */ ?>
+ <div
+ class="sc_modul_conditions sc_modul_dynamic"
+ :class="{ 'sc_invalid': state.errorConditions }"
+ v-if="state.html.conditions"
+ v-html="state.html.conditions"
+ ></div>
+
+ <div class="sc_agb" v-if="state.needAGB" :class="{ 'sc_invalid': hasError('agb') }">
+ <label>
+ <input type="checkbox" name="wpsg[agb]" value="1" v-model="agb" required />
+ <span><?php
+ echo wpsg_translate(
+ __('Ich habe die #1# des Anbieters gelesen und erkläre mit dem Absenden der Bestellung mein Einverständnis. Die #2# habe ich zur Kenntnis genommen.', 'wpsg'),
+ '<a target="_blank" rel="noopener" href="'.esc_url($state['url']['agb']).'">'.esc_html__('AGB', 'wpsg').'</a>',
+ '<a target="_blank" rel="noopener" href="'.esc_url($state['url']['revocation']).'">'.esc_html__('Widerrufsbelehrung', 'wpsg').'</a>'
+ );
+ ?></span>
+ </label>
+ </div>
+
+ <?php /* GARAN-Gewährleistungslabel direkt vor dem Bestellbutton */ ?>
+ <div class="sc_garan" v-if="state.warranty && state.warranty.need && !state.warranty.popup">
+ <button type="button" class="sc_garan_zoom" @click="garanLightbox = true" title="<?php echo esc_attr__('Gewährleistungslabel vergrößern', 'wpsg'); ?>">
+ <img :src="state.warranty.image" alt="<?php echo esc_attr__('GARAN Gewährleistungslabel', 'wpsg'); ?>" />
+ </button>
+ </div>
+
+ <button
+ v-if="state.canOrder"
+ type="submit"
+ class="sc_button sc_button_order"
+ name="wpsg_smartcheckout_order"
+ value="1"
+ :disabled="busy"
+ >
+ <?php /* Zahlungsmodule können die Beschriftung je Zahlungsart über state.orderLabels ändern */ ?>
+ <template v-if="state.orderLabels && state.orderLabels[form.payment]">{{ state.orderLabels[form.payment] }}</template>
+ <template v-else><?php echo esc_html__('zahlungspflichtig bestellen', 'wpsg'); ?></template>
+ </button>
+
+ <div class="sc_sum_hint">
+ <?php echo wpsg_translate(__('Es gelten die Preise inklusive der gesetzlichen MwSt. zuzüglich #1#.', 'wpsg'), '<a target="_blank" rel="noopener" href="'.esc_url($state['url']['shipping']).'">'.esc_html__('Versandkosten', 'wpsg').'</a>'); ?>
+ </div>
+
+ <div class="sc_spinner" v-if="busy" role="status">
+ <span class="sc_spinner_dot"></span>
+ <span class="sc_visuallyhidden"><?php echo esc_html__('Wird berechnet …', 'wpsg'); ?></span>
+ </div>
+
+ </div>
+
+ </aside>
+
+ </div>
+
+ <?php /* Layer während die Bestellung übermittelt wird, verhindert doppeltes Abschicken */ ?>
+ <div class="sc_submitting" v-if="submitting" role="alertdialog" aria-modal="true" aria-live="assertive" aria-labelledby="sc_submitting_text">
+ <div class="sc_submitting_inner">
+ <span class="sc_spinner_dot" aria-hidden="true"></span>
+ <span id="sc_submitting_text"><?php echo esc_html__('Ihre Bestellung wird übermittelt …', 'wpsg'); ?></span>
+ </div>
+ </div>
+
+ <?php /* Lightbox für das GARAN-Gewährleistungslabel in der Darstellung vor dem Bestellbutton */ ?>
+ <div class="sc_garan_popup sc_garan_lightbox" v-if="garanLightbox" role="dialog" aria-modal="true" @click.self="garanLightbox = false">
+ <div class="sc_garan_popup_inner">
+ <div class="sc_garan_popup_image">
+ <img :src="state.warranty.image" alt="<?php echo esc_attr__('GARAN Gewährleistungslabel', 'wpsg'); ?>" />
+ </div>
+ <button type="button" class="sc_button" @click="garanLightbox = false"><?php echo esc_html__('Schließen', 'wpsg'); ?></button>
+ </div>
+ </div>
+
+ <?php /* GARAN-Gewährleistungslabel als Popup vor dem Bestellabschluss */ ?>
+ <div class="sc_garan_popup" v-if="garanPopup" role="dialog" aria-modal="true">
+ <div class="sc_garan_popup_inner">
+ <div class="sc_garan_popup_image">
+ <img :src="state.warranty.image" alt="<?php echo esc_attr__('GARAN Gewährleistungslabel', 'wpsg'); ?>" />
+ </div>
+ <button type="button" class="sc_button sc_button_order" @click="confirmGaran"><?php echo esc_html__('Zur Kenntnis genommen', 'wpsg'); ?></button>
+ </div>
+ </div>
+
+ </form>
+
+</div>
+
+<?php
+ /*
+ * Ausgaben der Module nach dem Warenkorb (z.B. ähnliche Produkte, Scripte für Uploads, Statistik). Sie stehen bewusst
+ * außerhalb der Vue-Anwendung, damit enthaltene Scripte ausgeführt werden. Sie werden nicht per AJAX aktualisiert.
+ */
+ $strAfter = \wpsgSmartcheckout\State::renderHook('basket_after', [&$this->view]);
+?>
+<?php if (trim($strAfter) !== '') { ?>
+<div class="wpsg alignwide wpsg_smartcheckout_after">
+ <?php echo $strAfter; ?>
+</div>
+<?php } ?>
diff --git a/views/mods/mod_smartcheckout/settings_edit.phtml b/views/mods/mod_smartcheckout/settings_edit.phtml
new file mode 100644
index 0000000..c884f36
--- /dev/null
+++ b/views/mods/mod_smartcheckout/settings_edit.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Einstellungen des modernen EinSeitenCheckouts
+ */
+
+ $arLayout = [
+ '0' => __('Zweispaltig — Eingaben links, Zusammenfassung rechts mitlaufend', 'wpsg'),
+ '1' => __('Einspaltig — Zusammenfassung unterhalb der Eingaben', 'wpsg')
+ ];
+
+?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_smartcheckout_page', __('Seite für den EinSeitenCheckout', 'wpsg'), $this->view['arPages'], $this->get_option('wpsg_mod_smartcheckout_page'), ['hint' => __('Wählen Sie „Neu anlegen und zuordnen", damit beim Speichern automatisch eine eigene Seite erstellt wird — oder ordnen Sie eine bestehende Seite zu. Der Checkout wird automatisch in diese Seite eingebunden.', 'wpsg')]); ?>
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_smartcheckout_layout', __('Aufteilung', 'wpsg'), $arLayout, $this->get_option('wpsg_mod_smartcheckout_layout')); ?>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_smartcheckout_image', __('Produktbilder im Warenkorb anzeigen', 'wpsg'), $this->get_option('wpsg_mod_smartcheckout_image')); ?>
+
+<p class="wpsg_note">
+ <?php echo __('Solange das Modul aktiv ist, wird die Warenkorbseite auf den EinSeitenCheckout umgeleitet — der klassische Ablauf (Warenkorb, Kasse, Versand/Zahlung, Zusammenfassung) wird nicht mehr angesteuert.', 'wpsg'); ?>
+</p>
+
+<p class="wpsg_note">
+ <?php echo __('Der EinSeitenCheckout rechnet ausschließlich serverseitig — jede Änderung an Menge, Anschrift, Versand- oder Zahlungsart wird an den Shop geschickt und mit der regulären Kalkulation neu berechnet.', 'wpsg'); ?>
+</p>
diff --git a/views/order/product_table.phtml b/views/order/product_table.phtml
index 37533bb..e568fd3 100644
--- a/views/order/product_table.phtml
+++ b/views/order/product_table.phtml
@@ -178,7 +178,8 @@
<tr class="wpsg_row_shipping">
<td class="wpsg_cell_shipping_label" colspan="2">
<?php echo __('Versandkosten', 'wpsg'); ?>
- <?php echo __(' ('.$this->arShipping[$arCalculation['shipping'][0]['shipping_key']]['name'].')', 'wpsg'); ?>
+ <?php /* Über getShippingName(), die Versandart der Bestellung kann inzwischen deaktiviert oder gelöscht sein */ ?>
+ (<?php echo esc_html($this->getShippingName((string)($arCalculation['shipping'][0]['shipping_key'] ?? ''), true)); ?>)
<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Versandart ändern', 'wpsg'); ?>" onclick="return WPSG_BE_Pay_Ship.changeShippingPayment();"><span class="glyphicon glyphicon-pencil"></span></a>
</td>
<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
@@ -206,7 +207,16 @@
<tr class="wpsg_row_payment">
<td colspan="2" class="wpsg_cell_payment_label">
<?php echo __('Zahlungsart', 'wpsg'); ?>
- <?php echo __(' ('.$this->arPayment[$arCalculation['payment'][0]['payment_key']]['name'].')', 'wpsg'); ?>
+ <?php
+
+ // Die Zahlungsart der Bestellung kann inzwischen deaktiviert oder gelöscht sein
+ $payment_key = (string)($arCalculation['payment'][0]['payment_key'] ?? '');
+ $payment_name = (string)$this->getPaymentName($payment_key, intval($this->view['data']['id'] ?? 0));
+
+ if ($payment_name === '') $payment_name = wpsg_translate(__('Deaktivierte Zahlungsart (#1#)', 'wpsg'), $payment_key);
+
+ ?>
+ (<?php echo esc_html($payment_name); ?>)
<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Zahlungsart ändern', 'wpsg'); ?>" onclick="return WPSG_BE_Pay_Ship.changeShippingPayment();"><span class="glyphicon glyphicon-pencil"></span></a>
</td>
<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
diff --git a/views/warenkorb/basket.phtml b/views/warenkorb/basket.phtml
index 19575e3..d05e574 100644
--- a/views/warenkorb/basket.phtml
+++ b/views/warenkorb/basket.phtml
@@ -18,19 +18,13 @@
?>
<div class="wpsg alignwide wpsg_basket <?php echo ((isset($_REQUEST['wpsg_basket_ajax']))?'wpsg_basket_ajax':''); ?>">
- <?php if ($this->hasMod('wpsg_mod_onepagecheckout') && ($this->get_option('wpsg_mod_onepagecheckout_basket') == 1)) { ?>
- <?php } else {?>
<?php echo $this->writeFrontendMessage(); ?>
- <?php } ?>
<?php $this->callMods('basket_top'); ?>
<?php if (sizeof($this->view['basket']['produkte']) > 0) { ?>
- <?php if ($this->hasMod('wpsg_mod_onepagecheckout') && ($this->get_option('wpsg_mod_onepagecheckout_basket') == 1)) { ?>
- <?php } else {?>
- <?php $GLOBALS['step'] = 1; $this->render(WPSG_PATH_VIEW.'/warenkorb/progress.phtml'); ?>
- <?php } ?>
+ <?php $GLOBALS['step'] = 1; $this->render(WPSG_PATH_VIEW.'/warenkorb/progress.phtml'); ?>
<?php if (!isset($this->view['noFormTag'])) { ?>
<form id="wpsg_basket_form" name="wpsg_basket_form" method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_CHECKOUT); ?>" enctype="multipart/form-data">
@@ -407,17 +401,14 @@
<input type="hidden" name="wpsg_basket_submit" value="1" />
<input type="submit" class="wpsg_button wpsg_refreshbutton" value="<?php echo __('aktualisieren', 'wpsg'); ?>" name="wpsg_basket_refresh" />
- <?php if ($this->hasMod('wpsg_mod_onepagecheckout') && ($this->get_option('wpsg_mod_onepagecheckout_basket') == 1)) { ?>
- <?php } else { ?>
- <input type="submit" class="wpsg_button wpsg_checkoutbutton" id="wpsg_basket_submit" value="<?php echo __('zur Kasse', 'wpsg'); ?>" name="wpsg_checkout" />
+ <input type="submit" class="wpsg_button wpsg_checkoutbutton" id="wpsg_basket_submit" value="<?php echo __('zur Kasse', 'wpsg'); ?>" name="wpsg_checkout" />
+
+ <br /><br />
+
+ <?php /* Weiter-shoppen-Seite (auskommentierte Zeile: Ziel ist die Blogstartseite) */ ?>
+ <?php echo wpsg_translate(__('<a href="#1#" class="do_shopping_link">weiter shoppen</a>', 'wpsg'), $this->getURL(wpsg_ShopController::URL_BASKET_MORE)); ?>
+ <?php /* <a href="<?php echo WPSG_URL_WP;?>" class="wpsg_basket_weiter_shoppen2"><?php echo __('weiter shoppen', 'wpsg'); ?></a> */?>
- <br /><br />
-
- <?php /* Weiter-shoppen-Seite (auskommentierte Zeile: Ziel ist die Blogstartseite) */ ?>
- <?php echo wpsg_translate(__('<a href="#1#" class="do_shopping_link">weiter shoppen</a>', 'wpsg'), $this->getURL(wpsg_ShopController::URL_BASKET_MORE)); ?>
- <?php /* <a href="<?php echo WPSG_URL_WP;?>" class="wpsg_basket_weiter_shoppen2"><?php echo __('weiter shoppen', 'wpsg'); ?></a> */?>
-
- <?php } ?>
<div class="wpsg_clear"></div>
<?php $this->ClearSessionErrors(); ?>
diff --git a/views/warenkorb/overview.phtml b/views/warenkorb/overview.phtml
index 350c014..689e5e0 100644
--- a/views/warenkorb/overview.phtml
+++ b/views/warenkorb/overview.phtml
@@ -13,10 +13,7 @@
<?php echo $this->writeFrontendMessage(); ?>
- <?php if ($this->hasMod('wpsg_mod_onepagecheckout') && ($this->get_option('wpsg_mod_onepagecheckout_basket') == 1)) { ?>
- <?php } else {?>
- <?php $GLOBALS['step'] = 4; $this->render(WPSG_PATH_VIEW.'/warenkorb/progress.phtml'); ?>
- <?php } ?>
+ <?php $GLOBALS['step'] = 4; $this->render(WPSG_PATH_VIEW.'/warenkorb/progress.phtml'); ?>
<form method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>" id="wpsg_form">
@@ -27,7 +24,7 @@
<?php if (!$this->hasMod('wpsg_mod_ordercondition')) { ?>
<div class="wpsg_agb">
<label>
- <input type="checkbox" value="1" name="wpsg[agb]" required />
+ <input type="checkbox" value="1" name="wpsg[agb]" required <?php echo (($this->getAcceptedConditions($this->view['basket'])['agb'])?'checked="checked"':''); ?> />
<?php echo wpsg_translate(__('Ich habe die #1# des Anbieters gelesen und erkläre mit dem Absenden der Bestellung mein Einverständnis. Die #2# habe ich zur Kenntnis genommen.', 'wpsg'),
'<a target="_blank" href="'.$this->getURL(wpsg_ShopController::URL_AGB).'">'.__('AGB', 'wpsg').'</a>',
'<a target="_blank" href="'.$this->getURL(wpsg_ShopController::URL_WIDERRUF).'">'.__('Widerrufsbelehrung', 'wpsg').'</a>');
@@ -125,11 +122,7 @@
<div class="anschrift">
<div class="subtitle"><?php echo __('Liefer- und Rechnungsanschrift', 'wpsg'); ?>&nbsp;
- <?php if ($this->hasMod('wpsg_mod_onepagecheckout') && ($this->get_option('wpsg_mod_onepagecheckout_basket') == 1)) { ?>
<span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ändern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT)); ?></span>
- <?php } else { ?>
- <span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ändern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT)); ?></span>
- <?php } ?>
</div>
<?php if ($this->view['pflicht']['firma'] != '2') { ?>
<?php if (trim($this->view['basket']['checkout']['firma']) != '') { ?>
diff --git a/views/warenkorb/progress.phtml b/views/warenkorb/progress.phtml
index 1a8240f..542350b 100644
--- a/views/warenkorb/progress.phtml
+++ b/views/warenkorb/progress.phtml
@@ -6,14 +6,12 @@
?>
-<div class="wpsg_progress <?php echo (($this->get_option('wpsg_mod_onepagecheckout') == '')?'':'only3steps'); ?>">
+<div class="wpsg_progress">
<a href="<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET); ?>">
<span class="step step1 <?php echo (($GLOBALS['step'] === 1)?'current':'done'); ?>" title="<?php echo __('Hier gelangen Sie zum Warenkorb', 'wpsg'); ?>"><span class="dot"></span><span class="text"><?php echo __('Warenkorb', 'wpsg'); ?></span></span>
</a>
-
- <?php if ($this->get_option('wpsg_mod_onepagecheckout') == '') { ?>
-
+
<?php if ($GLOBALS['step'] > 1) { ?><a href="<?php echo $this->getURL(wpsg_ShopController::URL_CHECKOUT); ?>"><?php } ?>
<span class="step step2 <?php echo (($GLOBALS['step'] ===2)?'current':''); ?> <?php echo (($GLOBALS['step'] > 2)?'done':''); ?>" title="<?php echo __('Hier gelangen Sie zum Formular der Kundendaten', 'wpsg'); ?>">
<span class="dot"></span><span class="text"><?php echo __('Kundendaten', 'wpsg'); ?></span>
@@ -31,23 +29,6 @@
<span class="dot"></span><span class="text"><?php echo __('Abschluss', 'wpsg'); ?></span>
</span>
<?php if ($GLOBALS['step'] > 3) { ?></a><?php } ?>
-
- <?php } else { ?>
-
- <?php /* Onepagecheckout */ ?>
- <?php if ($GLOBALS['step'] > 1) { ?><a href="<?php echo $this->getURL(wpsg_ShopController::URL_CHECKOUT); ?>"><?php } ?>
- <span class="step step2 <?php echo (($GLOBALS['step'] ===2)?'current':''); ?> <?php echo (($GLOBALS['step'] > 2)?'done':''); ?>" title="<?php echo __('Hier gelangen Sie zum Formular der Kundendaten, Bezahlmethode und der Versandart', 'wpsg'); ?>">
- <span class="dot"></span><span class="text"><?php echo __('Kundendaten / Zahlung / Versand', 'wpsg'); ?></span>
- </span>
- <?php if ($GLOBALS['step'] > 1) { ?></a><?php } ?>
-
- <?php if ($GLOBALS['step'] > 2) { ?><a href=""><?php } ?>
- <span class="step step3 <?php echo (($GLOBALS['step'] === 3)?'current':''); ?> <?php echo (($GLOBALS['step'] > 3)?'done':''); ?>" title="<?php echo __('Hier gelangen Sie zum Bestellübersicht', 'wpsg'); ?>">
- <span class="dot"></span><span class="text"><?php echo __('Abschluss', 'wpsg'); ?></span>
- </span>
- <?php if ($GLOBALS['step'] > 2) { ?></a><?php } ?>
-
- <?php } ?>
</div>