diff options
219 files changed, 4528 insertions, 2252 deletions
diff --git a/views/admin/access.phtml b/views/admin/access.phtml index 9e41787..b1b40c2 100644 --- a/views/admin/access.phtml +++ b/views/admin/access.phtml @@ -34,7 +34,7 @@ <tr>
<th class="wpsg_col_capname"></th>
<?php foreach ($arRoles as $role_key => $r) { ?>
- <th class="wpsg_col_cap"><?php echo $r['name']; ?></th>
+ <th class="wpsg_col_cap"><?php echo esc_html(translate_user_role($r['name'])); ?></th>
<?php } ?>
<th></th>
</tr>
diff --git a/views/admin/dataprotection.phtml b/views/admin/dataprotection.phtml index d4aba39..53ccc8f 100644 --- a/views/admin/dataprotection.phtml +++ b/views/admin/dataprotection.phtml @@ -35,8 +35,8 @@ <?php echo wpsg_drawForm_Input('dataprotectioncommissioner_email', __('E-Mail:', 'wpsg'), $this->get_option('dataprotectioncommissioner_email')); ?>
<?php echo wpsg_drawForm_TextStart(); ?>
- <a href="https://www.bfdi.bund.de/DE/Infothek/Anschriften_Links/anschriften_links-node.html" target=_blank ><?php echo __('Liste der Aufsichtsbehörden (Inland, EU, Ausland)', 'wpsg'); ?></a>
- <?php echo wpsg_drawForm_TextEnd(__('Meldepflicht nach §4d Abs. 1 BDSG', 'wpsg')); ?>
+ <a href="https://www.bfdi.bund.de/DE/Service/Anschriften/anschriften_table.html" target=_blank ><?php echo __('Liste der Aufsichtsbehörden (Inland, EU, Ausland)', 'wpsg'); ?></a>
+ <?php echo wpsg_drawForm_TextEnd(__('Mitteilung an die Aufsichtsbehörde (Art. 37 Abs. 7 DSGVO)', 'wpsg')); ?>
</div>
</div>
@@ -51,7 +51,14 @@ <?php echo wpsg_drawForm_Input('wpsg_customerdatadelete', __('Letzte Aktivität älter als', 'wpsg'), $this->get_option('wpsg_customerdatadelete'));?>
<?php echo wpsg_drawForm_Select('wpsg_customerdatadelete_unit', __('Einheit', 'wpsg'), array('0' => __('Tag(e)', 'wpsg'), '1' => __('Monat(e)', 'wpsg'), '2' => __('Jahr(e)', 'wpsg')), $this->get_option('wpsg_customerdatadelete_unit')); ?>
<?php echo wpsg_drawForm_Select('wpsg_customerdatedelete_who', __('Kundenart', 'wpsg'), ['0' => __('Alle', 'wpsg'), '1' => __('Nur Gastkunden', 'wpsg')], $this->get_option('wpsg_customerdatedelete_who')); ?>
-
+
+ <br />
+
+ <?php echo wpsg_drawForm_Input('wpsg_guestdelete_days', __('Gastkunden ohne Bestellung anonymisieren nach', 'wpsg'), $this->get_option('wpsg_guestdelete_days'), [
+ 'unit' => __('Tagen', 'wpsg'),
+ 'hint' => __('Gilt für Gastkunden, die nur Kundendaten eingegeben, aber nicht bestellt haben. Ihre unvollständigen Bestellungen werden dabei gelöscht. Leer oder 0: aus.', 'wpsg')
+ ]); ?>
+
</div>
</div>
diff --git a/views/admin/emailconf.phtml b/views/admin/emailconf.phtml index 5337038..6894fc3 100644 --- a/views/admin/emailconf.phtml +++ b/views/admin/emailconf.phtml @@ -27,7 +27,7 @@ <?php wp_nonce_field('wpsg-admin-emailconf'); ?>
- <?php echo wpsg_drawForm_AdminboxStart('Allgemeine Einstellungen', 'wpsg'); ?>
+ <?php echo wpsg_drawForm_AdminboxStart(__('Allgemeine Einstellungen', 'wpsg')); ?>
<?php $logoPath = wpsg_getUploadDir('wpsg_mailconf').'wpsg_email_logo.jpg'; ?>
<?php echo wpsg_drawForm_Checkbox(
diff --git a/views/admin/extended.phtml b/views/admin/extended.phtml index 1b77e11..d635366 100644 --- a/views/admin/extended.phtml +++ b/views/admin/extended.phtml @@ -50,7 +50,7 @@ <?php echo wpsg_drawForm_Checkbox('wpsg_nocache', __('Cachen von dynamischen Shopseiten verhindern', 'wpsg'), $this->get_option('wpsg_nocache'), array('help' => 'wpsg_nocache')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_autolineending', __('MAC Kompatibilität bei Dateiimporten', 'wpsg'), $this->get_option('wpsg_autolineending'), array('help' => 'wpsg_autolineending')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_dontcopymedia', __('Produktbilder nicht kopieren', 'wpsg'), $this->get_option('wpsg_dontcopymedia'), ['help' => 'wpsg_dontcopymedia']); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_switchtolowestshippingafterproductremove', __('Nach dem entfernen eines Produktes auf die günstigste Zahlungsart wechseln', 'wpsg'), $this->get_option('wpsg_switchtolowestshippingafterproductremove'), array('help' => 'wpsg_switchtolowestshippingafterproductremove')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_switchtolowestshippingafterproductremove', __('Nach dem Entfernen eines Produktes auf die günstigste Versandart wechseln', 'wpsg'), $this->get_option('wpsg_switchtolowestshippingafterproductremove'), array('help' => 'wpsg_switchtolowestshippingafterproductremove')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_save_order_after_mail', __('Erinnerung an Kunden bei unvollständiger Bestellung', 'wpsg'), $this->get_option('wpsg_save_order_after_mail'), array('help' => 'wpsg_save_order_after_mail')); ?>
<?php echo wpsg_drawForm_Select('wpsg_geo_determination', __('Abfrage des Kundenstandortes (EU-Leistungsortregel)', 'wpsg'), $this->view['arGeoMode'], $this->get_option('wpsg_geo_determination'), array('help' => 'wpsg_geo_determination')); ?>
diff --git a/views/admin/form/checkbox.phtml b/views/admin/form/checkbox.phtml index 12e184a..5dcee75 100644 --- a/views/admin/form/checkbox.phtml +++ b/views/admin/form/checkbox.phtml @@ -37,7 +37,7 @@ <?php } ?>
<?php if (wpsg_isSizedString($this->view['field_config']['hint'])) { ?>
- <div class="hint info"><?php echo $this->view['field_config']['hint']; ?></div>
+ <div class="hint info"><?php echo preg_replace('/^nohspc_/', '', $this->view['field_config']['hint']); ?></div>
<?php } ?>
</div>
diff --git a/views/admin/form/emailconf.phtml b/views/admin/form/emailconf.phtml index c8c0791..67b0aff 100644 --- a/views/admin/form/emailconf.phtml +++ b/views/admin/form/emailconf.phtml @@ -5,7 +5,7 @@ <?php echo wpsg_drawForm_Input('wpsg_'.$this->view['field_key'].'_absender', __('Absender', 'wpsg'), $this->get_option('wpsg_'.$this->view['field_key'].'_absender')); ?>
<?php if ($this->view['field_to'] === true) { ?>
- <?php echo wpsg_drawForm_Input('wpsg_'.$this->view['field_key'].'_empfaenger', __('Empfänger', 'wpsg'), $GLOBALS['wpsg_sc']->get_option('wpsg_'.$this->view['field_key'].'_empfaenger')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_'.$this->view['field_key'].'_empfaenger', __('Empfänger', 'wpsg'), wpsg_ShopController::getShop()->get_option('wpsg_'.$this->view['field_key'].'_empfaenger')); ?>
<?php } ?>
<?php echo wpsg_drawForm_Input('wpsg_'.$this->view['field_key'].'_cc', __('CC', 'wpsg'), $this->get_option('wpsg_'.$this->view['field_key'].'_cc')); ?>
@@ -14,7 +14,7 @@ <?php if ($this->view['field_key'] === 'reminder') { ?>
<?php echo wpsg_drawForm_Input('wpsg_reminder_hours', __('Automatischer Versand nach Bestellerstellung in Stunden', 'wpsg'), $this->get_option('wpsg_reminder_hours')); ?>
- <?php echo wpsg_drawForm_Input(false, __('CRON URL', 'wpsg'), site_url().'/?wpsg_cron=1', ['readonly' => true]); ?>
+ <p class="info"><?php echo __('Der Versand läuft stündlich über die WordPress-Zeitsteuerung (WP-Cron).', 'wpsg'); ?></p>
<?php } ?>
@@ -22,7 +22,7 @@ <label class="col-sm-6 control-label">
- <input value="<?php echo __('Neuer Anhang', 'wpsg'); ?>" data-key="<?php echo $this->view['field_key']; ?>" class="btnAddAttachment button" type="text" style="text-align:center;" size="10" id="media_<?php echo $this->view['field_key']; ?>" />
+ <input value="<?php echo __('Neuer Anhang', 'wpsg'); ?>" data-key="<?php echo $this->view['field_key']; ?>" class="btnAddAttachment button" type="button" id="media_<?php echo $this->view['field_key']; ?>" />
</label>
diff --git a/views/admin/form/input.phtml b/views/admin/form/input.phtml index e1b17bf..60482d1 100644 --- a/views/admin/form/input.phtml +++ b/views/admin/form/input.phtml @@ -29,6 +29,7 @@ ?>"
value="<?php echo wpsg_hspc($this->view['field_value']); ?>"
+ <?php echo ((isset($this->view['field_config']['min']))?' min="'.$this->view['field_config']['min'].'" ':''); ?>
id="<?php echo $this->view['field_id']; ?>"
placeholder="<?php echo wpsg_getStr($this->view['field_config']['placeholder']); ?>"
<?php if (wpsg_isTrue($this->view['field_config']['readonly'])) { ?>
@@ -50,7 +51,7 @@ <?php } ?>
<?php if (wpsg_isSizedString($this->view['field_config']['hint'])) { ?>
- <small id="emailHelp" class="form-text text-muted"><?php echo $this->view['field_config']['hint']; ?></small>
+ <small id="emailHelp" class="form-text text-muted"><?php echo preg_replace('/^nohspc_/', '', $this->view['field_config']['hint']); ?></small>
<?php } ?>
</div>
diff --git a/views/admin/form/select.phtml b/views/admin/form/select.phtml index ed142e3..d29158d 100644 --- a/views/admin/form/select.phtml +++ b/views/admin/form/select.phtml @@ -101,7 +101,7 @@ </div>
<?php if (wpsg_isSizedString($this->view['field_config']['hint'])) { ?>
- <div class="hint info"><?php echo $this->view['field_config']['hint']; ?></div>
+ <div class="hint info"><?php echo preg_replace('/^nohspc_/', '', $this->view['field_config']['hint']); ?></div>
<?php } ?>
</div>
diff --git a/views/admin/hilfe.phtml b/views/admin/hilfe.phtml index 3486484..4a6569c 100644 --- a/views/admin/hilfe.phtml +++ b/views/admin/hilfe.phtml @@ -14,18 +14,14 @@ <?php echo wpsg_drawForm_AdminboxStart(__('Tutorials', 'wpsg')); ?>
<p><?php echo __("In den Tutorial haben wir praxisnahe Beispiele verwendet, um die einzelnen Funktionen näher zu erklären. Rechts im Menü können die Kategorien näher ausgewählt werden, ganz oben gibt es ein Suchfenster, was ganz sehr gut funktioniert ;)", "wpsg"); ?></p>
- <a href="http://wpshopgermany.maennchen1.de/category/tutorials/">http://wpshopgermany.maennchen1.de/category/tutorials/</a>
+ <a href="https://doc.maennchen1.de/wpshopgermany/aktuell/tutorials/">https://doc.maennchen1.de/wpshopgermany/aktuell/tutorials/</a>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
<?php echo wpsg_drawForm_AdminboxStart(__('Forum', 'wpsg')); ?>
<p><?php echo __("Alle Anfragen hinsichtlich Fehler, Inbetriebnahme und Administration beantworten wir zeitnah (während unserer Geschäftszeiten). Vielleicht ist deine Frage bereits im Forum gestellt und beantwortet worden? Das Suchformular dort ist auch sehr mächtig, probiere es doch mal aus!", "wpsg"); ?></p>
<p><?php echo __("Bitte nutze generell das Forum für eine Support-Anfrage, <u>nicht</u> unser Kontaktformular oder Telefon.", "wpsg"); ?></p>
- <a href="http://forum.maennchen1.de/">http://forum.maennchen1.de/</a>
+ <a href="https://forum.maennchen1.de/">https://forum.maennchen1.de/</a>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
- <?php echo wpsg_drawForm_AdminboxStart(__('Feature Wunschliste', 'wpsg')); ?>
- <p><?php echo __("Wir orientieren uns direkt am Markt. Insofern geben wir dir als User die Möglichkeit mitzuentscheiden, welches Feature wpShopGermany zukünftig haben wird. Du kannst selber einen Feature-Wunsch anlegen, oder für einen bestehenden Wunsch deine Stimme abgeben.", "wpsg"); ?></p>
- <a href="https://wpshopgermany.uservoice.com/">https://wpshopgermany.uservoice.com/</a>
- <?php echo wpsg_drawForm_AdminboxEnd(); ?>
</div>
\ No newline at end of file diff --git a/views/admin/includes.phtml b/views/admin/includes.phtml index de0f5a0..9dc5701 100644 --- a/views/admin/includes.phtml +++ b/views/admin/includes.phtml @@ -41,7 +41,6 @@ <br />
- <?php echo wpsg_drawForm_Checkbox('wpsg_load_bootstrap_glyphfont_css', __('Bootstrap Glyphfont CSS im Frontend laden', 'wpsg'), $this->get_option('wpsg_load_bootstrap_glyphfont_css'), array('help' => 'wpsg_load_bootstrap_glyphfont_css')); ?>
<br />
diff --git a/views/admin/konfiguration.phtml b/views/admin/konfiguration.phtml index 6ddebfa..b4213f9 100644 --- a/views/admin/konfiguration.phtml +++ b/views/admin/konfiguration.phtml @@ -47,11 +47,7 @@ </div>
<?php } else { ?>
<?php wpsg_drawForm_TextStart(); ?>
- <?php echo WPSG_VERSION; ?> <a href="<?php
-
- echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=allgemein&do=update&submit=1&noheader=1', 'wpsg-admin-db-update');
-
- ?>"><?php echo __("Aktualisieren", "wpsg"); ?></a>
+ <?php echo WPSG_VERSION; ?>
<?php echo wpsg_drawForm_TextEnd(__('Installierte DB Version', 'wpsg'), array('help' => 'DBUpdate')); ?>
<?php } ?>
diff --git a/views/admin/kundendaten_tab3.phtml b/views/admin/kundendaten_tab3.phtml index 36c4916..c47ee1c 100644 --- a/views/admin/kundendaten_tab3.phtml +++ b/views/admin/kundendaten_tab3.phtml @@ -26,7 +26,7 @@ <?php echo wpsg_drawForm_Select('wpsg_defaultland', __('Standardland', 'wpsg'), $this->view['arLander'], $this->get_option('wpsg_defaultland'), array('help' => 'wpsg_defaultland', 'hint' =>
'nohspc_'.wpsg_translate(__('Die Länder können in der <a href="#1#">Länderverwaltung</a> definiert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=laender')
)); ?>
-<?php echo wpsg_drawForm_Select('wpsg_customerpreset_title', __('Standardanrede', 'wpsg'), $this->view['arTitle'], $this->get_option('wpsg_customerpreset_title'), array( 'help' => 'wpsg_customerpreset_title',
+<?php echo wpsg_drawForm_Select('wpsg_customerpreset_title', __('Standardanrede', 'wpsg'), ['-1' => __('Bitte auswählen', 'wpsg')] + $this->view['arTitle'], $this->get_option('wpsg_customerpreset_title'), array( 'help' => 'wpsg_customerpreset_title',
'hint' => 'nohspc_'.wpsg_translate(__('Die Auswahl kann in den <a href="#1#">Kundendaten</a> definiert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten'),
'noIndex' => true
)); ?>
\ No newline at end of file diff --git a/views/admin/licence.phtml b/views/admin/licence.phtml index c2a18ed..1c1cae0 100644 --- a/views/admin/licence.phtml +++ b/views/admin/licence.phtml @@ -144,7 +144,7 @@ <hr />
- <?php if (($wpsg_update_data['licence_model'] === 'enterprise' || sizeof($wpsg_update_data['domainData']) < 1) && !in_array($_SERVER['HTTP_HOST'], $wpsg_update_data['domainData'])) { ?>
+ <?php if (($wpsg_update_data['licence_model'] === 'enterprise' || sizeof((array)($wpsg_update_data['domainData'] ?? [])) < 1) && !in_array($_SERVER['HTTP_HOST'], (array)($wpsg_update_data['domainData'] ?? []))) { ?>
<p class="wpsg_message_ok"><?php echo __('Diese Domain kann noch auf Ihren Update-Zugang aktiviert werden.', 'wpsg'); ?></p>
@@ -156,7 +156,7 @@ ?>" class="btn btn-primary"><?php echo __('Diese Domain registrieren', 'wpsg'); ?></a>
- <?php } else if (in_array($_SERVER['HTTP_HOST'], $wpsg_update_data['domainData'])) { ?>
+ <?php } else if (in_array($_SERVER['HTTP_HOST'], (array)($wpsg_update_data['domainData'] ?? []))) { ?>
<p class="wpsg_message_ok"><?php echo __('Diese Domain ist bereits auf diesen Schlüssel registriert.', 'wpsg'); ?></p>
diff --git a/views/admin/module.phtml b/views/admin/module.phtml index f698747..6bba22f 100644 --- a/views/admin/module.phtml +++ b/views/admin/module.phtml @@ -47,7 +47,7 @@ <?php echo $this->arAllModule[$_REQUEST['modul']]->desc; ?>
- <a class="modul_help_link" target="_blank" href="https://doc.maennchen1.de/?modul_key=<?php echo $_REQUEST['modul']; ?>" title="<?php echo __('Hilfe zum Modul', 'wpsg'); ?>"><?php echo __('Hilfe zum Modul', 'wpsg'); ?></a>
+ <a class="modul_help_link" target="_blank" href="<?php echo esc_url(wpsg_getModulHilfeURL($_REQUEST['modul'])); ?>" title="<?php echo __('Hilfe zum Modul', 'wpsg'); ?>"><?php echo __('Hilfe zum Modul', 'wpsg'); ?></a>
</p>
diff --git a/views/admin/modulelist.phtml b/views/admin/modulelist.phtml index 9704987..59750bd 100644 --- a/views/admin/modulelist.phtml +++ b/views/admin/modulelist.phtml @@ -24,6 +24,8 @@ ?>
<?php if (wpsg_isSizedArray($wpsg_update_data['modulinfo'])) { ?>
+
+ <?php $arBetaModule = wpsg_get_beta_modules($wpsg_update_data['modulinfo']); $beta_version = wpsg_get_beta_version(); ?>
<?php /* foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info) { if ($modul_info['active'] !== true) unset($wpsg_update_data['modulinfo'][$modul_key]); } */ ?>
@@ -40,6 +42,7 @@ <?php foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info) { ?>
<?php /* Installierte Modulversion; Module ohne deklariertes $version liefern null -> vor PHP-8-Warnungen und version_compare()-Deprecations schuetzen. */ ?>
<?php $modul_version_installed = ($this->shop->hasModInstalled($modul_key) ? ($this->shop->arAllModule[$modul_key]->version ?? '') : ''); ?>
+ <?php $modul_version_available = (isset($arBetaModule[$modul_key]))?$beta_version:$modul_info['version']; ?>
<tr style="font-style:normal;" class="<?php
if ($modul_info['free'] === true) echo 'active';
@@ -115,21 +118,21 @@ }
- echo $modul_info['version'];
+ echo $modul_version_available;
- if ($this->shop->hasModInstalled($modul_key) && $modul_info['version'] === $modul_version_installed)
+ if ($this->shop->hasModInstalled($modul_key) && $modul_version_available === $modul_version_installed)
{
echo ' - <strong class="wpsg_message_ok">'.__('aktuell', 'wpsg').'</strong>';
}
- else if ($this->shop->hasModInstalled($modul_key) && version_compare($modul_info['version'], WPSG_VERSION) > 0)
+ else if ($this->shop->hasModInstalled($modul_key) && version_compare($modul_version_available, WPSG_VERSION) > 0)
{
echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong><br />'.wpsg_translate(__('<a href="#1#">wpShopGermany Update</a> notwendig', 'wpsg'), WPSG_URL_WP.'wp-admin/plugins.php');
}
- else if ($this->shop->hasModInstalled($modul_key) && version_compare($modul_info['version'], $modul_version_installed) > 0)
+ else if ($this->shop->hasModInstalled($modul_key) && version_compare($modul_version_available, $modul_version_installed) > 0)
{
echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong>';
diff --git a/views/admin/path.phtml b/views/admin/path.phtml index db0237d..63fb129 100644 --- a/views/admin/path.phtml +++ b/views/admin/path.phtml @@ -32,7 +32,7 @@ <br />
</div>
- <?php echo wpsg_drawForm_Input('wpsg_path_upload_multiblog', __('Multiblog Upload Path (relativ zu wp-content)', 'wpsg'), $this->get_option('wpsg_path_upload_multiblog', true), array('hint' => __('Sollte den Platzhalter %blog_id% enthalten, dieser zeigt auf die ID des jeweiligen Blockes sonst kann es bei dem Betrieb von mehreren Shops zu Überschreibungen kommen.', 'wpsg'))); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_path_upload_multiblog', __('Multiblog Upload Path (relativ zu wp-content)', 'wpsg'), $this->get_option('wpsg_path_upload_multiblog', true), array('hint' => __('Bei „Jeden Blog getrennt behandeln“ den Platzhalter %blog_id% verwenden, sonst überschreiben sich die Dateien der Shops. Bei einem gemeinsamen Shop für alle Blogs einen Pfad ohne %blog_id% eintragen, sonst liegen Rechnungen und Downloads je nach Blog in verschiedenen Ordnern. Ein geänderter Pfad gilt nur für neue Dateien.', 'wpsg'))); ?>
<input type="hidden" name="subaction" value="path" />
diff --git a/views/admin/ueber.phtml b/views/admin/ueber.phtml index ba2786d..fc22d69 100644 --- a/views/admin/ueber.phtml +++ b/views/admin/ueber.phtml @@ -72,7 +72,7 @@ <?php echo $plugin_data['Name']; ?> / <?php echo $plugin_data['Version']; ?><br />
<?php } ?>
- <?php echo wpsg_drawForm_TextEnd(__('aktive Wordpress Plugins', 'wpsg')); ?>
+ <?php echo wpsg_drawForm_TextEnd(__('aktive WordPress-Plugins', 'wpsg')); ?>
<?php wpsg_drawForm_TextStart(); ?>
<?php if (wpsg_isSizedArray($this->get_option('wpsg_plugintest_active_plugins'))) { ?>
@@ -152,11 +152,11 @@ <?php if (isset($_REQUEST['subaction']) && $_REQUEST['subaction'] == 'systemlog') { ?>
<?php echo wpsg_drawForm_AdminboxStart(__('Fehlerprotokoll', 'wpsg'), '', array('style' => 'width:905px;')); ?>
- <?php if (!file_exists($GLOBALS['wpsg_sc']->getStorageRoot().'exception.log')) { ?>
+ <?php if (!file_exists(wpsg_ShopController::getShop()->getStorageRoot().'exception.log')) { ?>
<p><?php echo __('Es wurden noch keine Systemfehler aufgezeichnet.', 'wpsg'); ?></p>
<?php } else { ?>
- <textarea style="width:875px; overflow-y:scroll; height:500px; font-size:12px; font-family:Courier;"><?php echo file_get_contents($GLOBALS['wpsg_sc']->getStorageRoot().'exception.log'); ?></textarea>
+ <textarea style="width:875px; overflow-y:scroll; height:500px; font-size:12px; font-family:Courier;"><?php echo file_get_contents(wpsg_ShopController::getShop()->getStorageRoot().'exception.log'); ?></textarea>
<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=ueber&subaction=clearSysLog&noheader=1" class="button"><?php echo __('Protokolldatei löschen', 'wpsg'); ?></a>
diff --git a/views/admin/widerrufsbelehrung.phtml b/views/admin/widerrufsbelehrung.phtml index 3534a5a..2eeff7c 100644 --- a/views/admin/widerrufsbelehrung.phtml +++ b/views/admin/widerrufsbelehrung.phtml @@ -67,6 +67,32 @@ <?php if ($this->hasMod('wpsg_mod_auftragsbestaetigung')) { ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_widerrufsformular_orderconfirm', __('Anhang an Auftragsbestätigung', 'wpsg'), $this->get_option('wpsg_widerrufsformular_orderconfirm')); ?>
<?php } ?>
+
+ <hr />
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_warranty_label', __('Gewährleistungslabel anzeigen wenn nötig', 'wpsg'), $this->get_option('wpsg_warranty_label'), ['id' => 'wpsg_warranty_label']); ?>
+
+ <div id="wpsg_warranty_label_layer" style="display:none;">
+ <?php echo wpsg_drawForm_Select('wpsg_warranty_layout', __('Darstellung vom Gewährleistungslabel', 'wpsg'), [
+ wpsg_ShopController::WARRANTYLABEL_POPUP => __('Als Popup vor Bestellabschluss', 'wpsg'),
+ wpsg_ShopController::WARRANTYLABEL_INLINE => __('vor "Zahlungspflichtig bestellen"', 'wpsg')
+ ], wpsg_ShopController::getShop()->get_option('wpsg_warranty_layout')); ?>
+ </div>
+ <script>
+
+ const el_wpsg_warranty_label = document.getElementById('wpsg_warranty_label');
+ const el_wpsg_warranty_label_layer = document.getElementById('wpsg_warranty_label_layer');
+
+ el_wpsg_warranty_label.addEventListener('change', () => {
+
+ if (el_wpsg_warranty_label.checked) el_wpsg_warranty_label_layer.style.display = 'block';
+ else el_wpsg_warranty_label_layer.style.display = 'none';
+
+ });
+
+ el_wpsg_warranty_label.dispatchEvent(new Event('change'));
+
+ </script>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
diff --git a/views/admin/wpml.phtml b/views/admin/wpml.phtml index df2c08c..d48042b 100644 --- a/views/admin/wpml.phtml +++ b/views/admin/wpml.phtml @@ -30,12 +30,7 @@ </div>
<div class="panel-body">
- <?php /* ?>
- <?php echo wpsg_drawForm_Checkbox('clear', __('Nicht verwendete String-Übersetzungen entfernen', 'wpsg'), false, array('fullWidth' => true)); ?>
-
- <br /> */ ?>
-
- <p class="info"><?php echo __('Fügt dynamische Inhalte wie Ländernamen, Namen von Varianten etc. zu den String-Übersetzungen von WPML hinzu und ermöglicht unter WPML -> String-Übersetzung die Übersetzung von diesen Inhalten.', 'wpsg'); ?></p>
+ <p class="info"><?php echo __('Fügt Ländernamen, Versandzonen, die Anredeauswahl und den Widerrufstext der Bestellbestätigung zu den String-Übersetzungen von WPML hinzu. Übersetzen Sie diese Einträge danach unter WPML -> String-Übersetzung. Zuvor automatisch angelegte Einträge werden dabei samt Übersetzung ersetzt.', 'wpsg'); ?></p>
<input type="submit" name="wpsg_set_string_translation" class="button" value="<?php echo __('String-Übersetzung füllen', 'wpsg'); ?>" />
diff --git a/views/css/admin.css b/views/css/admin.css index d41b510..9b8ab4b 100644 --- a/views/css/admin.css +++ b/views/css/admin.css @@ -242,7 +242,7 @@ .wpsg_admin_ueber_check_wrap .wpsg_admin_ueber_check_1 { } /* Notice Meldungen */
.wpsg_admin_ueber_check_wrap .wpsg_admin_ueber_check_2 { } /* Warnungen Meldungen */
.wpsg_admin_ueber_check_wrap .wpsg_admin_ueber_check_3 { } /* Error Meldungen */
-.email-logo-alignment, .email-logo-alignment input[type="radio"] { font-family: FontAwesome; margin: 0; outline: 0; }
+.email-logo-alignment, .email-logo-alignment input[type="radio"] { font-family: FontAwesome, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; margin: 0; outline: 0; }
.email-logo { padding-bottom: 10px; }
.email-logo-watermark { position:absolute; top:10%; left:0; right:0; display:flex; justify-content:center; align-items:center; }
.wpsg_mailattachment { padding:8px 0px; }
@@ -440,8 +440,8 @@ .wpsg_mod_deliverynote_fieldtable { font-size:12px; }
.wpsg_mod_deliverynote_fieldtable .col_bezeichnung { width:125px; }
.wpsg_mod_deliverynote_fieldtable .col_x,
-.wpsg_mod_deliverynote_fieldtable .col_y { width:50px; }
-.wpsg_mod_deliverynote_fieldtable .col_color { width:80px; }
+.wpsg_mod_deliverynote_fieldtable .col_y { width:70px; }
+.wpsg_mod_deliverynote_fieldtable .col_color { width:95px; }
.wpsg_mod_deliverynote_fieldtable .col_groesse { width:60px; }
.wpsg_foottextlist .col_standard { text-align:center; }
.align-buttons input, .align-buttons input:hover { font-family: FontAwesome !important; cursor: pointer; outline: 0; border: 1px solid #ddd; background: #f9f9f9; color: #666; padding: 3px 7px; width: 30%; }
@@ -468,16 +468,26 @@ /* 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; }
/* Modul Downloadplus */
.wpsg_mod_downloadplus_fieldtable { font-size:12px; }
.wpsg_mod_downloadplus_fieldtable .col_x,
-.wpsg_mod_downloadplus_fieldtable .col_y { width:50px; }
+.wpsg_mod_downloadplus_fieldtable .col_y { width:70px; }
/* Produktvariablen */
.wpsg_pv_table { width:100%; }
diff --git a/views/css/frontend.css b/views/css/frontend.css index d8f46ef..c64bc52 100644 --- a/views/css/frontend.css +++ b/views/css/frontend.css @@ -1,8 +1,11 @@ @CHARSET "UTF-8";
/* Allgemein */
+.wpsg-flex { display:flex; }
+.wpsg-align-center { align-items:center; }
+.wpsg-gap-2 { gap:0.5rem; }
.wpsg_clear { clear:both; }
-#wpsg_error, #wpsg_message { margin-bottom:1rem; margin-left:0; }
+#wpsg_error, #wpsg_message { margin-bottom:1rem; margin-left:0; padding-left:0; }
#wpsg_message li, #wpsg_error li, #wpsg_notice li,
#wpsg_message p, #wpsg_error p, #wpsg_notice p { list-style:none; margin-bottom:4px; padding:3px 0px 3px 8px; }
#wpsg_message li,
@@ -16,11 +19,88 @@ .wpsg h2 { }
.wpsg_checkout label.wpsg_error { background-color:white; }
label.wpsg_error { position:absolute; right:2px; top:-2px; color:#DD3D36; }
-input.wpsg_error { border-color:red !important; }
+input.wpsg_error { border-color:red !important; border:1px solid red; }
.wpsg_spacer { width:100%; height:1px; background-color:#EAEAEA; margin-bottom:1rem; }
.wpsg_noscroll { overflow:hidden; }
.wpsg_upper { vertical-align:top; font-size:60%; }
+.wpsg {
+ select.wpsg_checkout { padding:0.75em 1em; }
+ input.wpsg_checkout { padding:0.75em 1em; }
+ textarea#wpsg_checkout_comment { padding:0.75em 1em; font-family:inherit; }
+}
+
+/* GARAN Label */
+.wpsg_product_garan_wrap { padding:5px 0; margin-bottom:2rem; font-family:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
+ .wpsg_product_garan { border:1px solid black; display:inline-block; padding:5px 50px 5px 5px; position:relative; height:30px; white-space:nowrap; cursor:pointer; text-decoration:none;
+ & > .years { font-size:30px; height:30px; line-height:30px; font-weight:bold; padding-right:35px; position:relative; border-right:1px solid black;
+ &:after { position:absolute; right:10px; bottom:8px; content:' '; width:16px; height:16px; background-image:url('/wp-content/plugins/wpshopgermany-free/views/gfx/garan/garan_year.svg'); background-size:contain; background-repeat:no-repeat; }
+ }
+ & > .title { padding-left:5px; font-size:22px; font-weight:bold; padding-right:20px; position:relative;
+ &:after { position:absolute; right:0; bottom:2px; content:' '; width:16px; height:16px; background-image:url('/wp-content/plugins/wpshopgermany-free/views/gfx/garan/garan_checkmark.svg'); background-size:contain; background-repeat:no-repeat; }
+ }
+ &:after { position:absolute; right:5px; top:0; content:' '; width:28px; height:40px; background-image:url('/wp-content/plugins/wpshopgermany-free/views/gfx/garan/garan_eu.svg'); background-size:contain; background-repeat:no-repeat; }
+ & > .tooltip { position:absolute; opacity:0; pointer-events:none; top:40px; left:-1px; padding:5px 5px 5px 0; transition:all 0.5s;
+ & > .inner { width:300px; min-height:300px; display:flex; flex-direction:column; gap:5px; background-color:white; padding:5px; border:1px solid black;
+ & > .border { border:1px solid black; display:flex; flex-direction:column; padding:5px;
+ .top { width:100%; border-bottom:2px solid black; padding-bottom:5px; position:relative;
+ & > .title { font-size:50px; font-weight:bold; padding-right:40px; position:relative; display:inline-block; line-height:50px; letter-spacing:1px;
+ &:after { position:absolute; right:0; bottom:5px; content:' '; width:32px; height:32px; background-image:url('/wp-content/plugins/wpshopgermany-free/views/gfx/garan/garan_checkmark.svg'); background-size:contain; background-position:right bottom; background-repeat:no-repeat; }
+ }
+ &:after { position:absolute; right:0; top:-11px; content:' '; width:36px; height:51px; background-image:url('/wp-content/plugins/wpshopgermany-free/views/gfx/garan/garan_eu.svg'); background-size:contain; background-repeat:no-repeat; }
+ }
+ & > .flexline { display:flex; justify-content:space-between; gap:5px; align-items:flex-start; padding:5px 0; font-size:16px; }
+ & > .line { display:flex; justify-content:space-between; gap:5px; align-items:flex-end; padding:5px 0;
+ & > .years { font-size:85px; height:85px; line-height:85px; font-weight:bold; padding-right:60px; position:relative;
+ &:after { position:absolute; right:10px; bottom:8px; content:' '; width:35px; height:35px; background-image:url('/wp-content/plugins/wpshopgermany-free/views/gfx/garan/garan_year.svg'); background-size:contain; background-repeat:no-repeat; }
+ }
+ & > img { transform:translateY(-8px); }
+ }
+ & > .trans_wrap { display:block; white-space:normal; text-align:justify; hyphens:auto; font-size:8px; line-height:1.4;
+ & > span + span:before { content:'|'; padding-right:1px; }
+ strong { font-weight:bold; }
+ }
+ }
+ }
+ }
+ &: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; }
@@ -32,7 +112,7 @@ input.wpsg_error { border-color:red !important; } .basket_product_wrap .basket_product_row .product_content { width:100%; display:flex; flex-direction:column; justify-content:space-between; }
.basket_product_wrap .basket_product_row .product_action { display:flex; width:100%; justify-content:space-between; align-items:center; }
.basket_product_wrap .basket_product_row .product_action .amount { width:100px; padding-right:40px; position:relative; margin-top:0.5em; margin-bottom:0.5em; text-align:center;}
-.basket_product_wrap .basket_product_row .product_action .amount .wpsg_basket_removelink { -webkit-box-shadow:none; box-shadow:none; text-decoration:none; border:0px !important; position:absolute; right:5px; top:50%; margin-top:-8px; }
+.basket_product_wrap .basket_product_row .product_action .amount .wpsg_basket_removelink { -webkit-box-shadow:none; box-shadow:none; text-decoration:none; border:0px !important; position:absolute; display:flex; right:5px; top:50%; margin-top:-8px; height:16px; width:16px; }
.basket_product_wrap .basket_product_row .product_action .title { width: 60%; display:inline-block; margin-top:0.3em; margin-bottom:0.3em; }
.basket_product_wrap .basket_product_row .product_action .price { width: 39%; display:inline-block; text-align:right; }
.basket_product_wrap .basket_product_row .product_action .price_total { width: 39%; display:inline-block; font-weight:bold; text-align:right; }
@@ -73,15 +153,26 @@ input.wpsg_error { border-color:red !important; } .basket_sum_wrap .wpsg_mod_basketteaser_row .valuer { width: 20%; display:inline-block; font-weight:normal; text-align:right; }
.basket_sum_wrap .wpsg_mod_basketteaser_row .valuel { width: 20%; display:inline-block; font-weight:normal; text-align:left; }
.basket_sum_wrap .wpsg_gutschein_add {padding:0.75em 1em;}
+.basket_sum_wrap .wpsg_customerbudget_row .wpsg_customerbudget_error { width:100%; margin:0; color:#ff0000; font-size:12px; font-weight:bold; }
.procent_payship { font-size:0.75em; line-height:0.75em; color:#666666; displaY:block; margin-bottom:10px; }
/* .glyphicon {width:20px !important; text-decoration:none; position:relative; display:inline-block; font-family:'Glyphicons Halflings'; line-height:1rem;} */
.wpsg_basket .wpsg_checkoutbutton { float:right; padding:0.75em 1em; }
+.wpsg_basket .set_land { padding:0.75em 1em; }
+.wpsg_basket .set_shipping { padding:0.75em 1em; }
.wpsg_basket .wpsg_cell_gesamtsumme_value { font-weight:bold; }
+.wpsg_basket input.amount { padding:0.75em 0.25em; }
.wpsg_checkout2 .wpsg_overviewbutton,
.wpsg_checkout2 .wpsg_checkoutbutton,
+.wpsg_overview .garan_label_wrap { text-align:center; padding:1rem 0; }
.wpsg_overview .wpsg_orderbutton,
.wpsg_overview .wpsg_checkoutbutton,
+.wpsg_overview .garan_label_popup_confirm { text-align:center; padding:0.75em 1.5em; cursor:pointer; }
+.wpsg_overview .garan_label_popup { position:fixed; top:0; left:0; right:0; bottom:0; z-index:100000; display:flex; align-items:center; justify-content:center; padding:1rem; background-color:rgba(0, 0, 0, 0.6); }
+.wpsg_overview .garan_label_popup .garan_label_popup_inner { display:flex; flex-direction:column; max-width:600px; max-height:100%; text-align:center; padding:1rem; background-color:#FFFFFF; }
+.wpsg_overview .garan_label_popup .garan_label_popup_image { min-height:0; overflow-y:auto; }
+.wpsg_overview .garan_label_popup .garan_label_popup_image img { max-width:100%; height:auto; }
+.wpsg_overview .garan_label_popup .garan_label_popup_confirm { flex:0 0 auto; margin-top:1rem; }
.wpsg_basket .wpsg_refreshbutton, .wpsg_checkout2button, .wpsg_basketbutton { float:left; padding:0.75em 1em; }
.wpsg_basket .wpsg_basket_weiter_shoppen {background:#1a1a1a none repeat scroll 0 0; border:0 none; border-radius:2px; color:#fff; font-weight:700; line-height:1; text-transform:uppercase; padding:0.85em 0.875em 0.78em;}
.wpsg_basket .product_action_printshop .label { align-self:flex-start; }
@@ -108,9 +199,9 @@ input.wpsg_error { border-color:red !important; } .wpsg_checkout h2 { font-weight:bold; padding:10px 0; }
.wpsg_checkout .wpsg_commentblock textarea { box-sizing:border-box; padding:2px; width:100%; height:150px; }
.wpsg_checkout .wpsg_logout_box a { float:right; border-bottom:0px; padding:15px; font-weight:bold; color:#FF0000; font-weight:bold; color:#fff; background-color:#333; }
-.wpsg_checkout #wpsg_streetnr.wpsg_checkoutblock { display:flex; flex-direction:row; width:100%; }
-.wpsg_checkout #wpsg_streetnr.wpsg_checkoutblock .street { flex-grow:1; padding-right:15px; }
-.wpsg_checkout #wpsg_streetnr.wpsg_checkoutblock .nr input {width: 100%;}
+.wpsg_checkout #wpsg_streetnr.wpsg_checkoutblock, .wpsg_checkout #wpsg_shipping_streetnr.wpsg_checkoutblock { display:flex; flex-direction:row; width:100%; }
+.wpsg_checkout #wpsg_streetnr.wpsg_checkoutblock .street, .wpsg_checkout #wpsg_shipping_streetnr.wpsg_checkoutblock .street { flex-grow:1; padding-right:15px; }
+.wpsg_checkout #wpsg_streetnr.wpsg_checkoutblock .nr input, .wpsg_checkout #wpsg_shipping_streetnr.wpsg_checkoutblock .nr input {width: 100%;}
/* Checkout2 */
.shippay_wrap { margin-top:40px; width:100%; font-family:Arial; padding-right:10px; }
@@ -119,6 +210,7 @@ input.wpsg_error { border-color:red !important; } .shippay_wrap .shippay_item_wrap .shippay_hint { display:none; margin-top:-5px; padding-bottom:20px; font-family:Arial; font-size:11px; color:#3F3F3F; }
.shippay_wrap .shippay_active, .shippay_wrap .shippay_item_wrap:hover { background-color:#F9F9F9; }
.shippay_wrap .shippay_active .shippay_hint { display:block; padding-right:8px; }
+.shippay_wrap .shippay_active .shippay_hint .shippay_error { color:#ff0000; font-size:12px; font-weight:bold; }
.shippay_wrap .shippay_item_wrap .wpsg_payship_name { display:table-cell; vertical-align:middle; font-size:12px; height:64px; }
.shippay_wrap .shippay_active .wpsg_payship_name { font-weight:bold; }
.shippay_wrap .shippay_item_wrap:last-child { border-bottom:1px solid #DFDFDF; }
@@ -262,9 +354,18 @@ input.wpsg_error { border-color:red !important; } .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"] { width:48%; float:left; 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"] { width:48%; cursor:pointer; float:right; box-sizing: border-box; padding:0.7em; line-height:1.5em; font-size:1rem; border:1px solid transparent; border-radius:3px; }
+.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; }
.wpsg_productform .wpsg_product_layer { position:absolute; left:0px; top:0px; width:100%; height:100%; background-color:rgba(0, 0, 0, 0.25); padding:0.75em; margin:-0.75em; box-sizing:content-box; }
.wpsg_productform .wpsg_product_layer img { position:absolute; left:50%; margin-left:-8px; top:50%; margin-top:-5px; }
.wpsg_productform .wpsg_produkt_produktbilder { max-width:200px; }
@@ -275,8 +376,9 @@ input.wpsg_error { border-color:red !important; } margin-bottom: 0.5em;
}
.wpsg_product_deliverytime_holiday { height:50px; padding:10px; width:50%; float:right; border:1px solid #ff0000; }
-.wpsg_produkt_add_basket_wrapper { display:flex; align-items:center; justify-content:flex-start; gap:1rem;
+.wpsg_produkt_add_basket_wrapper { display:flex; align-items:stretch; justify-content:flex-start; gap:1rem;
& > *, & > label { margin:0; }
+ & > label { display:flex; align-items:center; }
}
/* Minigallery */
@@ -307,6 +409,7 @@ input.wpsg_error { border-color:red !important; } .wpsg_mod_productindex .wpsg_mod_productindex_viewselect { margin-top:6px !important; }
.wpsg_mod_productindex .wpsg_mod_productindex_order { width:90%; }
.wpsg_mod_productindex_grid .wpsg_mod_productindex_product { width:45% !important; }
+ .wpsg_mod_productindex_grid img { max-width:100%; height:auto; }
.wpsg_mod_productindex .wpsg_mod_productindex_order select { width:65%; margin: 2px 0 0 10px; height:20px; }
.wpsg_mod_productindex .wpsg_mod_productindex_toolbar_bottom .wpsg_mod_productindex_order { display:none }
.wpsg_mod_productindex .wpsg_mod_productindex_toolbar_bottom .wpsg_mod_productindex_viewselect { display:none}
@@ -482,11 +585,6 @@ input.wpsg_error { border-color:red !important; } .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/css/smartcheckout.css b/views/css/smartcheckout.css new file mode 100644 index 0000000..aed9849 --- /dev/null +++ b/views/css/smartcheckout.css @@ -0,0 +1,387 @@ +@CHARSET "UTF-8"; + +/* + * Moderner EinSeitenCheckout + * + * Die Optik hält sich bewusst zurück: Schrift, Textfarbe und Hintergrund kommen aus dem + * Theme, eigene Angaben gibt es nur dort, wo die Struktur sie braucht. Linien und Flächen + * sind neutrales Grau mit Transparenz und wirken deshalb auf hellen wie auf dunklen + * Themes. Gedämpfter Text entsteht über opacity statt über eine eigene Farbe. + * + * Die wenigen Werte liegen als Custom Properties auf .wpsg_smartcheckout und können im + * Theme überschrieben werden, ohne dass eine Regel angefasst werden muss. + * + * Alle Größen rechnen über --sc-u (Standard 1rem). Themes, die die Schriftgröße von html + * verändern (z.B. Bootstrap 3 mit 10px), setzen hier nur --sc-u auf einen festen Wert. + */ + +.wpsg_smartcheckout, +.wpsg_smartcheckout_after { + --sc-u:1rem; +} + +.wpsg_smartcheckout { + --sc-line:rgba(127, 127, 127, 0.35); + --sc-line-soft:rgba(127, 127, 127, 0.2); + --sc-flat:rgba(127, 127, 127, 0.08); + --sc-accent:currentColor; + --sc-error:#b3261e; + --sc-radius:3px; + --sc-gap:calc(2 * var(--sc-u, 1rem)); +} + +.wpsg_smartcheckout [v-cloak], .wpsg_smartcheckout[v-cloak] { display:none; } +.wpsg_smartcheckout_noscript { padding:var(--sc-u, 1rem); border-left:3px solid var(--sc-error, #b3261e); margin-bottom:calc(1.5 * var(--sc-u, 1rem)); } + +.wpsg_smartcheckout * { box-sizing:border-box; } + +/* Themes mit Inhaltskarte (z.B. Kadence "content-style-boxed") ziehen alignwide bis an den Kartenrand, der Checkout bleibt im Innenabstand */ +html body.content-style-boxed .entry-content .wpsg_smartcheckout.alignwide, +html body.content-style-boxed .entry-content .wpsg_smartcheckout_after.alignwide { margin-left:0; margin-right:0; width:auto; max-width:100%; } + +/* Layout */ +.wpsg_smartcheckout .sc_layout { display:grid; grid-template-columns:minmax(0, 1fr) calc(21 * var(--sc-u, 1rem)); gap:var(--sc-gap); align-items:start; } +.wpsg_smartcheckout_single .sc_layout { grid-template-columns:minmax(0, 1fr); } +.wpsg_smartcheckout .sc_main { display:flex; flex-direction:column; min-width:0; } +.wpsg_smartcheckout .sc_side { position:sticky; top:calc(1.5 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout_single .sc_side { position:static; } +.wpsg_smartcheckout .sc_layout.sc_busy { opacity:0.6; pointer-events:none; transition:opacity 0.15s ease-out; } + +/* Die Schritte werden nur durch eine Linie getrennt, nicht durch gerahmte Kästen */ +.wpsg_smartcheckout .sc_box { padding:var(--sc-gap) 0; border-top:1px solid var(--sc-line-soft); } +.wpsg_smartcheckout .sc_box:first-child { padding-top:0; border-top:0; } +.wpsg_smartcheckout .sc_title { margin:0 0 calc(1.25 * var(--sc-u, 1rem)) 0; font-size:calc(1.05 * var(--sc-u, 1rem)); line-height:1.3; } +.wpsg_smartcheckout .sc_step { margin-right:calc(0.5 * var(--sc-u, 1rem)); font-weight:400; opacity:0.5; } + +/* Meldungen */ +.wpsg_smartcheckout .sc_messages { display:flex; flex-direction:column; gap:calc(0.5 * var(--sc-u, 1rem)); margin-bottom:var(--sc-gap); } +.wpsg_smartcheckout .sc_messages:empty { display:none; margin:0; } +.wpsg_smartcheckout .sc_message { padding:calc(0.6 * var(--sc-u, 1rem)) calc(0.9 * var(--sc-u, 1rem)); border-left:3px solid var(--sc-line); background:var(--sc-flat); } +.wpsg_smartcheckout .sc_message_error { border-left-color:var(--sc-error); } +.wpsg_smartcheckout .sc_message_message { border-left-color:#5a9e3d; } + +/* Leerer Warenkorb */ +.wpsg_smartcheckout .sc_empty { padding:calc(2.5 * var(--sc-u, 1rem)) 0; } + +/* Warenkorbpositionen: jede Position steht in einem eigenen Rahmen, damit Produktvariablen und Hinweise erkennbar zum Produkt gehören */ +.wpsg_smartcheckout .sc_products { display:flex; flex-direction:column; gap:calc(0.75 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_product { display:grid; grid-template-columns:auto minmax(0, 1fr) auto auto; gap:var(--sc-u, 1rem); align-items:start; padding:var(--sc-u, 1rem); border:1px solid var(--sc-line-soft); border-radius:var(--sc-radius); } +.wpsg_smartcheckout .sc_product_image img { display:block; width:56px; height:56px; object-fit:cover; border-radius:var(--sc-radius); } +.wpsg_smartcheckout .sc_product_name { font-weight:600; } +.wpsg_smartcheckout .sc_product_desc, +.wpsg_smartcheckout .sc_product_extra, +.wpsg_smartcheckout .sc_product_tax { font-size:calc(0.85 * var(--sc-u, 1rem)); opacity:0.7; margin-top:calc(0.2 * var(--sc-u, 1rem)); } + +/* Eingabefelder der Module (z.B. Produktvariablen) als eigene Zeile über alle Spalten der Position, innerhalb des Rahmens durch eine Linie abgesetzt */ +.wpsg_smartcheckout .sc_product_fields { grid-column:1 / -1; display:flex; flex-direction:column; gap:var(--sc-u, 1rem); min-width:0; padding-top:calc(0.75 * var(--sc-u, 1rem)); border-top:1px solid var(--sc-line-soft); font-size:calc(0.85 * var(--sc-u, 1rem)); } + +/* Upload zum Produkt (wpsg_mod_orderupload) an der Warenkorbposition + * + * Das Ziel wird nach dem Hochladen vom Modul per Script neu befüllt, die Regeln hängen deshalb am + * klassischen Markup (ul, input[type=button]). Die Spezifität liegt über den Button-Regeln der Themes. + */ +.wpsg_smartcheckout .sc_upload { display:flex; flex-direction:column; gap:calc(0.4 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_upload_label { font-size:calc(0.8 * var(--sc-u, 1rem)); opacity:0.7; } +.wpsg_smartcheckout .sc_upload_target { display:flex; flex-wrap:wrap; align-items:center; gap:calc(0.5 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_upload_target ul { flex:1 1 100%; display:flex; flex-direction:column; gap:calc(0.3 * var(--sc-u, 1rem)); margin:0; padding:0; list-style:none; } +.wpsg_smartcheckout .sc_upload_target li { display:flex; align-items:center; gap:calc(0.5 * var(--sc-u, 1rem)); margin:0; padding:calc(0.35 * var(--sc-u, 1rem)) calc(0.6 * var(--sc-u, 1rem)); border:1px solid var(--sc-line-soft); border-radius:var(--sc-radius); } +.wpsg_smartcheckout .sc_upload_target li > a:first-child { flex:1 1 auto; min-width:0; overflow-wrap:anywhere; color:inherit; } +.wpsg_smartcheckout .sc_upload_target .size { font-size:calc(0.8 * var(--sc-u, 1rem)); opacity:0.7; } +.wpsg_smartcheckout .sc_upload_target .removeLink { flex:0 0 auto; display:flex; opacity:0.7; } +.wpsg_smartcheckout .sc_upload_target .removeLink:hover { opacity:1; } +.wpsg_smartcheckout .sc_upload_target .removeLink img { display:block; width:16px; height:16px; } +.wpsg_smartcheckout .sc_upload_target input[type="file"] { flex:1 1 calc(14 * var(--sc-u, 1rem)); min-width:0; } +.wpsg_smartcheckout .sc_upload_target input[type="button"] { flex:0 0 auto; min-height:0; margin:0; padding:calc(0.5 * var(--sc-u, 1rem)) calc(0.9 * var(--sc-u, 1rem)); border:1px solid var(--sc-line); border-radius:var(--sc-radius); background:none; color:inherit; font:inherit; font-size:calc(0.9 * var(--sc-u, 1rem)); line-height:1.2; text-transform:none; letter-spacing:normal; box-shadow:none; cursor:pointer; } +.wpsg_smartcheckout .sc_upload_target input[type="button"]:hover { background:var(--sc-flat); } +/* Der Upload startet direkt nach der Auswahl (smartcheckout.js, startUpload), der Button des Moduls wird nicht gebraucht */ +.wpsg_smartcheckout .sc_upload_target [data-sc-autoupload] { display:none; } + +/* Bestellupload (wpsg_mod_orderupload) als eigener Block unter den Kundendaten, Liste und Dateiauswahl wie beim Upload zum Produkt */ +.wpsg_smartcheckout .sc_orderupload .sc_title { margin-bottom:var(--sc-u, 1rem); } +.wpsg_smartcheckout .sc_orderupload .sc_hint { margin-top:0; } +.wpsg_smartcheckout .sc_orderupload .sc_upload { font-size:calc(0.85 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_upload_message { flex:1 1 100%; padding:calc(0.35 * var(--sc-u, 1rem)) calc(0.6 * var(--sc-u, 1rem)); border-left:3px solid var(--sc-line); background:var(--sc-flat); } +.wpsg_smartcheckout .sc_upload_message_error { border-left-color:var(--sc-error); } +.wpsg_smartcheckout .sc_upload_message_message { border-left-color:#5a9e3d; } +.wpsg_smartcheckout .sc_upload_wait { flex:1 1 100%; opacity:0.7; } + +/* Dateiauswahl im gesamten Checkout (Upload zum Produkt, Bestellupload) in der Optik der übrigen Felder */ +.wpsg_smartcheckout input[type="file"] { max-width:100%; color:inherit; font:inherit; font-size:calc(0.85 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout input[type="file"]::file-selector-button { margin-right:calc(0.6 * var(--sc-u, 1rem)); padding:calc(0.45 * var(--sc-u, 1rem)) calc(0.8 * var(--sc-u, 1rem)); border:1px solid var(--sc-line); border-radius:var(--sc-radius); background:none; color:inherit; font:inherit; cursor:pointer; } +.wpsg_smartcheckout input[type="file"]::file-selector-button:hover { background:var(--sc-flat); } + +/* Produktvariablen an der Warenkorbposition */ +.wpsg_smartcheckout .sc_pvars { display:flex; flex-direction:column; gap:calc(0.6 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_pvar { display:flex; flex-direction:column; gap:calc(0.25 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_pvar_label { font-size:calc(0.8 * var(--sc-u, 1rem)); opacity:0.7; } +.wpsg_smartcheckout .sc_pvar_input { width:100%; padding:calc(0.4 * var(--sc-u, 1rem)) calc(0.6 * var(--sc-u, 1rem)); border:1px solid var(--sc-line); border-radius:var(--sc-radius); background:none; color:inherit; font:inherit; } +.wpsg_smartcheckout textarea.sc_pvar_input { resize:vertical; } +.wpsg_smartcheckout .sc_pvar_check { display:flex; align-items:flex-start; gap:calc(0.5 * var(--sc-u, 1rem)); cursor:pointer; } +.wpsg_smartcheckout .sc_pvar_check input[type="checkbox"] { flex:0 0 auto; margin:calc(0.15 * var(--sc-u, 1rem)) 0 0 0; } +.wpsg_smartcheckout .sc_pvar.sc_invalid .sc_pvar_input { border-color:var(--sc-error); } +.wpsg_smartcheckout .sc_pvar.sc_invalid .sc_pvar_label, +.wpsg_smartcheckout .sc_pvar.sc_invalid .sc_pvar_check { color:var(--sc-error); opacity:1; } +.wpsg_smartcheckout .sc_product_price { text-align:right; white-space:nowrap; } +.wpsg_smartcheckout .sc_product_price_total { font-weight:600; } +.wpsg_smartcheckout .sc_product_price_single { font-size:calc(0.8 * var(--sc-u, 1rem)); opacity:0.7; } + +/* Mengenwahl */ +.wpsg_smartcheckout .sc_product_amount { display:flex; flex-direction:column; align-items:center; gap:calc(0.35 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_stepper { display:inline-flex; align-items:stretch; border:1px solid var(--sc-line); border-radius:var(--sc-radius); overflow:hidden; } +.wpsg_smartcheckout .sc_stepper_btn { border:0; background:none; width:calc(1.9 * var(--sc-u, 1rem)); cursor:pointer; font:inherit; line-height:1; color:inherit; } +.wpsg_smartcheckout .sc_stepper_btn:disabled { cursor:default; opacity:0.4; } +.wpsg_smartcheckout .sc_stepper_input { width:calc(2.8 * var(--sc-u, 1rem)); border:0; text-align:center; padding:calc(0.4 * var(--sc-u, 1rem)) 0; background:none; color:inherit; font:inherit; } +.wpsg_smartcheckout .sc_stepper_static { display:inline-block; padding:calc(0.4 * var(--sc-u, 1rem)) calc(0.9 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_remove { border:0; background:none; padding:0; font-size:calc(0.8 * var(--sc-u, 1rem)); opacity:0.7; text-decoration:underline; cursor:pointer; color:inherit; } + +/* Warenkorbteaser: angelehnt an die Warenkorbpositionen, aber zurückhaltender */ +.wpsg_smartcheckout .sc_teaser { padding-top:var(--sc-u, 1rem); border-top:1px solid var(--sc-line-soft); } +.wpsg_smartcheckout .sc_teaser_title { margin-bottom:calc(0.5 * var(--sc-u, 1rem)); font-size:calc(0.85 * var(--sc-u, 1rem)); opacity:0.7; } +.wpsg_smartcheckout .sc_teaser_item { display:flex; align-items:center; gap:calc(0.75 * var(--sc-u, 1rem)) var(--sc-u, 1rem); flex-wrap:wrap; padding:calc(0.5 * var(--sc-u, 1rem)) 0; font-size:calc(0.9 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_teaser_image img { display:block; width:40px; height:40px; object-fit:cover; border-radius:var(--sc-radius); } +.wpsg_smartcheckout .sc_teaser_body { flex:1 1 calc(10 * var(--sc-u, 1rem)); min-width:0; } +.wpsg_smartcheckout .sc_teaser_price { font-size:calc(0.8 * var(--sc-u, 1rem)); opacity:0.7; } +.wpsg_smartcheckout .sc_teaser_action { display:flex; align-items:center; gap:calc(0.5 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_teaser_amount { width:calc(2.8 * var(--sc-u, 1rem)); padding:calc(0.45 * var(--sc-u, 1rem)) 0; border:1px solid var(--sc-line); border-radius:var(--sc-radius); text-align:center; background:none; color:inherit; font:inherit; } + +/* Gutschein */ +.wpsg_smartcheckout .sc_voucher { margin-top:calc(1.5 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_voucher_label { display:block; margin-bottom:calc(0.35 * var(--sc-u, 1rem)); font-size:calc(0.85 * var(--sc-u, 1rem)); opacity:0.7; } +.wpsg_smartcheckout .sc_voucher_row { display:flex; gap:calc(0.5 * var(--sc-u, 1rem)); flex-wrap:wrap; } +.wpsg_smartcheckout .sc_voucher_input { flex:1 1 calc(12 * var(--sc-u, 1rem)); min-width:0; } +.wpsg_smartcheckout .sc_voucher_list { margin-top:calc(0.75 * var(--sc-u, 1rem)); display:flex; flex-direction:column; gap:calc(0.4 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_voucher_item { display:flex; align-items:center; gap:calc(0.75 * var(--sc-u, 1rem)); flex-wrap:wrap; font-size:calc(0.9 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_voucher_code { font-weight:600; } +.wpsg_smartcheckout .sc_voucher_partial { opacity:0.7; } +.wpsg_smartcheckout .sc_voucher_value { margin-left:auto; } + +/* Formularfelder */ +.wpsg_smartcheckout .sc_fields { display:grid; grid-template-columns:repeat(12, 1fr); gap:calc(0.9 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_field { display:flex; flex-direction:column; gap:calc(0.3 * var(--sc-u, 1rem)); grid-column:span 12; min-width:0; } +.wpsg_smartcheckout .sc_field_half { grid-column:span 6; } +.wpsg_smartcheckout .sc_field_wide { grid-column:span 8; } +.wpsg_smartcheckout .sc_field_narrow { grid-column:span 4; } +.wpsg_smartcheckout .sc_label { font-size:calc(0.85 * var(--sc-u, 1rem)); opacity:0.7; } +.wpsg_smartcheckout .sc_required { color:var(--sc-error); margin-left:calc(0.15 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_input, +.wpsg_smartcheckout .sc_voucher_input, +.wpsg_smartcheckout .sc_textarea { width:100%; padding:calc(0.55 * var(--sc-u, 1rem)) calc(0.7 * var(--sc-u, 1rem)); border:1px solid var(--sc-line); border-radius:var(--sc-radius); background:none; color:inherit; font:inherit; } +.wpsg_smartcheckout .sc_textarea { resize:vertical; } +/* Auswahlfelder mit eigenem Pfeil: der Hintergrund der Felder wird zurückgesetzt, damit verschwindet ein vom Theme gezeichneter Pfeil */ +#wpsg_smartcheckout select.sc_input, +#wpsg_smartcheckout select.sc_pvar_input, +#wpsg_smartcheckout .sc_modul_extra select, +#wpsg_smartcheckout .sc_choice_hint select, +#wpsg_smartcheckout .sc_choice_extra select { -webkit-appearance:none; appearance:none; padding-right:calc(2 * var(--sc-u, 1rem)); background-color:transparent; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237f7f7f' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right calc(0.7 * var(--sc-u, 1rem)) center; background-size:calc(0.7 * var(--sc-u, 1rem)) auto; cursor:pointer; } +.wpsg_smartcheckout .sc_hint { margin-top:var(--sc-u, 1rem); font-size:calc(0.8 * var(--sc-u, 1rem)); opacity:0.7; } +.wpsg_smartcheckout .sc_modul_login:empty, +.wpsg_smartcheckout .sc_modul_customer:empty, +.wpsg_smartcheckout .sc_modul_payment:empty { display:none; } +.wpsg_smartcheckout .sc_modul_basket, +.wpsg_smartcheckout .sc_modul_customer, +.wpsg_smartcheckout .sc_modul_payment, +.wpsg_smartcheckout .sc_modul_sum { margin-top:var(--sc-u, 1rem); } +.wpsg_smartcheckout .sc_modul_sum:empty { display:none; } + +/* Modulblöcke vor dem Abschluss (Bestellvariablen, gesonderte Lieferadresse, …) + * + * Diese Module bringen das Markup des klassischen Checkouts mit (wpsg_box, wpsg_inner, + * wpsg_checkoutblock). Die Regeln dazu in frontend.css hängen an .wpsg_checkout und + * greifen hier nicht — die Felder werden deshalb an dieser Stelle auf die Optik des + * EinSeitenCheckouts gebracht. + */ +.wpsg_smartcheckout .sc_modul_extra > div + div { margin-top:var(--sc-gap); } +.wpsg_smartcheckout .sc_modul_extra h2 { margin:0 0 calc(1.25 * var(--sc-u, 1rem)) 0; padding:0; font-size:calc(1.05 * var(--sc-u, 1rem)); line-height:1.3; } +.wpsg_smartcheckout .sc_modul_extra .wpsg_spacer, +.wpsg_smartcheckout .sc_modul_extra .wpsg_clear { display:none; } +.wpsg_smartcheckout .sc_modul_extra .wpsg_inner { display:flex; flex-direction:column; gap:calc(0.9 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_modul_extra .wpsg_checkoutblock { display:flex; flex-direction:column; gap:calc(0.3 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_modul_extra label { font-size:calc(0.85 * var(--sc-u, 1rem)); opacity:0.7; } +.wpsg_smartcheckout .sc_modul_extra .wpsg_required { color:var(--sc-error); margin-left:calc(0.15 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_modul_extra input[type="text"], +.wpsg_smartcheckout .sc_modul_extra input[type="tel"], +.wpsg_smartcheckout .sc_modul_extra input[type="email"], +.wpsg_smartcheckout .sc_modul_extra input[type="number"], +.wpsg_smartcheckout .sc_modul_extra select, +.wpsg_smartcheckout .sc_modul_extra textarea { width:100%; padding:calc(0.55 * var(--sc-u, 1rem)) calc(0.7 * var(--sc-u, 1rem)); border:1px solid var(--sc-line); border-radius:var(--sc-radius); background:none; color:inherit; font:inherit; } +.wpsg_smartcheckout .sc_modul_extra .wpsg_error { border-color:var(--sc-error); } + +/* Ankreuzfelder: Kästchen und Text stehen in einer Zeile, der Text bleibt bei einem Umbruch bündig */ +.wpsg_smartcheckout .sc_modul_extra .wpsg_mod_ordervars_check label { display:flex; align-items:flex-start; gap:calc(0.5 * var(--sc-u, 1rem)); opacity:1; cursor:pointer; } +.wpsg_smartcheckout .sc_modul_extra .wpsg_mod_ordervars_check label > input[type="checkbox"] { flex:0 0 auto; width:auto; margin:0; } +.wpsg_smartcheckout .sc_modul_extra .wpsg_mod_ordervars_text { flex:1 1 auto; min-width:0; } + +/* Versand- und Zahlungsauswahl */ +.wpsg_smartcheckout .sc_choices { display:flex; flex-direction:column; gap:calc(0.5 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_choice { --sc-choice-radio:var(--sc-u, 1rem); --sc-choice-gap:calc(0.6 * var(--sc-u, 1rem)); display:flex; flex-direction:column; gap:calc(0.3 * var(--sc-u, 1rem)); padding:calc(0.8 * var(--sc-u, 1rem)) calc(0.9 * var(--sc-u, 1rem)); border:1px solid var(--sc-line-soft); border-radius:var(--sc-radius); cursor:pointer; } +.wpsg_smartcheckout .sc_choice_active { border-color:var(--sc-accent); background:var(--sc-flat); } +/* Kopfzeile: Radio, Logo, Bezeichnung und Preis auf einer Linie */ +.wpsg_smartcheckout .sc_choice_head { display:flex; align-items:center; gap:var(--sc-choice-gap); min-width:0; } +.wpsg_smartcheckout .sc_choice_head input[type="radio"] { flex:0 0 auto; width:var(--sc-choice-radio); height:var(--sc-choice-radio); margin:0; } +/* Feste Breite, damit die Bezeichnungen bei unterschiedlich breiten Logos bündig untereinander stehen */ +.wpsg_smartcheckout .sc_choice_logo { flex:0 0 auto; width:calc(4.5 * var(--sc-u, 1rem)); height:22px; object-fit:contain; object-position:left center; } +.wpsg_smartcheckout .sc_choice_name { flex:1 1 auto; min-width:0; font-weight:600; } +.wpsg_smartcheckout .sc_choice_price { flex:0 0 auto; margin-left:auto; white-space:nowrap; } +/* Beschreibung und Zusatzangaben darunter, bündig mit Logo bzw. Bezeichnung */ +.wpsg_smartcheckout .sc_choice_hint, +.wpsg_smartcheckout .sc_choice_extra { padding-left:calc(var(--sc-choice-radio) + var(--sc-choice-gap)); font-size:calc(0.85 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_choice_hint { opacity:0.7; } +.wpsg_smartcheckout .sc_choice_head { cursor:pointer; } + +/* + * Eingabefelder im Hinweis einer Versand- oder Zahlungsart (z.B. Kreditkarte, Lastschrift) + * + * Das Markup kommt aus den Modulen (Label mit Text und Feld), es wird hier auf die Optik der übrigen Felder gebracht. + * Hinweise mit Feldern werden nicht gedämpft, die vorangestellten Umbrüche und Clear-Elemente entfallen. + */ +.wpsg_smartcheckout .sc_choice_hint:has(input, select, textarea) { opacity:1; } +.wpsg_smartcheckout .sc_choice_hint:has(input, select, textarea) > br, +.wpsg_smartcheckout .sc_choice_hint .wpsg_clear { display:none; } +.wpsg_smartcheckout .sc_choice_hint label, +.wpsg_smartcheckout .sc_choice_extra label { display:block; margin:0; font-size:calc(0.85 * var(--sc-u, 1rem)); font-weight:inherit; } +.wpsg_smartcheckout .sc_choice_hint input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]), +.wpsg_smartcheckout .sc_choice_hint select, +.wpsg_smartcheckout .sc_choice_hint textarea, +.wpsg_smartcheckout .sc_choice_extra input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]), +.wpsg_smartcheckout .sc_choice_extra select { display:block; width:100%; margin:calc(0.3 * var(--sc-u, 1rem)) 0 0 0; padding:calc(0.5 * var(--sc-u, 1rem)) calc(0.65 * var(--sc-u, 1rem)); border:1px solid var(--sc-line); border-radius:var(--sc-radius); background-color:transparent; color:inherit; font:inherit; font-size:var(--sc-u, 1rem); line-height:1.3; box-shadow:none; } +.wpsg_smartcheckout .sc_choice_hint .wpsg_error, +.wpsg_smartcheckout .sc_choice_extra .wpsg_error { border-color:var(--sc-error); } +.wpsg_smartcheckout .sc_choice_hint .wpsg_required { color:var(--sc-error); margin-left:calc(0.15 * var(--sc-u, 1rem)); } + +/* Kreditkarte: zweispaltig, Monat und Jahr der Gültigkeit nebeneinander */ +.wpsg_smartcheckout .sc_choice_hint .wpsg_mod_creditcard { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:calc(0.75 * var(--sc-u, 1rem)) var(--sc-u, 1rem); max-width:calc(34 * var(--sc-u, 1rem)); margin-top:calc(0.6 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_choice_hint .wpsg_mod_creditcard_field:has(select + select) { grid-column:1 / -1; } +.wpsg_smartcheckout .sc_choice_hint .wpsg_mod_creditcard label:has(select + select) { display:flex; flex-wrap:wrap; align-items:center; } +.wpsg_smartcheckout .sc_choice_hint .wpsg_mod_creditcard label:has(select + select) select { display:inline-block; width:auto; min-width:calc(5.5 * var(--sc-u, 1rem)); margin:0 0 0 calc(0.5 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_choice_hint .wpsg_mandatoryfield_hint { grid-column:1 / -1; font-size:calc(0.8 * var(--sc-u, 1rem)); opacity:0.7; } + + +/* Zusammenfassung */ +.wpsg_smartcheckout .sc_summary { position:relative; padding:calc(1.25 * var(--sc-u, 1rem)); border:1px solid var(--sc-line-soft); border-radius:var(--sc-radius); } +.wpsg_smartcheckout_single .sc_side { margin-top:var(--sc-gap); } +.wpsg_smartcheckout .sc_sum_rows { display:flex; flex-direction:column; gap:calc(0.4 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_sum_row { display:flex; justify-content:space-between; gap:var(--sc-u, 1rem); align-items:baseline; font-size:calc(0.95 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_sum_value { white-space:nowrap; } +.wpsg_smartcheckout .sc_sum_note, +.wpsg_smartcheckout .sc_sum_hint { font-size:calc(0.8 * var(--sc-u, 1rem)); opacity:0.7; } +.wpsg_smartcheckout .sc_sum_hint { margin-top:calc(0.75 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_sum_total { margin-top:calc(0.5 * var(--sc-u, 1rem)); padding-top:calc(0.6 * var(--sc-u, 1rem)); border-top:1px solid var(--sc-line); font-size:calc(1.05 * var(--sc-u, 1rem)); font-weight:600; } + +/* Zusatzzeilen der Module (z.B. Gesamtgewicht) bringen das Markup der klassischen Zusammenfassung mit, sie erscheinen gedämpft wie die Hinweise */ +.wpsg_smartcheckout .sc_modul_sum .overview_sum_row { display:flex; justify-content:space-between; gap:var(--sc-u, 1rem); align-items:baseline; font-size:calc(0.8 * var(--sc-u, 1rem)); opacity:0.7; } +.wpsg_smartcheckout .sc_modul_sum .overview_sum_row .title, +.wpsg_smartcheckout .sc_modul_sum .overview_sum_row .value { width:auto; margin:0; font-weight:normal; } +.wpsg_smartcheckout .sc_modul_sum .overview_sum_row .value { white-space:nowrap; } +.wpsg_smartcheckout .sc_modul_sum .overview_sum_row .value + .value { display:none; } + +/* Bestellbedingungen und AGB */ +.wpsg_smartcheckout .sc_modul_conditions, +.wpsg_smartcheckout .sc_agb { margin-top:calc(1.1 * var(--sc-u, 1rem)); font-size:calc(0.85 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_modul_conditions .wpsg_agb + .wpsg_agb { margin-top:calc(0.6 * var(--sc-u, 1rem)); } +/* Die Module setzen den Text als losen Textknoten ins label — Flex würde ihn zerreißen */ +.wpsg_smartcheckout .sc_modul_conditions label, +.wpsg_smartcheckout .sc_agb label { display:block; position:relative; padding-left:calc(1.5 * var(--sc-u, 1rem)); cursor:pointer; } +.wpsg_smartcheckout .sc_modul_conditions label > input[type="checkbox"], +.wpsg_smartcheckout .sc_agb label > input[type="checkbox"] { position:absolute; left:0; top:calc(0.15 * var(--sc-u, 1rem)); margin:0; } +.wpsg_smartcheckout .sc_modul_conditions .wpsg_mod_ordercondition_hint { max-height:calc(9 * var(--sc-u, 1rem)); overflow-y:auto; margin-top:calc(0.5 * var(--sc-u, 1rem)); padding:calc(0.6 * var(--sc-u, 1rem)); border:1px solid var(--sc-line-soft); border-radius:var(--sc-radius); } + +/* Fehlerhafte Eingaben */ +.wpsg_smartcheckout .sc_field.sc_invalid .sc_input, +.wpsg_smartcheckout .sc_invalid.sc_voucher_input { border-color:var(--sc-error); } +.wpsg_smartcheckout .sc_choices.sc_invalid, +.wpsg_smartcheckout .sc_modul_conditions.sc_invalid, +.wpsg_smartcheckout .sc_agb.sc_invalid { outline:1px solid var(--sc-error); outline-offset:4px; } + +/* Buttons erben Schrift und Farbe des Themes und bleiben bewusst schlicht */ +.wpsg_smartcheckout .sc_button { display:inline-flex; align-items:center; justify-content:center; padding:calc(0.65 * var(--sc-u, 1rem)) calc(1.1 * var(--sc-u, 1rem)); border:1px solid var(--sc-accent); border-radius:var(--sc-radius); background:none; color:inherit; font:inherit; cursor:pointer; } +.wpsg_smartcheckout .sc_button:hover { background:var(--sc-flat); } +.wpsg_smartcheckout .sc_button:disabled { opacity:0.5; cursor:default; } +.wpsg_smartcheckout .sc_button_secondary { padding:calc(0.5 * var(--sc-u, 1rem)) calc(0.9 * var(--sc-u, 1rem)); border-color:var(--sc-line); font-size:calc(0.9 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_button_order { width:100%; margin-top:calc(1.1 * var(--sc-u, 1rem)); font-weight:600; } + +/* Ladeanzeige */ +.wpsg_smartcheckout .sc_spinner { position:absolute; top:calc(1.25 * var(--sc-u, 1rem)); right:calc(1.25 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_spinner_dot { display:block; width:calc(0.9 * var(--sc-u, 1rem)); height:calc(0.9 * var(--sc-u, 1rem)); border:2px solid var(--sc-line); border-top-color:var(--sc-accent); border-radius:50%; animation:wpsg_sc_spin 0.7s linear infinite; } + +/* Layer beim Abschicken der Bestellung über der gesamten Seite */ +.wpsg_smartcheckout .sc_submitting { position:fixed; top:0; left:0; right:0; bottom:0; z-index:100001; display:flex; align-items:center; justify-content:center; padding:var(--sc-u, 1rem); background-color:rgba(255, 255, 255, 0.75); cursor:wait; } +.wpsg_smartcheckout .sc_submitting_inner { display:flex; align-items:center; gap:calc(0.75 * var(--sc-u, 1rem)); padding:var(--sc-u, 1rem) calc(1.25 * var(--sc-u, 1rem)); border:1px solid var(--sc-line-soft); border-radius:var(--sc-radius); background-color:#FFFFFF; color:#1d1d1d; box-shadow:0 4px 20px rgba(0, 0, 0, 0.08); } +.wpsg_smartcheckout .sc_submitting .sc_spinner_dot { width:calc(1.2 * var(--sc-u, 1rem)); height:calc(1.2 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_label_hidden, +.wpsg_smartcheckout .sc_visuallyhidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; } + +/* GARAN-Gewährleistungslabel */ + +.wpsg_smartcheckout .sc_garan { text-align:center; margin:var(--sc-u, 1rem) 0; } +.wpsg_smartcheckout .sc_garan img { display:block; max-width:100%; height:auto; } +.wpsg_smartcheckout .sc_product_garan { margin-top:calc(0.5 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .wpsg_product_garan_wrap { margin-bottom:calc(0.5 * var(--sc-u, 1rem)); } +.wpsg_smartcheckout .sc_garan_zoom { display:inline-block; padding:0; border:0; background:none; cursor:zoom-in; } +.wpsg_smartcheckout .sc_garan_zoom:focus-visible { outline:2px solid currentColor; outline-offset:2px; } +.wpsg_smartcheckout .sc_garan_lightbox { cursor:zoom-out; } +.wpsg_smartcheckout .sc_garan_lightbox .sc_garan_popup_inner { cursor:default; } +.wpsg_smartcheckout .sc_garan_popup { position:fixed; top:0; left:0; right:0; bottom:0; z-index:100000; display:flex; align-items:center; justify-content:center; padding:var(--sc-u, 1rem); background-color:rgba(0, 0, 0, 0.6); } +.wpsg_smartcheckout .sc_garan_popup_inner { display:flex; flex-direction:column; max-width:600px; max-height:100%; padding:var(--sc-u, 1rem); text-align:center; background-color:#FFFFFF; } +.wpsg_smartcheckout .sc_garan_popup_image { min-height:0; overflow-y:auto; } +.wpsg_smartcheckout .sc_garan_popup_image img { max-width:100%; height:auto; } +.wpsg_smartcheckout .sc_garan_popup_inner .sc_button { flex:0 0 auto; margin-top:var(--sc-u, 1rem); } +.wpsg_smartcheckout .sc_product_revocation { margin-top:calc(0.5 * var(--sc-u, 1rem)); } + +@keyframes wpsg_sc_spin { + to { transform:rotate(360deg); } +} + +@media (prefers-reduced-motion: reduce) { + .wpsg_smartcheckout .sc_spinner_dot { animation:none; } + .wpsg_smartcheckout .sc_layout.sc_busy { transition:none; } +} + +/* Schmale Ansichten */ +@media (max-width: 900px) { + .wpsg_smartcheckout .sc_layout { grid-template-columns:minmax(0, 1fr); } + .wpsg_smartcheckout .sc_side { position:static; margin-top:var(--sc-gap); } +} + +@media (max-width: 600px) { + .wpsg_smartcheckout .sc_choice_hint .wpsg_mod_creditcard { grid-template-columns:minmax(0, 1fr); } + .wpsg_smartcheckout .sc_summary { padding:var(--sc-u, 1rem); } + .wpsg_smartcheckout .sc_product { padding:calc(0.75 * var(--sc-u, 1rem)); } + /* Ohne Produktbild bliebe im Raster eine leere Spalte stehen, deshalb hier Flex */ + .wpsg_smartcheckout .sc_product { display:flex; flex-wrap:wrap; align-items:center; gap:calc(0.75 * var(--sc-u, 1rem)) var(--sc-u, 1rem); } + .wpsg_smartcheckout .sc_product_image { flex:0 0 auto; } + .wpsg_smartcheckout .sc_product_body { flex:1 1 60%; min-width:0; } + .wpsg_smartcheckout .sc_product_fields { flex:1 1 100%; } + .wpsg_smartcheckout .sc_product_amount { flex:0 0 auto; align-items:flex-start; } + .wpsg_smartcheckout .sc_product_price { flex:1 1 auto; } + .wpsg_smartcheckout .sc_field_half, + .wpsg_smartcheckout .sc_field_wide, + .wpsg_smartcheckout .sc_field_narrow { grid-column:span 12; } +} + +/* + * Theme "wpshopgermany" (Bootstrap 3) + * + * Bootstrap setzt html { font-size:10px }, alle Größen des Checkouts würden damit zu klein. Die Modultemplates + * des Themes (z.B. Bestellvariablen) bringen Bootstrap-Raster und eigene Auswahlfelder (sto_select) mit, deren + * Script im SmartCheckout nicht läuft. + */ +body.wp-theme-wpshopgermany .wpsg_smartcheckout, +body.wp-theme-wpshopgermany .wpsg_smartcheckout_after { --sc-u:15px; } +/* #content_wrap hat overflow-x:hidden und wird dadurch zum Scroll-Container, die Zusammenfassung wäre dann nicht mehr sticky. clip schneidet genauso ab, ohne Scroll-Container */ +body.wp-theme-wpshopgermany #content_wrap { overflow-x:clip; overflow-y:visible; } +body.wp-theme-wpshopgermany .wpsg_smartcheckout label { max-width:none; margin-bottom:0; font-weight:inherit; } +body.wp-theme-wpshopgermany .wpsg_smartcheckout .sc_title { letter-spacing:normal; } +body.wp-theme-wpshopgermany .wpsg_smartcheckout .sc_modul_extra .row { margin-left:0; margin-right:0; } +body.wp-theme-wpshopgermany .wpsg_smartcheckout .sc_modul_extra .row { margin-bottom:0; } +body.wp-theme-wpshopgermany .wpsg_smartcheckout .sc_modul_extra .row + .row { margin-top:calc(0.9 * var(--sc-u)); } +body.wp-theme-wpshopgermany .wpsg_smartcheckout .sc_modul_extra [class*="col-"] { float:none; width:auto; padding-left:0; padding-right:0; } +body.wp-theme-wpshopgermany .wpsg_smartcheckout .sc_modul_extra .sto_col_label { margin-bottom:calc(0.3 * var(--sc-u)); } +body.wp-theme-wpshopgermany .wpsg_smartcheckout .sc_modul_extra .sto_col_label label { font-size:calc(0.85 * var(--sc-u)); opacity:0.7; } +body.wp-theme-wpshopgermany .wpsg_smartcheckout .sto_select select { display:block; } +/* Bestellbedingungen des Themes: Checkbox steht neben dem label (nicht darin), die Regeln für .sc_modul_conditions label würden sie überdecken */ +body.wp-theme-wpshopgermany .wpsg_smartcheckout .sto_checkbox_wrap { display:flex; align-items:flex-start; gap:calc(0.5 * var(--sc-u)); } +body.wp-theme-wpshopgermany .wpsg_smartcheckout .sto_checkbox_wrap .sto_checkbox { float:none; flex:0 0 auto; padding:0; line-height:normal; } +body.wp-theme-wpshopgermany .wpsg_smartcheckout .sto_checkbox_wrap .sto_checkbox input[type="checkbox"] { position:static; width:auto; height:auto; margin:calc(0.15 * var(--sc-u)) 0 0 0; line-height:normal; vertical-align:top; } +body.wp-theme-wpshopgermany .wpsg_smartcheckout .sto_checkbox_wrap label { display:block; position:static; flex:1 1 auto; min-width:0; padding-left:0; } +body.wp-theme-wpshopgermany .wpsg_smartcheckout .sto_select .click, +body.wp-theme-wpshopgermany .wpsg_smartcheckout .sto_select .layer { display:none; } diff --git a/views/gfx/garan/garan_checkmark.svg b/views/gfx/garan/garan_checkmark.svg new file mode 100644 index 0000000..32e26e6 --- /dev/null +++ b/views/gfx/garan/garan_checkmark.svg @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg width="6.5299mm" height="4.8577mm" version="1.1" viewBox="0 0 6.5299 4.8577" xmlns="http://www.w3.org/2000/svg"> + <g transform="translate(82.504 -.17385)"> + <g transform="matrix(.26458 0 0 .26458 -155.88 -7.3377)"> + <circle cx="286.5" cy="37.57" r="9.18"/> + <path class="cls-3" d="m291.18 43.11s-1.05 1.2-1.41 1.58c-0.25 0.26-0.57 0.73-0.96 0.93-1.02 0.52-1.22 0.5-2.24 0.24-0.43-0.11-0.83-0.43-1.16-0.73l-6.81-6.08c-0.82-0.74-0.27-2.1 0.83-2.06l4.27 0.16c0.52 0.02 1.02 0.23 1.4 0.58l6.09 5.36z" fill="#fff" stroke="#231f20" stroke-miterlimit="10" stroke-width=".5px"/> + <path class="cls-3" d="m283.68 43.59 2.04 1.82c1.19 0.84 2.62 0.87 3.66-0.28l12.06-13.48c0.69-0.78 0.19-2.02-0.88-2.14l-2.02-0.24c-0.92-0.11-1.83 0.22-2.44 0.88l-12.42 13.45z" fill="#fff" stroke="#231f20" stroke-miterlimit="10" stroke-width=".5px"/> + </g> + </g> +</svg> diff --git a/views/gfx/garan/garan_eu.svg b/views/gfx/garan/garan_eu.svg new file mode 100644 index 0000000..d008fec --- /dev/null +++ b/views/gfx/garan/garan_eu.svg @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg width="10.226mm" height="14.585mm" version="1.1" viewBox="0 0 10.226 14.585" xmlns="http://www.w3.org/2000/svg"> + <g transform="translate(-105.07 -27.989)"> + <path class="cls-6" d="m105.07 27.989v11.808c0 0.52123 0.27517 0.9816 0.67733 1.1351l4.1249 1.5822c0.20108 0.07673 0.41804 0.07937 0.62177 0.0053l4.1143-1.5161c0.40746-0.15081 0.68792-0.61383 0.68792-1.1377v-11.877z" fill="#034ea2" stroke-width=".26458"/> + <g transform="matrix(.26458 0 0 .26458 20.037 28.388)" fill="#fff200"> + <polygon class="cls-7" points="338.29 13.26 339.79 14.34 339.23 16.09 340.71 15.01 342.19 16.09 341.62 14.34 343.13 13.26 341.27 13.26 340.71 11.49 340.14 13.26"/> + <polygon class="cls-7" points="330.62 15.32 332.12 16.4 331.56 18.15 333.04 17.07 334.52 18.15 333.96 16.4 335.46 15.32 333.61 15.32 333.04 13.55 332.47 15.32"/> + <polygon class="cls-7" points="329.86 20.94 328 20.94 327.43 19.17 326.87 20.94 325.01 20.94 326.52 22.02 325.95 23.77 327.43 22.69 328.92 23.77 328.35 22.02"/> + <polygon class="cls-7" points="324.46 29.67 323.9 31.42 325.38 30.34 326.86 31.42 326.3 29.67 327.8 28.59 325.95 28.59 325.38 26.82 324.81 28.6 322.96 28.59"/> + <polygon class="cls-7" points="328.35 37.35 329.86 36.27 328 36.27 327.43 34.5 326.87 36.27 325.01 36.27 326.52 37.35 325.95 39.1 327.43 38.02 328.92 39.1"/> + <polygon class="cls-7" points="333.97 42.97 335.47 41.89 333.62 41.89 333.05 40.12 332.49 41.89 330.63 41.89 332.14 42.97 331.57 44.72 333.05 43.64 334.53 44.72"/> + <polygon class="cls-7" points="341.62 45 343.13 43.92 341.27 43.92 340.71 42.15 340.14 43.93 338.29 43.92 339.79 45 339.23 46.75 340.71 45.67 342.19 46.75"/> + <polygon class="cls-7" points="349.28 42.97 350.78 41.89 348.93 41.89 348.36 40.12 347.79 41.89 345.94 41.89 347.44 42.97 346.88 44.72 348.36 43.64 349.84 44.72"/> + <polygon class="cls-7" points="354.9 37.35 356.4 36.27 354.55 36.27 353.98 34.5 353.41 36.27 351.56 36.27 353.06 37.35 352.5 39.1 353.98 38.02 355.46 39.1"/> + <polygon class="cls-7" points="357.5 31.4 356.93 29.65 358.44 28.57 356.58 28.57 356.01 26.8 355.45 28.57 353.59 28.57 355.1 29.65 354.54 31.4 356.01 30.32"/> + <polygon class="cls-7" points="351.56 20.92 353.06 22 352.5 23.74 353.98 22.66 355.46 23.74 354.9 22 356.4 20.92 354.55 20.92 353.98 19.15 353.41 20.92"/> + <polygon class="cls-7" points="350.81 15.32 348.95 15.32 348.38 13.55 347.82 15.32 345.96 15.32 347.46 16.4 346.9 18.15 348.39 17.07 349.86 18.15 349.3 16.4"/> + </g> + <path class="cls-4" d="m109.12 38.107c-0.68792-0.48419-1.1271-1.2462-1.2039-2.0849l-0.11906-1.2912 1.1271-0.51858c0.34131-0.1561 0.70643-0.26194 1.0821-0.2831 0.4789-0.02646 0.94456 0.06085 1.3758 0.25929l1.1774 0.5424-0.0476 0.52917-0.30163-0.02646 0.0291-0.30427-0.9472-0.44715c-0.0291-0.01323-0.0476-0.02117-0.0714-0.03175-0.37836-0.16669-0.78052-0.24077-1.1959-0.21696-0.33602 0.01852-0.66146 0.11377-0.96837 0.254l-0.93663 0.43127 0.0979 1.0795c0.0688 0.75142 0.46037 1.4288 1.0768 1.8653l0.89429 0.63235 0.87577-0.63235c0.52388-0.37042 0.889-0.9181 1.0266-1.5452l0.037-0.1561h-1.9473v-0.30162h2.2781l-0.0159 0.16404c-0.0767 0.83608-0.51593 1.5981-1.2038 2.0849l-1.0583 0.74877-1.0583-0.74877z" fill="#fff" stroke-width=".26458"/> + </g> +</svg> diff --git a/views/gfx/garan/garan_qr.svg b/views/gfx/garan/garan_qr.svg new file mode 100644 index 0000000..ce4540a --- /dev/null +++ b/views/gfx/garan/garan_qr.svg @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg width="17.563mm" height="17.563mm" version="1.1" viewBox="0 0 17.563 17.563" xmlns="http://www.w3.org/2000/svg"> + <defs> + <clipPath id="clippath-2"> + <path class="cls-11" d="m246.75 84.49v1.79h1.79v-1.79zm-1.79 0v1.79h1.79v-1.79zm-1.79 0v1.79h1.79v-1.79zm-1.8 0v1.79h1.79v-1.79zm-3.59 0v5.38h1.79v-5.38zm-1.79 0v5.38h1.79v-5.38zm-1.8 0v5.38h1.79v-5.38zm-5.38 0v3.59h1.79v-3.59zm-5.38 0v1.79h1.79v-1.79zm-7.18 0v1.79h1.79v-1.79zm-1.79 0v8.97h1.79v-8.97zm25.12 1.79v5.38h1.79v-5.38zm-7.18 0v1.79h1.79v-1.79zm-14.35 0v3.59h1.79v-3.59zm-7.18 0v1.79h1.79v-1.79zm34.09 1.8v5.38h1.79v-5.38zm-3.59 0v1.79h1.79v-1.79zm-14.35 0v1.79h1.79v-1.79zm-1.8 0v1.79h1.79v-1.79zm-1.79 0v7.18h1.79v-7.18zm-1.79 0v3.59h1.79v-3.59zm-1.8 0v1.79h1.79v-1.79zm-7.17 0v1.79h1.79v-1.79zm30.5 1.79v1.79h1.79v-1.79zm-5.39 1.79v3.59h1.79v-3.59zm-3.59 0v3.59h1.79v-3.59zm-1.79 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm-8.97 0v1.79h1.79v-1.79zm-7.17 0v3.59h1.79v-3.59zm34.08 1.8v5.38h1.79v-5.38zm-7.17 0v5.38h1.79v-5.38zm-17.94 0v5.38h1.79v-5.38zm-5.39 0v1.79h1.79v-1.79zm26.92 1.79v1.79h1.79v-1.79zm-7.18 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm-7.17 0v1.79h1.79v-1.79zm-3.59 0v5.38h1.79v-5.38zm-3.59 0v10.76h1.79v-10.76zm26.91 1.8v5.38h1.79v-5.38zm-17.94 0v3.59h1.79v-3.59zm-3.59 0v1.79h1.79v-1.79zm-3.58 0v1.79h1.79v-1.79zm46.64 1.79v3.59h1.79v-3.59zm-8.97 0v5.38h1.79v-5.38zm-1.79 0v3.59h1.79v-3.59zm-7.18 0v1.79h1.79v-1.79zm-7.18 0v1.79h1.79v-1.79zm-5.38 0v5.38h1.79v-5.38zm-1.79 0v3.59h1.79v-3.59zm-1.8 0v10.76h1.79v-10.76zm-17.94 0v1.79h1.79v-1.79zm-8.97 0v3.59h1.79v-3.59zm-1.79 0v1.79h1.79v-1.79zm64.59 1.8v5.38h1.79v-5.38zm-3.59 0v1.79h1.79v-1.79zm-5.38 0v3.59h1.79v-3.59zm-12.56 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm-12.56 0v1.79h1.79v-1.79zm-1.79 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm-16.15 0v1.79h1.79v-1.79zm44.85 1.79v1.79h1.79v-1.79zm-3.58 0v7.18h1.79v-7.18zm-1.8 0v1.79h1.79v-1.79zm-8.97 0v1.79h1.79v-1.79zm-1.79 0v1.79h1.79v-1.79zm-10.77 0v5.38h1.79v-5.38zm-12.56 0v1.79h1.79v-1.79zm-1.79 0v7.18h1.79v-7.18zm-1.79 0v1.79h1.79v-1.79zm-7.18 0v5.38h1.79v-5.38zm61 1.79v3.59h1.79v-3.59zm-3.59 0v8.97h1.79v-8.97zm-5.38 0v1.79h1.79v-1.79zm-3.59 0v8.97h1.79v-8.97zm-10.77 0v7.18h1.79v-7.18zm-7.17 0v3.59h1.79v-3.59zm-5.38 0v3.59h1.79v-3.59zm-3.59 0v7.18h1.79v-7.18zm-5.38 0v1.79h1.79v-1.79zm-3.59 0v3.59h1.79v-3.59zm-10.77 0v5.38h1.79v-5.38zm52.03 1.8v1.79h1.79v-1.79zm-8.97 0v1.79h1.79v-1.79zm-1.79 0v1.79h1.79v-1.79zm-3.59 0v3.59h1.79v-3.59zm-3.59 0v1.79h1.79v-1.79zm-8.97 0v1.79h1.79v-1.79zm-7.18 0v1.79h1.79v-1.79zm-8.97 0v1.79h1.79v-1.79zm-7.17 0v1.79h1.79v-1.79zm59.2 1.79v1.79h1.79v-1.79zm-12.56 0v1.79h1.79v-1.79zm-16.14 0v1.79h1.79v-1.79zm-1.8 0v5.38h1.79v-5.38zm-14.35 0v1.79h1.79v-1.79zm-1.79 0v1.79h1.79v-1.79zm-1.8 0v7.18h1.79v-7.18zm-7.17 0v1.79h1.79v-1.79zm-1.8 0v1.79h1.79v-1.79zm59.21 1.8v3.59h1.79v-3.59zm-5.39 0v1.79h1.79v-1.79zm-5.38 0v7.18h1.79v-7.18zm-10.76 0v1.79h1.79v-1.79zm-23.33 0v1.79h1.79v-1.79zm-7.17 0v1.79h1.79v-1.79zm-1.8 0v1.79h1.79v-1.79zm-7.17 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm62.79 1.79v5.38h1.79v-5.38zm-1.79 0v1.79h1.79v-1.79zm-5.38 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm-7.18 0v8.97h1.79v-8.97zm-5.38 0v5.38h1.79v-5.38zm-3.59 0v10.76h1.79v-10.76zm-1.79 0v5.38h1.79v-5.38zm-5.39 0v3.59h1.79v-3.59zm-1.79 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm-7.17 0v1.79h1.79v-1.79zm43.05 1.79v1.79h1.79v-1.79zm-8.97 0v1.79h1.79v-1.79zm-8.97 0v3.59h1.79v-3.59zm-3.59 0v1.79h1.79v-1.79zm-7.17 0v8.97h1.79v-8.97zm-5.38 0v5.38h1.79v-5.38zm-7.18 0v7.18h1.79v-7.18zm-7.18 0v1.79h1.79v-1.79zm-1.79 0v3.59h1.79v-3.59zm-3.59 0v10.76h1.79v-10.76zm-3.59 0v1.79h1.79v-1.79zm-1.79 0v3.59h1.79v-3.59zm52.03 1.8v1.79h1.79v-1.79zm-5.38 0v1.79h1.79v-1.79zm-19.74 0v3.59h1.79v-3.59zm-3.59 0v1.79h1.79v-1.79zm-1.79 0v5.38h1.79v-5.38zm-1.8 0v1.79h1.79v-1.79zm-7.17 0v1.79h1.79v-1.79zm-8.97 0v3.59h1.79v-3.59zm61 1.79v1.79h1.79v-1.79zm-7.18 0v3.59h1.79v-3.59zm-8.97 0v1.79h1.79v-1.79zm-5.38 0v5.38h1.79v-5.38zm-5.39 0v1.79h1.79v-1.79zm-23.32 0v5.38h1.79v-5.38zm-3.59 0v1.79h1.79v-1.79zm44.86 1.8v3.59h1.79v-3.59zm-1.8 0v5.38h1.79v-5.38zm-1.79 0v3.59h1.79v-3.59zm-1.8 0v3.59h1.79v-3.59zm-10.76 0v7.18h1.79v-7.18zm-5.38 0v1.79h1.79v-1.79zm-5.39 0v1.79h1.79v-1.79zm-8.97 0v1.79h1.79v-1.79zm-3.58 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm-5.38 0v1.79h1.79v-1.79zm-5.39 0v1.79h1.79v-1.79zm-1.79 0v3.59h1.79v-3.59zm64.59 1.79v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm-1.8 0v1.79h1.79v-1.79zm-10.76 0v1.79h1.79v-1.79zm-7.18 0v1.79h1.79v-1.79zm-14.35 0v1.79h1.79v-1.79zm-1.79 0v3.59h1.79v-3.59zm-14.36 0v1.79h1.79v-1.79zm-1.79 0v1.79h1.79v-1.79zm37.68 1.79v1.79h1.79v-1.79zm-14.36 0v5.38h1.79v-5.38zm-8.97 0v1.79h1.79v-1.79zm-5.38 0v3.59h1.79v-3.59zm-10.76 0v5.38h1.79v-5.38zm-3.59 0v3.59h1.79v-3.59zm-1.8 0v3.59h1.79v-3.59zm55.62 1.8v1.79h1.79v-1.79zm-5.38 0v3.59h1.79v-3.59zm-1.8 0v1.79h1.79v-1.79zm-7.17 0v1.79h1.79v-1.79zm-1.8 0v1.79h1.79v-1.79zm-3.59 0v3.59h1.79v-3.59zm-1.79 0v10.76h1.79v-10.76zm-5.38 0v3.59h1.79v-3.59zm-1.8 0v1.79h1.79v-1.79zm-8.97 0v3.59h1.79v-3.59zm-3.58 0v3.59h1.79v-3.59zm-1.8 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm-10.76 0v1.79h1.79v-1.79zm64.59 1.79v3.59h1.79v-3.59zm-1.8 0v3.59h1.79v-3.59zm-3.59 0v1.79h1.79v-1.79zm-5.38 0v1.79h1.79v-1.79zm-5.38 0v3.59h1.79v-3.59zm-3.59 0v1.79h1.79v-1.79zm-17.94 0v3.59h1.79v-3.59zm-3.59 0v1.79h1.79v-1.79zm-10.76 0v1.79h1.79v-1.79zm-7.18 0v1.79h1.79v-1.79zm55.62 1.8v1.79h1.79v-1.79zm-3.59 0v16.15h1.79v-16.15zm-10.76 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm-8.97 0v1.79h1.79v-1.79zm-5.39 0v16.15h1.79v-16.15zm-3.58 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm-10.77 0v1.79h1.79v-1.79zm-8.97 0v1.79h1.79v-1.79zm57.41 1.79v1.79h1.79v-1.79zm-5.38 0v1.79h1.79v-1.79zm-3.59 0v19.73h1.79v-19.73zm-17.94 0v5.38h1.79v-5.38zm-14.35 0v7.18h1.79v-7.18zm-1.79 0v5.38h1.79v-5.38zm-1.8 0v3.59h1.79v-3.59zm-5.38 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm59.21 1.79v1.79h1.79v-1.79zm-3.59 0v3.59h1.79v-3.59zm-5.38 0v5.38h1.79v-5.38zm-3.59 0v1.79h1.79v-1.79zm-5.38 0v3.59h1.79v-3.59zm-5.39 0v3.59h1.79v-3.59zm-3.59 0v7.18h1.79v-7.18zm-3.58 0v1.79h1.79v-1.79zm-3.59 0v5.38h1.79v-5.38zm-5.38 0v5.38h1.79v-5.38zm-5.39 0v1.79h1.79v-1.79zm-8.97 0v1.79h1.79v-1.79zm-7.17 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm62.79 1.8v5.38h1.79v-5.38zm-17.94 0v3.59h1.79v-3.59zm-5.38 0v1.79h1.79v-1.79zm-12.56 0v8.97h1.79v-8.97zm-3.59 0v5.38h1.79v-5.38zm-1.79 0v3.59h1.79v-3.59zm-8.97 0v3.59h1.79v-3.59zm52.03 1.79v1.79h1.79v-1.79zm-10.77 0v1.79h1.79v-1.79zm-1.79 0v1.79h1.79v-1.79zm-17.94 0v10.76h1.79v-10.76zm-14.36 0v1.79h1.79v-1.79zm-5.38 0v3.59h1.79v-3.59zm-3.59 0v1.79h1.79v-1.79zm-1.79 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm55.62 1.8v1.79h1.79v-1.79zm-12.56 0v1.79h1.79v-1.79zm-7.18 0v5.38h1.79v-5.38zm-1.79 0v1.79h1.79v-1.79zm-3.59 0v7.18h1.79v-7.18zm23.32 1.79v1.79h1.79v-1.79zm-5.38 0v1.79h1.79v-1.79zm-7.17 0v3.59h1.79v-3.59zm-3.59 0v3.59h1.79v-3.59zm-10.77 0v1.79h1.79v-1.79zm-10.76 0v3.59h1.79v-3.59zm-1.8 0v3.59h1.79v-3.59zm-1.79 0v3.59h1.79v-3.59zm44.85 1.79v1.79h1.79v-1.79zm-1.79 0v1.79h1.79v-1.79zm-12.56 0v8.97h1.79v-8.97zm-3.59 0v1.79h1.79v-1.79zm-7.18 0v5.38h1.79v-5.38zm-7.17 0v1.79h1.79v-1.79zm-5.38 0v1.79h1.79v-1.79zm-1.8 0v1.79h1.79v-1.79zm32.3 1.8v3.59h1.79v-3.59zm-1.8 0v8.97h1.79v-8.97zm-1.79 0v3.59h1.79v-3.59zm-35.88 0v3.59h1.79v-3.59zm48.44 1.79v1.79h1.79v-1.79zm-5.39 0v5.38h1.79v-5.38zm-12.55 0v1.79h1.79v-1.79zm-1.8 0v1.79h1.79v-1.79zm-1.79 0v1.79h1.79v-1.79zm-1.8 0v1.79h1.79v-1.79zm-10.76 0v1.79h1.79v-1.79zm-3.59 0v3.59h1.79v-3.59zm-1.79 0v1.79h1.79v-1.79zm-5.39 0v1.79h1.79v-1.79zm-1.79 0v7.18h1.79v-7.18zm39.47 1.8v1.79h1.79v-1.79zm-17.94 0v5.38h1.79v-5.38zm-3.59 0v3.59h1.79v-3.59zm-3.59 0v1.79h1.79v-1.79zm-3.59 0v3.59h1.79v-3.59zm-5.38 0v1.79h1.79v-1.79zm32.3 1.79v3.59h1.79v-3.59zm-8.97 0v3.59h1.79v-3.59zm-3.59 0v3.59h1.79v-3.59zm-1.8 0v3.59h1.79v-3.59zm-16.14 0v3.59h1.79v-3.59zm-3.59 0v3.59h1.79v-3.59zm-1.8 0v1.79h1.79v-1.79zm-5.38 0v3.59h1.79v-3.59zm50.24 1.8v1.79h1.79v-1.79zm-1.8 0v1.79h1.79v-1.79zm-1.79 0v1.79h1.79v-1.79zm-3.59 0v1.79h1.79v-1.79zm-23.32 0v1.79h1.79v-1.79zm-1.8 0v1.79h1.79v-1.79z"/> + </clipPath> + <clipPath id="clippath-3"> + <path class="cls-11" d="m196.52 84.49v12.56h12.56v-12.56zm1.79 1.79h8.97v8.97h-8.97z"/> + </clipPath> + <clipPath id="clippath-4"> + <rect class="cls-11" x="200.11" y="88.08" width="5.38" height="5.38"/> + </clipPath> + <clipPath id="clippath-5"> + <path class="cls-11" d="m262.9 84.49h-12.56v12.56h12.56zm-1.79 1.79v8.97h-8.97v-8.97z"/> + </clipPath> + <clipPath id="clippath-6"> + <rect class="cls-11" x="253.93" y="88.08" width="5.38" height="5.38"/> + </clipPath> + <clipPath id="clippath-7"> + <path class="cls-11" d="m196.52 150.87h12.56v-12.56h-12.56zm1.79-1.79v-8.97h8.97v8.97z"/> + </clipPath> + <clipPath id="clippath-8"> + <rect class="cls-11" x="200.11" y="141.9" width="5.38" height="5.38"/> + </clipPath> + </defs> + <g transform="translate(-94.055 -97.525)"> + <g class="cls-20" transform="matrix(.26458 0 0 .26458 42.059 75.171)" clip-path="url(#clippath-2)"> + <rect class="cls-18" x="192.33" y="80.3" width="74.75" height="74.75" fill="#010101"/> + </g> + <g class="cls-16" transform="matrix(.26458 0 0 .26458 42.059 75.171)" clip-path="url(#clippath-3)"> + <rect class="cls-18" x="196.52" y="84.49" width="12.56" height="12.56" fill="#010101"/> + </g> + <g class="cls-6" transform="matrix(.26458 0 0 .26458 42.059 75.171)" clip-path="url(#clippath-4)"> + <rect class="cls-18" x="200.11" y="88.08" width="5.38" height="5.38" fill="#010101"/> + </g> + <g class="cls-14" transform="matrix(.26458 0 0 .26458 42.059 75.171)" clip-path="url(#clippath-5)"> + <rect class="cls-18" x="250.34" y="84.49" width="12.56" height="12.56" fill="#010101"/> + </g> + <g class="cls-1" transform="matrix(.26458 0 0 .26458 42.059 75.171)" clip-path="url(#clippath-6)"> + <rect class="cls-18" x="253.93" y="88.08" width="5.38" height="5.38" fill="#010101"/> + </g> + <g class="cls-2" transform="matrix(.26458 0 0 .26458 42.059 75.171)" clip-path="url(#clippath-7)"> + <rect class="cls-18" x="196.52" y="138.31" width="12.56" height="12.56" fill="#010101"/> + </g> + <g class="cls-15" transform="matrix(.26458 0 0 .26458 42.059 75.171)" clip-path="url(#clippath-8)"> + <rect class="cls-18" x="200.11" y="141.9" width="5.38" height="5.38" fill="#010101"/> + </g> + </g> +</svg> diff --git a/views/gfx/garan/garan_year.svg b/views/gfx/garan/garan_year.svg new file mode 100644 index 0000000..b8a6b64 --- /dev/null +++ b/views/gfx/garan/garan_year.svg @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg width="3.7571mm" height="3.6698mm" version="1.1" viewBox="0 0 3.7571 3.6698" xmlns="http://www.w3.org/2000/svg"> + <g transform="translate(-37.452 -48.774)"> + <g transform="matrix(.26458 0 0 .26458 18.767 40.05)"> + <g stroke="#231f20" stroke-miterlimit="10" stroke-width=".5px"> + <rect class="cls-5" x="70.87" y="34.81" width="13.7" height="11.78" rx="1.66" ry="1.66" fill="none"/> + <rect class="cls-3" x="74.42" y="33.22" width="1.62" height="3.22" rx=".54" ry=".54" fill="#fff"/> + <rect class="cls-3" x="79.38" y="33.22" width="1.62" height="3.22" rx=".54" ry=".54" fill="#fff"/> + <line class="cls-5" x1="70.87" x2="84.56" y1="38.02" y2="38.02" fill="none"/> + </g> + <g fill="#231f20"> + <path class="cls-2" d="m73.71 44.59c-0.33 0-0.62-0.06-0.88-0.17-0.25-0.11-0.45-0.27-0.6-0.47s-0.22-0.43-0.22-0.69h1.05c0 0.09 0.03 0.18 0.09 0.25s0.13 0.13 0.23 0.17 0.21 0.06 0.33 0.06 0.23-0.02 0.33-0.07 0.17-0.11 0.22-0.18c0.05-0.08 0.08-0.17 0.08-0.27s-0.03-0.19-0.09-0.27-0.14-0.14-0.25-0.18-0.24-0.07-0.38-0.07h-0.42v-0.74h0.42c0.13 0 0.24-0.02 0.34-0.06s0.17-0.1 0.23-0.18 0.08-0.17 0.08-0.27-0.02-0.18-0.07-0.26-0.11-0.13-0.2-0.17c-0.08-0.04-0.18-0.06-0.29-0.06-0.12 0-0.22 0.02-0.31 0.06s-0.17 0.1-0.22 0.17c-0.06 0.07-0.08 0.16-0.09 0.26h-1c0-0.26 0.07-0.49 0.22-0.68 0.14-0.2 0.33-0.35 0.58-0.46 0.24-0.11 0.52-0.17 0.83-0.17s0.58 0.05 0.82 0.16 0.42 0.26 0.55 0.44c0.13 0.19 0.2 0.4 0.2 0.63 0 0.24-0.08 0.45-0.24 0.6-0.16 0.16-0.37 0.26-0.62 0.29v0.03c0.34 0.04 0.59 0.15 0.76 0.33s0.26 0.4 0.25 0.67c0 0.25-0.07 0.47-0.22 0.67-0.15 0.19-0.35 0.35-0.61 0.46s-0.56 0.17-0.9 0.17z"/> + <path class="cls-2" d="m77.77 44.59c-0.24 0-0.46-0.04-0.68-0.12s-0.41-0.2-0.58-0.37-0.3-0.39-0.4-0.66-0.15-0.61-0.14-1c0-0.36 0.04-0.68 0.13-0.96s0.21-0.53 0.37-0.72c0.16-0.2 0.35-0.35 0.58-0.46 0.22-0.1 0.47-0.16 0.75-0.16 0.3 0 0.57 0.06 0.8 0.18s0.42 0.28 0.56 0.47c0.14 0.2 0.22 0.42 0.25 0.66h-1.03c-0.03-0.14-0.1-0.24-0.2-0.31s-0.23-0.11-0.37-0.11c-0.27 0-0.46 0.11-0.59 0.34s-0.2 0.54-0.2 0.92h0.03c0.06-0.13 0.14-0.24 0.26-0.33s0.24-0.16 0.38-0.21 0.3-0.08 0.46-0.08c0.26 0 0.49 0.06 0.69 0.18s0.35 0.28 0.47 0.49 0.17 0.45 0.17 0.71c0 0.3-0.07 0.57-0.21 0.8s-0.34 0.41-0.59 0.54-0.54 0.19-0.87 0.19zm-0.01-0.81c0.13 0 0.24-0.03 0.34-0.09s0.18-0.14 0.24-0.25c0.06-0.1 0.09-0.22 0.08-0.35 0-0.13-0.03-0.25-0.08-0.35s-0.14-0.18-0.24-0.25-0.22-0.09-0.35-0.09c-0.09 0-0.18 0.02-0.26 0.05s-0.15 0.08-0.21 0.15-0.11 0.14-0.14 0.22-0.05 0.17-0.05 0.27c0 0.13 0.03 0.24 0.09 0.35 0.06 0.1 0.14 0.19 0.24 0.25s0.21 0.09 0.34 0.09z"/> + <path class="cls-2" d="m81.7 44.59c-0.32 0-0.6-0.06-0.84-0.17-0.25-0.11-0.44-0.27-0.58-0.47s-0.22-0.43-0.22-0.69h1.02c0 0.16 0.07 0.29 0.19 0.38s0.27 0.14 0.43 0.14c0.13 0 0.25-0.03 0.35-0.09s0.18-0.14 0.24-0.24 0.09-0.23 0.08-0.36c0-0.14-0.03-0.26-0.09-0.37-0.06-0.1-0.14-0.19-0.24-0.24-0.1-0.06-0.22-0.09-0.35-0.09s-0.24 0.03-0.36 0.08c-0.11 0.06-0.2 0.13-0.25 0.23l-0.92-0.17 0.19-2.34h2.78v0.84h-1.92l-0.1 1.02h0.03c0.07-0.12 0.19-0.22 0.35-0.3s0.34-0.12 0.55-0.12c0.26 0 0.49 0.06 0.69 0.18s0.36 0.29 0.48 0.5 0.18 0.46 0.18 0.73c0 0.3-0.07 0.56-0.21 0.79s-0.34 0.41-0.59 0.54-0.55 0.2-0.88 0.2z"/> + </g> + </g> + </g> +</svg> diff --git a/views/gfx/garan/legal_guarantee_notice_den.jpg b/views/gfx/garan/legal_guarantee_notice_den.jpg Binary files differnew file mode 100644 index 0000000..f06e62d --- /dev/null +++ b/views/gfx/garan/legal_guarantee_notice_den.jpg diff --git a/views/gfx/hilfe/Preiskalkulation_wpsg_noroundamount_1.png b/views/gfx/hilfe/Preiskalkulation_wpsg_noroundamount_1.png Binary files differnew file mode 100644 index 0000000..9133507 --- /dev/null +++ b/views/gfx/hilfe/Preiskalkulation_wpsg_noroundamount_1.png diff --git a/views/gfx/hilfe/Preiskalkulation_wpsg_noroundamount_2.png b/views/gfx/hilfe/Preiskalkulation_wpsg_noroundamount_2.png Binary files differnew file mode 100644 index 0000000..3ece45b --- /dev/null +++ b/views/gfx/hilfe/Preiskalkulation_wpsg_noroundamount_2.png diff --git a/views/gfx/hilfe/wpsg_mod_fuellmenge_product_1.png b/views/gfx/hilfe/wpsg_mod_fuellmenge_product_1.png Binary files differnew file mode 100644 index 0000000..f888539 --- /dev/null +++ b/views/gfx/hilfe/wpsg_mod_fuellmenge_product_1.png diff --git a/views/gfx/hilfe/wpsg_mod_fuellmenge_product_2.png b/views/gfx/hilfe/wpsg_mod_fuellmenge_product_2.png Binary files differnew file mode 100644 index 0000000..d004911 --- /dev/null +++ b/views/gfx/hilfe/wpsg_mod_fuellmenge_product_2.png diff --git a/views/gfx/hilfe/wpsg_mod_fuellmenge_product_3.png b/views/gfx/hilfe/wpsg_mod_fuellmenge_product_3.png Binary files differnew file mode 100644 index 0000000..a0c732c --- /dev/null +++ b/views/gfx/hilfe/wpsg_mod_fuellmenge_product_3.png diff --git a/views/gfx/hilfe/wpsg_mod_trustedshops_badge_1.png b/views/gfx/hilfe/wpsg_mod_trustedshops_badge_1.png Binary files differnew file mode 100644 index 0000000..7eeab64 --- /dev/null +++ b/views/gfx/hilfe/wpsg_mod_trustedshops_badge_1.png diff --git a/views/gfx/hilfe/wpsg_mod_trustedshops_vote_1.png b/views/gfx/hilfe/wpsg_mod_trustedshops_vote_1.png Binary files differnew file mode 100644 index 0000000..ccef97d --- /dev/null +++ b/views/gfx/hilfe/wpsg_mod_trustedshops_vote_1.png diff --git a/views/gfx/hilfe/wpsg_mod_trustedshops_warranty_1.png b/views/gfx/hilfe/wpsg_mod_trustedshops_warranty_1.png Binary files differnew file mode 100644 index 0000000..0694367 --- /dev/null +++ b/views/gfx/hilfe/wpsg_mod_trustedshops_warranty_1.png diff --git a/views/js/smartcheckout.js b/views/js/smartcheckout.js new file mode 100644 index 0000000..69099dd --- /dev/null +++ b/views/js/smartcheckout.js @@ -0,0 +1,728 @@ +/** + * Vue-Anwendung des modernen EinSeitenCheckouts + * + * Die Anwendung rechnet selbst nichts. Jede Änderung wird als Formulardaten an die + * Checkout-Seite geschickt, dort serverseitig neu berechnet und als vollständiger + * Zustand zurückgeliefert. + */ + +(function() { + + 'use strict'; + + var el_root = document.getElementById('wpsg_smartcheckout'); + var el_state = document.getElementById('wpsg_smartcheckout_state'); + + if (el_root === null || el_state === null || typeof Vue === 'undefined') return; + + var initialState = null; + + try { + + initialState = JSON.parse(el_state.textContent); + + } catch (e) { + + return; + + } + + Vue.createApp({ + + data: function() { + + return { + state: initialState, + form: {}, + amounts: {}, + voucher: '', + voucherError: false, + agb: false, + garanPopup: false, + garanConfirmed: false, + garanSubmit: false, + garanLightbox: false, + busy: false, + queued: false, + queuedUpload: null, + submitting: false, + timer: null + }; + + }, + + created: function() { + + this.syncForm(true); + + // Bereits akzeptierte AGB, z.B. nach der Rückkehr von PayPal + this.agb = (this.state.accepted && this.state.accepted.agb === true); + + }, + + mounted: function() { + + // Nach einem abgelehnten Bestellversuch steht der Kunde vor dem ersten Fehler + if (this.state.errors.length !== 0) this.$nextTick(this.focusError); + + // Das GARAN-Gewährleistungslabel erscheint wie in der klassischen Zusammenfassung beim Betreten der Seite + if (this.state.warranty && this.state.warranty.popup === true && this.state.empty !== true) this.garanPopup = true; + + // Die Lightbox des Gewährleistungslabels lässt sich mit Esc schließen + var self = this; + + document.addEventListener('keydown', function(event) { + + if (event.key === 'Escape' && self.garanLightbox === true) self.garanLightbox = false; + + }); + + // Zurück aus dem Seiten-Cache des Browsers (z.B. Zurück-Button nach dem Zahlungsanbieter): Layer wieder entfernen + window.addEventListener('pageshow', function(event) { + + if (event.persisted) self.submitting = false; + + }); + + // Eingaben in den Blöcken der Module haben kein Vue-Binding, Änderungen werden hier abgefangen + el_root.addEventListener('change', this.onModuleChange); + + // Buttons in den Blöcken der Module, die eine Menge an den Server schicken (z.B. Warenkorbteaser) + el_root.addEventListener('click', this.onModuleClick); + el_root.addEventListener('keydown', this.onModuleKeydown); + + }, + + methods: { + + /** + * Übernimmt den Zustand des Servers in die Formularfelder + * + * Textfelder werden nur beim ersten Aufbau gesetzt — sonst würde eine Antwort, + * die während des Tippens eintrifft, die Eingabe des Kunden überschreiben. + */ + syncForm: function(full) { + + var self = this; + + if (full === true) { + + Object.keys(this.state.checkout).forEach(function(key) { + + self.form[key] = self.state.checkout[key]; + + }); + + } + + this.form.shipping = this.state.shipping.selected; + this.form.payment = this.state.payment.selected; + + this.amounts = {}; + + this.state.products.forEach(function(product) { + + self.amounts[product.index] = product.amount; + + }); + + }, // syncForm(full) + + /** + * Baut den Namen des Formularfeldes, benutzerdefinierte Felder liegen verschachtelt + */ + fieldName: function(field) { + + if (field.custom) return 'wpsg[checkout][custom][' + field.custom + ']'; + + return 'wpsg[checkout][' + field.name + ']'; + + }, // fieldName(field) + + /** + * Hat der Server dieses Feld als fehlerhaft gemeldet? + */ + hasError: function(name) { + + return (this.state.errors.indexOf(name) >= 0); + + }, // hasError(name) + + /** + * Wählt eine Versand- oder Zahlungsart beim Klick in ihren Block (auch in Hinweis oder Eingabefelder) + * + * Das label umfasst nur die Kopfzeile, damit Eingabefelder im Hinweis (z.B. Kreditkarte) kein + * verschachteltes label bilden. Der Klick auf das Radio selbst läuft über v-model und @change. + */ + selectChoice: function(type, id, event) { + + if (event && event.target && typeof event.target.closest === 'function' && event.target.closest('.sc_choice_head') !== null) return; + if (this.form[type] === id) return; + + this.form[type] = id; + this.refresh(); + + }, // selectChoice(type, id, event) + + /** + * Erhöht oder verringert die Menge einer Position + */ + changeAmount: function(product, diff) { + + var amount = parseInt(this.amounts[product.index], 10); + + if (isNaN(amount)) amount = product.amount; + + amount = amount + diff; + + if (amount < 1) amount = 1; + + this.amounts[product.index] = amount; + + this.refresh(); + + }, // changeAmount(product, diff) + + /** + * Schickt die Änderungen gesammelt an den Server + * + * Mehrere schnell aufeinander folgende Änderungen werden zu einer Anfrage + * zusammengefasst. + */ + refresh: function() { + + var self = this; + + if (this.timer !== null) window.clearTimeout(this.timer); + + this.timer = window.setTimeout(function() { + + self.timer = null; + self.send('update'); + + }, 250); + + }, // refresh() + + /** + * Entfernt eine Position aus dem Warenkorb + */ + removeProduct: function(product) { + + this.send('remove', { wpsg_produkt: product.index }); + + }, // removeProduct(product) + + /** + * Löst den eingegebenen Gutscheincode ein + */ + addVoucher: function() { + + if (this.voucher === '') return; + + this.send('voucherAdd'); + + }, // addVoucher() + + /** + * Nimmt einen eingelösten Gutschein wieder aus dem Warenkorb + */ + removeVoucher: function(item) { + + this.send('voucherRemove', { wpsg_voucher: item.id }); + + }, // removeVoucher(item) + + /** + * Schickt das Formular an den Server und übernimmt den neuen Zustand + * + * arKeepFiles: Namen von Dateifeldern, deren Datei mitgeschickt wird (Upload direkt nach der Auswahl) + */ + send: function(action, extra, arKeepFiles) { + + var el_form = document.getElementById('wpsg_smartcheckout_form'); + + if (el_form === null) return; + + // Dateien der direkt hochzuladenden Felder sofort sichern: der Block wird mit der nächsten Antwort neu aufgebaut + var arUpload = []; + + if (Array.isArray(arKeepFiles)) { + + arKeepFiles.forEach(function(name) { + + el_form.querySelectorAll('input[type="file"]').forEach(function(el) { + + if (el.name !== name || !el.files) return; + + for (var i = 0; i < el.files.length; i++) arUpload.push({ name: name, file: el.files[i] }); + + }); + + }); + + } + + // Es läuft bereits eine Anfrage, die Änderung wird danach nachgereicht (ein Upload samt seiner Dateien) + if (this.busy) { + + if (arUpload.length > 0) this.queuedUpload = { action: action, extra: extra, files: arUpload }; + else this.queued = true; + + return; + + } + + this.sendData(el_form, action, extra, arUpload); + + }, // send(action, extra, arKeepFiles) + + /** + * Baut die Formulardaten, schickt sie ab und übernimmt den neuen Zustand + * + * arUpload: [{ name, file }] Dateien, die mit dieser Anfrage hochgeladen werden + */ + sendData: function(el_form, action, extra, arUpload) { + + var self = this; + + var modules = this.captureModules(); + + var data = new FormData(el_form); + + // Dateien werden erst beim Abschluss übertragen, nicht bei jeder Aktualisierung, außer sie sollen direkt hochgeladen werden + el_form.querySelectorAll('input[type="file"][name]').forEach(function(el) { + + data.delete(el.name); + + }); + + (arUpload || []).forEach(function(item) { + + data.append(item.name, item.file, item.file.name); + + }); + + data.append('wpsg_smartcheckout_ajax', action); + + if (extra) { + + Object.keys(extra).forEach(function(key) { + + data.append(key, extra[key]); + + }); + + } + + this.busy = true; + + window.fetch(el_form.getAttribute('action'), { + method: 'POST', + body: data, + credentials: 'same-origin', + headers: { 'X-Requested-With': 'XMLHttpRequest' } + }) + .then(function(response) { return response.json(); }) + .then(function(result) { + + self.busy = false; + + if (result.reload === true) { + + window.location.reload(); + + return; + + } + + self.voucherError = (result.voucherError === true); + + if (result.ok === true && action === 'voucherAdd') self.voucher = ''; + + if (result.state) { + + var accepted = self.state.accepted; + + self.state = result.state; + self.syncForm(false); + self.$nextTick(function() { + + self.restoreModules(modules); + self.revokeAccepted(accepted); + + }); + + } + + if (self.queuedUpload !== null) { + + var upload = self.queuedUpload; + + self.queuedUpload = null; + self.queued = false; + self.sendData(el_form, upload.action, upload.extra, upload.files); + + } else if (self.queued) { + + self.queued = false; + self.refresh(); + + } + + }) + .catch(function() { + + self.busy = false; + self.queued = false; + self.queuedUpload = null; + + }); + + }, // sendData(el_form, action, extra, arUpload) + + /** + * Sichert die Eingaben in den servergerenderten Modulblöcken + * + * Diese Blöcke werden vom Server neu geliefert, sobald sich der Warenkorb + * ändert — ein angekreuztes Kästchen wäre sonst nach jedem Versandartwechsel + * wieder leer. + */ + captureModules: function() { + + var data = {}; + + document.querySelectorAll('#wpsg_smartcheckout .sc_modul_dynamic [name]').forEach(function(el) { + + // Dateifelder lassen sich nicht per Script setzen, ein Zuweisen von value würde eine Exception werfen + if (el.type === 'file') return; + + if (el.type === 'checkbox' || el.type === 'radio') data[el.name + '\n' + el.value] = el.checked; + else data[el.name] = el.value; + + }); + + return data; + + }, // captureModules() + + /** + * Stellt die gesicherten Eingaben wieder her, soweit die Felder noch existieren + */ + restoreModules: function(data) { + + document.querySelectorAll('#wpsg_smartcheckout .sc_modul_dynamic [name]').forEach(function(el) { + + if (el.type === 'file') return; + + if (el.type === 'checkbox' || el.type === 'radio') { + + var key = el.name + '\n' + el.value; + + if (data.hasOwnProperty(key)) el.checked = data[key]; + + } else if (data.hasOwnProperty(el.name)) { + + el.value = data[el.name]; + + } + + }); + + }, // restoreModules(data) + + /** + * Entfernt die Haken bei AGB und Bestellbedingungen, deren Akzeptanz der Server zurückgenommen hat + * + * Das passiert, wenn sich die Bestellung nach der Rückkehr von einem Zahlungsanbieter ändert. + */ + revokeAccepted: function(before) { + + var after = this.state.accepted || { agb: false, ordercondition: [] }; + + if (!before) return; + + if (before.agb === true && after.agb !== true) this.agb = false; + + (before.ordercondition || []).forEach(function(oc_id) { + + if (after.ordercondition.indexOf(oc_id) >= 0) return; + + var el = document.querySelector('#wpsg_smartcheckout .sc_modul_dynamic input[name="wpsg_mod_ordercondition[' + oc_id + ']"]'); + + if (el !== null) el.checked = false; + + }); + + }, // revokeAccepted(before) + + /** + * Springt zum ersten beanstandeten Feld + */ + focusError: function() { + + var el_first = document.querySelector('#wpsg_smartcheckout .sc_invalid'); + + if (el_first === null) return; + + el_first.scrollIntoView({ behavior: 'smooth', block: 'center' }); + + var el_input = el_first.querySelector('input, select, textarea'); + + if (el_input !== null) el_input.focus(); + + }, // focusError() + + /** + * Blockt das Absenden, solange der Server noch rechnet + */ + /** + * Berechnet neu, wenn sich eine Eingabe in einem Block der Module ändert (z.B. Lieferadresse, Produktvariablen) + * + * Dateifelder laden über eigene Wege hoch, Zustimmungen ändern nichts an der Berechnung. + */ + onModuleChange: function(event) { + + var el = event.target; + + if (!el || typeof el.closest !== 'function') return; + + // Uploads starten direkt nach der Auswahl über den Button des Moduls (z.B. Upload zum Produkt) + if (el.type === 'file') { + + this.startUpload(el); + + return; + + } + + // Felder ohne Namen werden nicht übertragen, eine Aktualisierung brächte nichts + if (!el.name) return; + + if (el.closest('.sc_modul_dynamic, .sc_modul_extra, .sc_modul_customer') === null) return; + if (el.closest('.sc_modul_conditions') !== null) return; + + this.refresh(); + + }, // onModuleChange(event) + + /** + * Löst den Upload-Button des Moduls aus, sobald im Dateifeld daneben eine Datei gewählt wurde + * + * Der Button trägt data-sc-autoupload und wird im SmartCheckout ausgeblendet. Hochgeladen wird über + * den bestehenden Weg des Moduls, der auch das Ziel mit der Dateiliste neu befüllt. Trägt das Dateifeld + * selbst data-sc-upload, geht die Datei mit einer Aktualisierung des SmartCheckouts an den Server. + */ + startUpload: function(el_file) { + + if (!el_file.files || el_file.files.length === 0 || el_file.parentElement === null) return; + + // Dateifeld, das der SmartCheckout selbst an den Server schickt (z.B. Bestellupload) + if (el_file.hasAttribute('data-sc-upload') && el_file.name) { + + // Rückmeldung wie beim Upload zum Produkt, der Block wird mit der Antwort neu aufgebaut + if (el_file.hasAttribute('data-sc-upload-wait') && el_file.parentElement.querySelector('.sc_upload_wait') === null) { + + var el_wait = document.createElement('div'); + + el_wait.className = 'sc_upload_wait'; + el_wait.textContent = el_file.getAttribute('data-sc-upload-wait') + '…'; + + el_file.insertAdjacentElement('afterend', el_wait); + + } + + if (this.timer !== null) { + + window.clearTimeout(this.timer); + this.timer = null; + + } + + this.send('update', null, [el_file.name]); + + return; + + } + + var el_button = el_file.parentElement.querySelector('[data-sc-autoupload]'); + + if (el_button !== null) el_button.click(); + + }, // startUpload(el_file) + + /** + * Schickt die Menge eines Buttons mit data-sc-send unter dem dort angegebenen Namen an den Server + * + * Die Menge steht im Feld mit data-sc-amount innerhalb desselben data-sc-item, ein fester Wert in + * data-sc-value. Mit data-sc-confirm fragt der Button vorher nach. + */ + onModuleClick: function(event) { + + var el = event.target; + + if (!el || typeof el.closest !== 'function') return; + + // Label ohne gültiges for (z.B. Bestellbedingungen und Bestellvariablen mancher Themes): Checkbox daneben umschalten + var el_label = el.closest('.sc_modul_dynamic label, .sc_modul_extra label'); + + if (el_label !== null && el.closest('a') === null && el_label.control === null) { + + var el_wrap = el_label.parentElement; + var el_check = ((el_wrap !== null)?el_wrap.querySelector('input[type="checkbox"]'):null); + + if (el_check !== null && !el_label.contains(el_check)) { + + el_check.click(); + + return; + + } + + } + + var el_button = el.closest('.sc_modul_dynamic [data-sc-send]'); + + if (el_button === null) return; + + event.preventDefault(); + + if (this.busy) return; + + // Rückfrage des Moduls, z.B. vor dem Entfernen eines Dokuments + if (el_button.hasAttribute('data-sc-confirm') && !window.confirm(el_button.getAttribute('data-sc-confirm'))) return; + + var value; + + if (el_button.hasAttribute('data-sc-value')) { + + // Fester Wert des Buttons, z.B. der Index eines Dokuments + value = el_button.getAttribute('data-sc-value'); + + } else { + + var el_item = el_button.closest('[data-sc-item]'); + var el_amount = ((el_item !== null)?el_item.querySelector('[data-sc-amount]'):null); + + value = ((el_amount !== null)?parseInt(el_amount.value, 10):1); + + if (isNaN(value) || value < 1) value = 1; + + } + + var extra = {}; + extra[el_button.getAttribute('data-sc-send')] = value; + + // Eine noch ausstehende Änderung geht in derselben Anfrage mit + if (this.timer !== null) { + + window.clearTimeout(this.timer); + this.timer = null; + + } + + this.send('update', extra); + + }, // onModuleClick(event) + + /** + * Enter im Mengenfeld eines Modulblocks löst dessen Button aus, statt die Bestellung abzuschicken + */ + onModuleKeydown: function(event) { + + if (event.key !== 'Enter') return; + + var el = event.target; + + if (!el || typeof el.closest !== 'function' || !el.hasAttribute('data-sc-amount')) return; + + event.preventDefault(); + + var el_item = el.closest('[data-sc-item]'); + var el_button = ((el_item !== null)?el_item.querySelector('[data-sc-send]'):null); + + if (el_button !== null) el_button.click(); + + }, // onModuleKeydown(event) + + /** + * Blockt das Absenden, solange der Server noch rechnet oder eine Änderung noch nicht übertragen wurde + */ + onSubmit: function(event) { + + // Andere Buttons im Formular (z.B. Login der Kundenverwaltung) werden normal abgeschickt + if (event.submitter && event.submitter.name !== 'wpsg_smartcheckout_order') return; + + // Die Bestellung ist bereits unterwegs, ein weiterer Klick darf sie nicht ein zweites Mal abschicken + if (this.submitting) { + + event.preventDefault(); + + return; + + } + + if (this.timer !== null) { + + // Ausstehende Änderung sofort übertragen, der Kunde sieht danach die neue Summe + event.preventDefault(); + + window.clearTimeout(this.timer); + this.timer = null; + this.send('update'); + + return; + + } + + if (this.busy) { + + event.preventDefault(); + + return; + + } + + // Das GARAN-Gewährleistungslabel muss vor dem Bestellabschluss zur Kenntnis genommen werden + if (this.state.warranty && this.state.warranty.popup === true && this.garanConfirmed !== true) { + + event.preventDefault(); + + this.garanSubmit = true; + this.garanPopup = true; + + return; + + } + + // Ab hier wird tatsächlich bestellt: Layer über die Seite, bis der Browser die nächste Seite lädt + this.submitting = true; + + }, // onSubmit(event) + + /** + * Schließt das GARAN-Popup, kam es über den Bestellbutton, wird die Bestellung danach abgeschickt + */ + confirmGaran: function() { + + this.garanConfirmed = true; + this.garanPopup = false; + + if (this.garanSubmit !== true) return; + + this.garanSubmit = false; + + var el_form = document.getElementById('wpsg_smartcheckout_form'); + var el_button = el_form.querySelector('button[name="wpsg_smartcheckout_order"]'); + + // requestSubmit() übermittelt den Bestellbutton mit und prüft die Pflichtfelder erneut + if (typeof el_form.requestSubmit === 'function' && el_button !== null) el_form.requestSubmit(el_button); + else if (el_button !== null) el_button.click(); + + } // confirmGaran() + + } + + }).mount('#wpsg_smartcheckout'); + +})(); diff --git a/views/mailtemplates/html/customer.phtml b/views/mailtemplates/html/customer.phtml index b811ae4..68dba26 100644 --- a/views/mailtemplates/html/customer.phtml +++ b/views/mailtemplates/html/customer.phtml @@ -93,7 +93,7 @@ </tr>
<tr>
<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Straße', 'wpsg'); ?>:</td>
- <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['strasse'].rtrim(($this->view['basket']['checkout']['nr']))); ?></td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['strasse'].rtrim(' '.($this->view['basket']['checkout']['nr']??''))); ?></td>
</tr>
<?php if (trim($this->view['basket']['checkout']['ustidnr']) != "") { ?>
<tr>
diff --git a/views/mailtemplates/html/kundenmail.phtml b/views/mailtemplates/html/kundenmail.phtml index f4e1eff..fd8204f 100644 --- a/views/mailtemplates/html/kundenmail.phtml +++ b/views/mailtemplates/html/kundenmail.phtml @@ -28,9 +28,9 @@ <p><?php echo $this->view['basket']['checkout']['comment'] ?></p>
<?php } ?>
-<p><?php echo __('Wir bedanken uns fuer Ihre Bestellung.', 'wpsg'); ?></p>
-<p><?php echo __('Bitte beachten Sie, dass es sich bei dieser E-Mail um eine Bestellbestaetigung und keine bindende Auftragsbestaetigung handelt. Preisirrtuemer sind leider nicht vollstaendig auszuschliessen.', 'wpsg'); ?></p>
-<p><?php echo wpsg_translate(__('Es gelten unsere <a href="#1#">Allgemeinen Geschaeftsbedingungen</a> (<a href="#1#">AGB</a>).', 'wpsg'), $this->getURL(wpsg_ShopController::URL_AGB)); ?></p>
+<p><?php echo __('Wir bedanken uns für Ihre Bestellung.', 'wpsg'); ?></p>
+<p><?php echo __('Bitte beachten Sie, dass es sich bei dieser E-Mail um eine Bestellbestätigung und keine bindende Auftragsbestätigung handelt. Preisirrtümer sind leider nicht vollständig auszuschließen.', 'wpsg'); ?></p>
+<p><?php echo wpsg_translate(__('Es gelten unsere <a href="#1#">Allgemeinen Geschäftsbedingungen</a> (<a href="#1#">AGB</a>).', 'wpsg'), $this->getURL(wpsg_ShopController::URL_AGB)); ?></p>
<?php $this->CallMods('kundenmail_afteragb', array(&$this->view['basket']['checkout']['o_id'])); ?>
diff --git a/views/mailtemplates/kundenmail.phtml b/views/mailtemplates/kundenmail.phtml index 634dddd..340e2e6 100644 --- a/views/mailtemplates/kundenmail.phtml +++ b/views/mailtemplates/kundenmail.phtml @@ -91,11 +91,11 @@ <?php } ?>
-<?php echo __('Wir bedanken uns fuer Ihre Bestellung.', 'wpsg'); ?>
+<?php echo __('Wir bedanken uns für Ihre Bestellung.', 'wpsg'); ?>
-<?php echo __('Bitte beachten Sie, dass es sich bei dieser E-Mail um eine Bestellbestaetigung und keine bindende Auftragsbestaetigung handelt. Preisirrtuemer sind leider nicht vollstaendig auszuschliessen.', 'wpsg'); ?>
+<?php echo __('Bitte beachten Sie, dass es sich bei dieser E-Mail um eine Bestellbestätigung und keine bindende Auftragsbestätigung handelt. Preisirrtümer sind leider nicht vollständig auszuschließen.', 'wpsg'); ?>
-<?php echo __('Es gelten unsere Allgemeinen Geschaeftsbedingungen (AGB).', 'wpsg'); ?>
+<?php echo __('Es gelten unsere Allgemeinen Geschäftsbedingungen (AGB).', 'wpsg'); ?>
<?php echo $this->getURL(wpsg_ShopController::URL_AGB); ?>
diff --git a/views/mods/mod_abo/index.phtml b/views/mods/mod_abo/index.phtml index ff64ad6..3e8bc85 100644 --- a/views/mods/mod_abo/index.phtml +++ b/views/mods/mod_abo/index.phtml @@ -51,7 +51,7 @@ <select name="filter[cdate_m]" class="form-control input-sm">
<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
<?php for ($i = 1; $i <= 12; $i ++) { ?>
- <option <?php echo ((wpsg_getStr($this->view['arFilter']['cdate_m']) == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); ?></option>
+ <option <?php echo ((wpsg_getStr($this->view['arFilter']['cdate_m']) == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo wpsg_strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); ?></option>
<?php } ?>
</select>
</div>
@@ -72,7 +72,7 @@ <select name="filter[enddate_m]" class="form-control input-sm">
<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
<?php for ($i = 1; $i <= 12; $i ++) { ?>
- <option <?php echo ((wpsg_getStr($this->view['arFilter']['enddate_m']) == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); ?></option>
+ <option <?php echo ((wpsg_getStr($this->view['arFilter']['enddate_m']) == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo wpsg_strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); ?></option>
<?php } ?>
</select>
</div>
diff --git a/views/mods/mod_abo/page_abo.phtml b/views/mods/mod_abo/page_abo.phtml index 79cb1a9..3ab2f98 100644 --- a/views/mods/mod_abo/page_abo.phtml +++ b/views/mods/mod_abo/page_abo.phtml @@ -61,11 +61,11 @@ <?php $exp = $this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id, $oOrderProduct->getId())); ?>
<?php if ($oAbo->getState() === wpsg_abo::STATE_RUNNING) { ?>
- <span class="duration_running"><?php echo $exp; ?></span>
+ <span class="duration_running"><?php echo ((strtotime((string)$exp) !== false)?wpsg_formatTimestamp(strtotime($exp)):$exp); ?></span>
<?php } else if ($oAbo->getState() === wpsg_abo::STATE_INEXTENSION) { ?>
- <span class="duration_inextension"><?php echo $exp; ?></span>
+ <span class="duration_inextension"><?php echo ((strtotime((string)$exp) !== false)?wpsg_formatTimestamp(strtotime($exp)):$exp); ?></span>
<?php } else if ($oAbo->getState() === wpsg_abo::STATE_EXTEND) { ?>
- <span class="duration_expired"><?php echo $exp; ?></span>
+ <span class="duration_expired"><?php echo ((strtotime((string)$exp) !== false)?wpsg_formatTimestamp(strtotime($exp)):$exp); ?></span>
<?php } ?>
</span>
@@ -162,11 +162,11 @@ <?php $exp = $this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id, $oOrderProduct->getId())); ?>
<?php if ($oAbo->getState() === wpsg_abo::STATE_RUNNING) { ?>
- <span class="duration_running"><?php echo $exp; ?></span>
+ <span class="duration_running"><?php echo ((strtotime((string)$exp) !== false)?wpsg_formatTimestamp(strtotime($exp)):$exp); ?></span>
<?php } else if ($oAbo->getState() === wpsg_abo::STATE_INEXTENSION) { ?>
- <span class="duration_inextension"><?php echo $exp; ?></span>
+ <span class="duration_inextension"><?php echo ((strtotime((string)$exp) !== false)?wpsg_formatTimestamp(strtotime($exp)):$exp); ?></span>
<?php } else if ($oAbo->getState() === wpsg_abo::STATE_EXTEND) { ?>
- <span class="duration_expired"><?php echo $exp; ?></span>
+ <span class="duration_expired"><?php echo ((strtotime((string)$exp) !== false)?wpsg_formatTimestamp(strtotime($exp)):$exp); ?></span>
<?php } ?>
</span>
@@ -208,7 +208,7 @@ <?php } // foreach Order ?>
</div>
- <?php } else { ?>
+ <?php } else { ?>
<p><?php echo __('Bisher kein(e) Abonnement(s) vorhanden.', 'wpsg'); ?></p>
diff --git a/views/mods/mod_amazon/settings_edit.phtml b/views/mods/mod_amazon/settings_edit.phtml index 7b0d95a..827c68f 100644 --- a/views/mods/mod_amazon/settings_edit.phtml +++ b/views/mods/mod_amazon/settings_edit.phtml @@ -25,7 +25,6 @@ <?php echo wpsg_drawForm_Input('wpsg_mod_amazon_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_amazon_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_amazon_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_amazon_mwst'), array('help' => 'wpsg_mod_amazon_mwst')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_amazon_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_amazon_mwstland'), array('help' => 'wpsg_mod_amazon_mwstland')); ?>
<br />
diff --git a/views/mods/mod_amazon_v2/order_done.phtml b/views/mods/mod_amazon_v2/order_done.phtml index cec5247..ba16642 100644 --- a/views/mods/mod_amazon_v2/order_done.phtml +++ b/views/mods/mod_amazon_v2/order_done.phtml @@ -45,24 +45,10 @@ <p><?php echo __('Zahlen Sie Ihre Bestellung jetzt mit AmazonPay, indem sie auf folgenden Button klicken.', 'wpsg'); ?></p>
- <?php if ($this->get_option('wpsg_mod_paypal_autostart') == '1') { ?>
-
- <script>
-
- jQuery(document).ready(function() {
- window.setTimeout(function() {
- location.href = "<?php echo $this->view['payURL']; ?>";
- }, 1000);
- } );
-
- </script>
-
- <?php } else { ?>
<a href="<?php echo $view['payURL']; ?>" title="<?php echo __('Jetzt mit AmazonPay bezahlen', 'wpsg'); ?>">
<img src="<?php echo $this->getRessourceURL('mods/mod_amazon_v2/gfx/logo_100x25.png'); ?>" alt="<?php echo __('Jetzt mit AmazonPay bezahlen', 'wpsg'); ?>" />
</a>
- <?php } ?>
<?php } ?>
diff --git a/views/mods/mod_amazon_v2/settings_edit.phtml b/views/mods/mod_amazon_v2/settings_edit.phtml index 16a6dcd..da9b3a6 100644 --- a/views/mods/mod_amazon_v2/settings_edit.phtml +++ b/views/mods/mod_amazon_v2/settings_edit.phtml @@ -8,7 +8,7 @@ <?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_seller_id', __('Händler-ID', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_seller_id'), array('help' => 'wpsg_mod_amazon_v2_seller_id')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_store_id', __('Store ID', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_store_id'), []); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_public_key_id', __('ID des öffentlichen Schlüsels / Public Key ID', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_public_key_id'), []); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_public_key_id', __('ID des öffentlichen Schlüssels / Public Key ID', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_public_key_id'), []); ?>
<?php echo wpsg_drawForm_Upload('wpsg_mod_amazon_v2_private_key', __('Privater Schlüssel (.pem Datei)', 'wpsg')); ?>
<br />
@@ -44,5 +44,4 @@ <?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_amazon_v2_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_amazon_v2_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_amazon_v2_mwst'), array('help' => 'wpsg_mod_amazon_v2_mwst')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_amazon_v2_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_mwstland'), array('help' => 'wpsg_mod_amazon_v2_mwstland')); ?>
diff --git a/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung.phtml b/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung.phtml index 41f5d67..486d43a 100644 --- a/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung.phtml +++ b/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung.phtml @@ -130,9 +130,9 @@ <?php $this->callMods('mail_aftercalculation', array(&$this->view['order']['id'])); ?>
-<?php echo __('Wir bedanken uns fuer Ihre Bestellung.', 'wpsg'); ?>
+<?php echo __('Wir bedanken uns für Ihre Bestellung.', 'wpsg'); ?>
-<?php echo __('Es gelten unsere Allgemeinen Geschaeftsbedingungen (AGB).', 'wpsg'); ?>
+<?php echo __('Es gelten unsere Allgemeinen Geschäftsbedingungen (AGB).', 'wpsg'); ?>
<?php echo $this->getURL(wpsg_ShopController::URL_AGB); ?>
diff --git a/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung_html.phtml b/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung_html.phtml index c36f4a2..5983aec 100644 --- a/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung_html.phtml +++ b/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung_html.phtml @@ -30,9 +30,9 @@ <br />
-<p><?php echo __('Wir bedanken uns fuer Ihre Bestellung.', 'wpsg'); ?></p>
+<p><?php echo __('Wir bedanken uns für Ihre Bestellung.', 'wpsg'); ?></p>
-<p><?php echo wpsg_translate(__('Es gelten unsere <a href="#1#">Allgemeinen Geschaeftsbedingungen</a> (<a href="#1#">AGB</a>).', 'wpsg'), $this->getURL(wpsg_ShopController::URL_AGB)); ?></p>
+<p><?php echo wpsg_translate(__('Es gelten unsere <a href="#1#">Allgemeinen Geschäftsbedingungen</a> (<a href="#1#">AGB</a>).', 'wpsg'), $this->getURL(wpsg_ShopController::URL_AGB)); ?></p>
<h3><?php echo __("Widerrufsbelehrung", "wpsg"); ?></h3>
diff --git a/views/mods/mod_auftragsbestaetigung/order_view.phtml b/views/mods/mod_auftragsbestaetigung/order_view.phtml index 32fd8f6..c792085 100644 --- a/views/mods/mod_auftragsbestaetigung/order_view.phtml +++ b/views/mods/mod_auftragsbestaetigung/order_view.phtml @@ -34,7 +34,7 @@ <p>
<?php echo __('Die Auftragsbestätigung bestätigt dem Kunden die erfolgreiche Erfassung des Auftrages. Abweichungen vom Auftrag können mittels des Textfeldes mitgesendet werden.', 'wpsg'); ?>
- <?php echo __('Der Status ändert sich automatisch auf "Bestätigt".', 'wpsg'); ?>
+ <?php echo __('Der Status ändert sich automatisch auf "Auftrag akzeptiert".', 'wpsg'); ?>
</p>
<br />
diff --git a/views/mods/mod_autodebit/settings_edit.phtml b/views/mods/mod_autodebit/settings_edit.phtml index 2906dc3..7acf981 100644 --- a/views/mods/mod_autodebit/settings_edit.phtml +++ b/views/mods/mod_autodebit/settings_edit.phtml @@ -12,7 +12,6 @@ <br />
<?php echo wpsg_drawForm_Input('wpsg_mod_autodebit_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_autodebit_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_autodebit_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_autodebit_mwst')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_autodebit_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_autodebit_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_autodebit_iban', __('IBAN/BIC statt Kontonummer/BLZ verwenden', 'wpsg'), $this->get_option('wpsg_mod_autodebit_iban'), array('help' => 'wpsg_mod_autodebit_iban')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_autodebit_bic', __('BIC validieren', 'wpsg'), $this->get_option('wpsg_mod_autodebit_bic'), array('help' => 'wpsg_mod_autodebit_bic')); ?>
<?php // echo wpsg_drawForm_Button('wpsg_mod_autodebit_ibanbicconvert2', __('BIC/IBAN Konvertierung', 'wpsg'), array('button_text' => __('BIC/IBAN Konvertieren', 'wpsg'), 'button_class' => 'wpsg_mod_autodebit_button', 'button_onclick' => 'if (!confirm(\''.wpsg_hspc(__('Es werden die Bankdaten von allen Bestellungen mit Bankeinzug in BIC/IBAN konvertiert, sofern noch nicht angegeben. Die Länderkürzel müssen den IBAN Länderkürzeln entsprechen.', 'wpsg')).'\')) return false; location.href=\''.WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_autodebit&wpsg_mod_autodebit_bicibanconverter=1&mail=0&noheader=1\'')); ?>
diff --git a/views/mods/mod_basketteaser/produkt_addedit_sidebar.phtml b/views/mods/mod_basketteaser/produkt_addedit_sidebar.phtml index 795bbba..d10b900 100644 --- a/views/mods/mod_basketteaser/produkt_addedit_sidebar.phtml +++ b/views/mods/mod_basketteaser/produkt_addedit_sidebar.phtml @@ -13,8 +13,8 @@ </h3>
</div>
<div class="panel-body">
- <?php echo wpsg_drawForm_Input('mod_basketteaser_from', __('Von', 'wpsg'), wpsg_fromDate($this->view['data']['mod_basketteaser_from']), array('datepicker' => true)); ?>
- <?php echo wpsg_drawForm_Input('mod_basketteaser_to', __('Bis', 'wpsg'), wpsg_fromDate($this->view['data']['mod_basketteaser_to']), array('datepicker' => true)); ?>
+ <?php echo wpsg_drawForm_Input('mod_basketteaser_from', __('Von', 'wpsg'), wpsg_fromDate(($this->view['data']['mod_basketteaser_from'] ?? '')), array('datepicker' => true)); ?>
+ <?php echo wpsg_drawForm_Input('mod_basketteaser_to', __('Bis', 'wpsg'), wpsg_fromDate(($this->view['data']['mod_basketteaser_to'] ?? '')), array('datepicker' => true)); ?>
<br /><br />
diff --git a/views/mods/mod_campaigns/campaign_addedit.phtml b/views/mods/mod_campaigns/campaign_addedit.phtml index 69d6fb2..179208f 100644 --- a/views/mods/mod_campaigns/campaign_addedit.phtml +++ b/views/mods/mod_campaigns/campaign_addedit.phtml @@ -139,11 +139,12 @@ <?php - function wpng_tiny_mce_before_init($in) + // wpNewsletterGermany deklariert dieselbe Funktion + if (!function_exists('wpng_tiny_mce_before_init')) { function wpng_tiny_mce_before_init($in) { $in['readonly'] = true; return $in; - } + } } function wpng_ShowTinyMCE() { diff --git a/views/mods/mod_coverletter/coverletter_pdf.phtml b/views/mods/mod_coverletter/coverletter_pdf.phtml index f81eb5c..21b9511 100644 --- a/views/mods/mod_coverletter/coverletter_pdf.phtml +++ b/views/mods/mod_coverletter/coverletter_pdf.phtml @@ -39,12 +39,7 @@ $wPix = (25.4 * $width) / 96;
$hPix = (25.4 * $height) / 96;
- $transparency = str_replace("%", "", $shop->get_option('wpsg_mod_coverletter_logo_transparency'));
- if($transparency !== "100") $transparency = str_replace(array("0", "00"), "", $transparency);
-
- $alpha = 1;
- if (wpsg_isSizedString($transparency) && $transparency !== "100") $alpha = "0.$transparency";
- if (wpsg_isSizedString($transparency) && $transparency === "100") $alpha = $transparency;
+ $alpha = wpsg_logo_alpha($shop->get_option('wpsg_mod_coverletter_logo_transparency'));
/*
$logo_pos = $shop->get_option('wpsg_mod_coverletter_logo_position');
diff --git a/views/mods/mod_coverletter/settings_edit.phtml b/views/mods/mod_coverletter/settings_edit.phtml index f593b2f..400f7a7 100644 --- a/views/mods/mod_coverletter/settings_edit.phtml +++ b/views/mods/mod_coverletter/settings_edit.phtml @@ -52,7 +52,7 @@ <?php $alignCenter = $logo_pos === 'center' ? "align-buttons-active" : ""; ?>
<?php $alignRight = $logo_pos === 'right' ? "align-buttons-active" : ""; ?>
- <?php $logo_transparency = $this->get_option("wpsg_mod_coverletter_logo_transparency") ?: "0%"; ?>
+ <?php $logo_transparency = $this->get_option("wpsg_mod_coverletter_logo_transparency") ?: "100%"; ?>
<?php $strSuffix = ''; if ($this->view['wpsg_mod_coverletter']['logo'] !== false) { $strSuffix = '
<div class="row"><br />
diff --git a/views/mods/mod_creditcard/order_view_afterpayment.phtml b/views/mods/mod_creditcard/order_view_afterpayment.phtml index 5670764..168f567 100644 --- a/views/mods/mod_creditcard/order_view_afterpayment.phtml +++ b/views/mods/mod_creditcard/order_view_afterpayment.phtml @@ -9,6 +9,6 @@ <?php echo wpsg_drawForm_Input('', __('Typ der Kreditkarte', 'wpsg'), $this->view['wpsg_mod_creditcard']['typ'], array('text' => true, 'clear_after' => true, 'readonly' => true)); ?>
<?php echo wpsg_drawForm_Input('', __('Inhaber der Kreditkarte', 'wpsg'), $this->view['wpsg_mod_creditcard']['inhaber'], array('text' => true, 'clear_after' => true, 'readonly' => true)); ?>
<?php echo wpsg_drawForm_Input('', __('Kreditkarten-Nummer', 'wpsg'), $this->view['wpsg_mod_creditcard']['knr'], array('text' => true, 'clear_after' => true, 'readonly' => true)); ?>
-<?php echo wpsg_drawForm_Input('', __('Prüfziffer', 'wpsg'), $this->view['wpsg_mod_creditcard']['pruefz'], array('text' => true, 'clear_after' => true, 'readonly' => true)); ?>
+<?php echo wpsg_drawForm_Input('', __('Prüfziffer', 'wpsg'), (($this->view['wpsg_mod_creditcard']['pruefz'] !== '')?$this->view['wpsg_mod_creditcard']['pruefz']:__('gelöscht', 'wpsg')), array('text' => true, 'clear_after' => true, 'readonly' => true)); ?>
<?php echo wpsg_drawForm_Input('', __('Gültig bis', 'wpsg'), $this->view['wpsg_mod_creditcard']['gueltigm'].'/'.$this->view['wpsg_mod_creditcard']['gueltigj'], array('text' => true, 'clear_after' => true, 'readonly' => true)); ?>
diff --git a/views/mods/mod_creditcard/paymenthint.phtml b/views/mods/mod_creditcard/paymenthint.phtml index b13e45f..4542906 100644 --- a/views/mods/mod_creditcard/paymenthint.phtml +++ b/views/mods/mod_creditcard/paymenthint.phtml @@ -28,7 +28,7 @@ <div class="wpsg_mod_creditcard_inhaber wpsg_mod_creditcard_field">
<label>
<?php echo __('Inhaber', 'wpsg'); ?><span class="wpsg_required">*</span>:
- <input class="<?php echo ((in_array("mod_creditcard_inhaber", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_creditcard[inhaber]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['inhaber']); ?>" />
+ <input class="<?php echo ((in_array("mod_creditcard_inhaber", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" autocomplete="cc-name" name="wpsg_mod_creditcard[inhaber]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['inhaber']); ?>" />
</label>
</div>
<div class="wpsg_clear"></div>
@@ -36,7 +36,7 @@ <div class="wpsg_mod_creditcard_knr wpsg_mod_creditcard_field">
<label>
<?php echo __('Kartennummer', 'wpsg'); ?><span class="wpsg_required">*</span>:
- <input class="<?php echo ((in_array("mod_creditcard_knr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_mod_creditcard_knr" name="wpsg_mod_creditcard[knr]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['knr']); ?>" />
+ <input class="<?php echo ((in_array("mod_creditcard_knr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" inputmode="numeric" autocomplete="cc-number" maxlength="23" id="wpsg_mod_creditcard_knr" name="wpsg_mod_creditcard[knr]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['knr']); ?>" />
</label>
</div>
<div class="wpsg_clear"></div>
@@ -44,7 +44,7 @@ <div class="wpsg_mod_creditcard_knr wpsg_mod_creditcard_field">
<label>
<?php echo __('Prüfziffer', 'wpsg'); ?><span class="wpsg_required">*</span>:
- <input class="<?php echo ((in_array("mod_creditcard_pruefz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_creditcard[pruefz]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['pruefz']); ?>" />
+ <input class="<?php echo ((in_array("mod_creditcard_pruefz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" inputmode="numeric" autocomplete="cc-csc" maxlength="3" name="wpsg_mod_creditcard[pruefz]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['pruefz']); ?>" />
</label>
</div>
<div class="wpsg_clear"></div>
@@ -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_creditcard/settings_edit.phtml b/views/mods/mod_creditcard/settings_edit.phtml index 94a7ba6..82ebeea 100644 --- a/views/mods/mod_creditcard/settings_edit.phtml +++ b/views/mods/mod_creditcard/settings_edit.phtml @@ -12,5 +12,4 @@ <br />
<?php echo wpsg_drawForm_Input('wpsg_mod_creditcard_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_creditcard_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_creditcard_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_creditcard_mwst')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_creditcard_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_creditcard_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_creditcard_schluessel', __('AES-256 Passwort', 'wpsg'), $this->get_option('wpsg_mod_creditcard_schluessel'), array('help' => 'wpsg_mod_creditcard_schluessel')); ?>
diff --git a/views/mods/mod_customerbudget/basket_row_end.phtml b/views/mods/mod_customerbudget/basket_row_end.phtml new file mode 100644 index 0000000..30d8a46 --- /dev/null +++ b/views/mods/mod_customerbudget/basket_row_end.phtml @@ -0,0 +1,28 @@ +<?php
+
+ /**
+ * Hinweis auf das Kundenbudget im Warenkorb
+ *
+ * Wird über den Hook basket_row_end innerhalb des Summenblocks ausgegeben, also
+ * direkt unter der Auswahl der Zahlungsart - dort kann der Kunde sofort reagieren.
+ */
+
+ $budget = $this->view['mod_customerbudget']['budget_formatted'];
+ $selected = $this->view['mod_customerbudget']['selected'];
+ $sufficient = $this->view['mod_customerbudget']['sufficient'];
+
+?>
+<div class="basket_sum_row wpsg_customerbudget_row">
+ <div class="title2">
+ <?php echo __('Verbleibendes Budget', 'wpsg'); ?>:
+ </div>
+ <div class="value">
+ <?php echo wpsg_hspc($budget); ?>
+ </div>
+</div>
+<?php if ($selected && !$sufficient) { ?>
+<div class="basket_sum_row wpsg_customerbudget_row">
+ <p class="wpsg_customerbudget_error"><?php echo __('Ihr Budget reicht für diese Bestellung leider nicht aus. Bitte laden Sie Ihr Budget auf oder wählen Sie eine andere Zahlungsart.', 'wpsg'); ?></p>
+</div>
+<?php } ?>
+<div class="wpsg_spacer"></div>
diff --git a/views/mods/mod_customerbudget/checkout_payment.phtml b/views/mods/mod_customerbudget/checkout_payment.phtml new file mode 100644 index 0000000..fa43f40 --- /dev/null +++ b/views/mods/mod_customerbudget/checkout_payment.phtml @@ -0,0 +1,16 @@ +<?php
+
+ /**
+ * Guthaben innerhalb der Zahlungsart "Kundenbudget" in der Kasse
+ */
+
+ $budget = $this->view['mod_customerbudget']['budget_formatted'];
+ $sufficient = $this->view['mod_customerbudget']['sufficient'];
+
+?>
+<div class="shippay_hint wpsg_customerbudget_hint">
+ <?php echo __('Verbleibendes Budget', 'wpsg'); ?>: <?php echo wpsg_hspc($budget); ?>
+ <?php if (!$sufficient) { ?>
+ <p class="shippay_error"><?php echo __('Ihr Budget reicht für diese Bestellung nicht aus!', 'wpsg'); ?></p>
+ <?php } ?>
+</div>
diff --git a/views/mods/mod_customerbudget/customer_sidebar.phtml b/views/mods/mod_customerbudget/customer_sidebar.phtml index b2ef044..b4f0f7f 100644 --- a/views/mods/mod_customerbudget/customer_sidebar.phtml +++ b/views/mods/mod_customerbudget/customer_sidebar.phtml @@ -5,12 +5,6 @@ */
?>
-<div id="wpsg_customercustomerbudget" class="postbox">
- <h3 class="wpsg_handlediv">
- <span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></span>
- <span><?php echo __('Kundenbudget', 'wpsg'); ?></span>
- </h3>
- <div class="inside">
- <?php echo wpsg_drawForm_Input('wpsg_mod_customerbudget_budget', __('Budget', 'wpsg'), $this->view['mod_customerbudget']['budget']); ?>
- </div>
-</div>
\ No newline at end of file +<?php echo wpsg_drawForm_AdminboxStart(__('Kundenbudget', 'wpsg')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_customerbudget_budget', __('Budget', 'wpsg'), $this->view['mod_customerbudget']['budget']); ?>
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
\ No newline at end of file diff --git a/views/mods/mod_customerbudget/produkt_edit_sidebar.phtml b/views/mods/mod_customerbudget/produkt_edit_sidebar.phtml new file mode 100644 index 0000000..32851c8 --- /dev/null +++ b/views/mods/mod_customerbudget/produkt_edit_sidebar.phtml @@ -0,0 +1,26 @@ +<?php
+
+ /**
+ * Template für die Kennzeichnung eines Produkts als Aufladeprodukt innerhalb
+ * der Produktverwaltung
+ */
+
+?>
+<div id="wpsg_customerbudget" class="panel panel-default">
+ <div class="panel-heading clearfix">
+ <h3 class="panel-title">
+ <?php echo __('Kundenbudget', 'wpsg'); ?>
+ </h3>
+ </div>
+ <div class="panel-body">
+
+ <input type="hidden" name="wpsg_mod_customerbudget_form" value="1" />
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_customerbudget_topup', __('Produkt lädt das Kundenbudget auf', 'wpsg'), wpsg_getStr($this->view['data']['wpsg_mod_customerbudget_topup'])); ?>
+
+ <p class="description">
+ <?php echo __('Sobald eine Bestellung mit diesem Produkt den Status "Zahlung akzeptiert" erhält, wird der Bruttopreis dem Guthaben des Kunden gutgeschrieben. Das Produkt sollte auf dem Steuerschlüssel "Nullsatz" stehen, damit nicht die Aufladung und der spätere Kauf besteuert werden.', 'wpsg'); ?>
+ </p>
+
+ </div>
+</div>
diff --git a/views/mods/mod_customerbudget/profil_budget.phtml b/views/mods/mod_customerbudget/profil_budget.phtml new file mode 100644 index 0000000..6439c1d --- /dev/null +++ b/views/mods/mod_customerbudget/profil_budget.phtml @@ -0,0 +1,18 @@ +<?php
+
+ /**
+ * Template für die Anzeige des Kundenbudgets im Kundenkonto
+ */
+
+ $budget = $this->view['mod_customerbudget']['budget_formatted'];
+
+?>
+<div class="wpsg wpsg_customerbudget">
+
+ <h2><?php echo wpsg_hspc($this->get_option('wpsg_mod_customerbudget_name')); ?></h2>
+
+ <div class="wpsg_customerbudget_amount">
+ <?php echo wpsg_translate(__('Ihr aktuelles Guthaben: #1#', 'wpsg'), '<strong>'.wpsg_hspc($budget).'</strong>'); ?>
+ </div>
+
+</div>
diff --git a/views/mods/mod_customerbudget/settings_edit.phtml b/views/mods/mod_customerbudget/settings_edit.phtml index 966faac..952fd1c 100644 --- a/views/mods/mod_customerbudget/settings_edit.phtml +++ b/views/mods/mod_customerbudget/settings_edit.phtml @@ -6,4 +6,7 @@ ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_customerbudget_name', __('Bezeichnung der Zahlungsart', 'wpsg'), $this->get_option('wpsg_mod_customerbudget_name'), array('help' => 'wpsg_mod_customerbudget_name')); ?>
-<?php echo wpsg_drawForm_Textarea('wpsg_mod_customerbudget_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_customerbudget_hint'), array('help' => 'wpsg_mod_customerbudget_hint')); ?>
\ No newline at end of file +<?php echo wpsg_drawForm_Textarea('wpsg_mod_customerbudget_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_customerbudget_hint'), array('help' => 'wpsg_mod_customerbudget_hint')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_customerbudget_status', __('Status nach Kauf', 'wpsg'), $this->view['mod_customerbudget']['arStatus'], $this->view['mod_customerbudget']['status'], array('hint' => __('Bestellstatus, der gesetzt wird, sobald eine Bestellung mit dem Kundenbudget bezahlt wurde. Die Zahlung ist mit der Abbuchung abgeschlossen, ohne diesen Statuswechsel lösen weder die Downloadmodule noch die Kampagnen aus.', 'wpsg'))); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_customerbudget_inform', __('Kunden über den Statuswechsel informieren', 'wpsg'), $this->view['mod_customerbudget']['inform'], array('hint' => __('Muss aktiv sein, damit das Modul "Downloadprodukte" die Dateien freigibt. Der Kunde erhält dadurch zusätzlich zur Bestellbestätigung eine Statusmail.', 'wpsg'))); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_customerbudget_storno', __('Guthaben bei Stornierung zurückbuchen', 'wpsg'), $this->view['mod_customerbudget']['storno'], array('hint' => __('Bucht bei einer Stornierung sowohl eine Zahlung mit dem Kundenbudget als auch eine Aufladung wieder zurück.', 'wpsg'))); ?>
diff --git a/views/mods/mod_customergroup/index.phtml b/views/mods/mod_customergroup/index.phtml index 7c00fce..51167a1 100644 --- a/views/mods/mod_customergroup/index.phtml +++ b/views/mods/mod_customergroup/index.phtml @@ -75,8 +75,8 @@ <thead>
<tr>
<th class="wpsg_order manage-column col-name" data-order="name"><?php echo __('Name', 'wpsg'); ?></th>
- <th class="wpsg_order col-price" data-order="customercount"><?php echo __("Preisanzeige", 'wpsg'); ?></th>
- <th class="wpsg_order col_customer" data-order="calculation"><?php echo __("Kunden", 'wpsg'); ?></th>
+ <th class="wpsg_order col-price" data-order="calculation"><?php echo __("Preisanzeige", 'wpsg'); ?></th>
+ <th class="wpsg_order col_customer" data-order="customercount"><?php echo __("Kunden", 'wpsg'); ?></th>
</tr>
</thead>
<tbody>
diff --git a/views/mods/mod_debitpayment/settings_edit.phtml b/views/mods/mod_debitpayment/settings_edit.phtml index 65af1bc..1c3d706 100644 --- a/views/mods/mod_debitpayment/settings_edit.phtml +++ b/views/mods/mod_debitpayment/settings_edit.phtml @@ -12,4 +12,3 @@ <br />
<?php echo wpsg_drawForm_Input('wpsg_mod_debitpayment_rabgeb', __('Rabatt/Gebühr', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_debitpayment_rabgeb'), true), array('help' => 'wpsg_mod_debitpayment_rabgeb', 'unit' => $this->get_option('wpsg_currency').' / %')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_debitpayment_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_debitpayment_mwst'), array('help' => 'wpsg_mod_debitpayment_mwst')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_debitpayment_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_debitpayment_mwstland'), array('help' => 'wpsg_mod_debitpayment_mwstland')); ?>
\ No newline at end of file diff --git a/views/mods/mod_deliverynote/deliverynote_pdf.phtml b/views/mods/mod_deliverynote/deliverynote_pdf.phtml index 876f0fe..e08f0c8 100644 --- a/views/mods/mod_deliverynote/deliverynote_pdf.phtml +++ b/views/mods/mod_deliverynote/deliverynote_pdf.phtml @@ -53,12 +53,7 @@ $abscissa = $rightPos;
$ordinate = 0;
- $transparency = str_replace("%", "", $shop->get_option('wpsg_mod_deliverynote_logo_transparency'));
- if($transparency !== "100") $transparency = str_replace(array("0", "00"), "", $transparency);
-
- $alpha = 1;
- if(!is_null($transparency) && $transparency !== "100") $alpha = "0.$transparency";
- if(!is_null($transparency) && $transparency === "100") $alpha = $transparency;
+ $alpha = wpsg_logo_alpha($shop->get_option('wpsg_mod_deliverynote_logo_transparency'));
$logo_pos = $shop->get_option('wpsg_mod_deliverynote_logo_position');
@@ -258,7 +253,7 @@ if ($this->hasMod('wpsg_mod_productvars') && $this->get_option("wpsg_mod_rechnungen_showpv") == "1")
{
- $arPV = $this->callMod('wpsg_mod_productvars', 'getAllProductVarValues', array($this->view['data']['id'], $p['productkey']));
+ $arPV = $this->callMod('wpsg_mod_productvars', 'getAllProductVarValues', array($this->view['order']['id'], $p['product_index']));
if (wpsg_isSizedArray($arPV))
{
@@ -322,7 +317,7 @@ /**
* Produktattribute ?
*/
- if ($this->get_option('wpsg_rechnungen_produktattribute') == '1')
+ if ($this->get_option('wpsg_mod_deliverynote_produktattribute') == '1')
{
$attributeInfo = $this->callMod('wpsg_mod_produktattribute', 'getProductAttributeByProductId', array($this->getProduktId($p['id'])));
diff --git a/views/mods/mod_deliverynote/settings_edit.phtml b/views/mods/mod_deliverynote/settings_edit.phtml index 0331c8f..c4e6ff0 100644 --- a/views/mods/mod_deliverynote/settings_edit.phtml +++ b/views/mods/mod_deliverynote/settings_edit.phtml @@ -55,9 +55,9 @@ <?php $alignCenter = $logo_pos === 'center' ? "align-buttons-active" : ""; ?>
<?php $alignRight = $logo_pos === 'right' ? "align-buttons-active" : ""; ?>
- <?php $logo_transparency = $this->get_option("wpsg_mod_deliverynote_logo_transparency") ?: "0%"; ?>
+ <?php $logo_transparency = $this->get_option("wpsg_mod_deliverynote_logo_transparency") ?: "100%"; ?>
- <?php $strSuffix = ''; if (@$this->view['logo'] !== false) { $strSuffix = '
+ <?php $strSuffix = ''; if (($this->view['wpsg_mod_deliverynote']['logo'] ?? false) !== false) { $strSuffix = '
<div class="row">
<div class="col-md-4">
<div class="align-buttons">
@@ -163,7 +163,7 @@ <div class="info">
<p>
- <?php echo __('Hier können Sie Texte vordefinieren, die sie unter den Lieferschein setzen können.', 'wpsg'); ?>
+ <?php echo __('Hier können Sie Texte vordefinieren, die Sie unter den Lieferschein setzen können.', 'wpsg'); ?>
</p>
</div>
diff --git a/views/mods/mod_deliverytime/product_bottom.phtml b/views/mods/mod_deliverytime/product_bottom.phtml index 3412e52..a1a7c91 100755 --- a/views/mods/mod_deliverytime/product_bottom.phtml +++ b/views/mods/mod_deliverytime/product_bottom.phtml @@ -20,15 +20,15 @@ <div class="wpsg_mod_deliverytime wpsg_mod_deliverytime_product_bottom"> <span class="fa fa-calendar-minus-o"></span> - <span class="label label_deliverytime_product">Verfügbarkeit: </span> - <span class="label_deliverytime"><?php echo __('sofort Verfügbar', 'wpsg') ;?></span> + <span class="label label_deliverytime_product"><?php echo __('Verfügbarkeit:', 'wpsg'); ?> </span> + <span class="label_deliverytime"><?php echo __('sofort verfügbar', 'wpsg') ;?></span> </div> <?php } else { ?> <div class="wpsg_mod_deliverytime wpsg_mod_deliverytime_product_bottom"> <span class="fa fa-calendar-minus-o"></span> - <span class="label label_deliverytime_product">Verfügbarkeit: </span> + <span class="label label_deliverytime_product"><?php echo __('Verfügbarkeit:', 'wpsg'); ?> </span> <span class="label_deliverytime"><?php echo wpsg_translate(__('Lieferbar in #1# Tagen', 'wpsg'), $days_between); ?></span> </div> diff --git a/views/mods/mod_deliverytime/produkt_addedit_allgemein.phtml b/views/mods/mod_deliverytime/produkt_addedit_allgemein.phtml index b25033e..f761c55 100644 --- a/views/mods/mod_deliverytime/produkt_addedit_allgemein.phtml +++ b/views/mods/mod_deliverytime/produkt_addedit_allgemein.phtml @@ -8,18 +8,18 @@ <?php echo wpsg_drawForm_AdminboxStart(__('Lieferzeit', 'wpsg')); ?>
- <?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime[wpsg_mod_deliverytime_source]', __('Lieferzeit anzeigen von', 'wpsg'), array(0 => 'Moduleinstellungen', 1 => 'Produkt'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_source'], array('noIndex' => true, 'help' => 'wpsg_mod_deliverytime_source')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime[wpsg_mod_deliverytime_source]', __('Lieferzeit anzeigen von', 'wpsg'), array(0 => 'Moduleinstellungen', 1 => 'Produkt'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_source'], array('help' => 'wpsg_mod_deliverytime_source')); ?>
<div class="wpsg_mod_deliverytime_show">
<?php if ($this->get_option('wpsg_mod_deliverytime_mode') == wpsg_mod_deliverytime::MODE_SELECT) { ?>
- <?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime[wpsg_mod_deliverytime_deliverytime]', __('Lieferzeit', 'wpsg'), $this->view['wpsg_mod_deliverytime']['arSelection'], $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_deliverytime'], array('noIndex' => true, 'help' => 'wpsg_mod_deliverytime_select')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime[wpsg_mod_deliverytime_deliverytime]', __('Lieferzeit', 'wpsg'), $this->view['wpsg_mod_deliverytime']['arSelection'], $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_deliverytime'], array('help' => 'wpsg_mod_deliverytime_select')); ?>
<?php } else if ($this->get_option('wpsg_mod_deliverytime_mode') == wpsg_mod_deliverytime::MODE_DAYS) { ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_deliverytime[wpsg_mod_deliverytime_deliverytime]', __('Lieferzeit', 'wpsg'), wpsg_getStr($this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_deliverytime']), array('unit' => __('Tage', 'wpsg'), 'help' => 'wpsg_mod_deliverytime_input')); ?>
<?php } ?>
</div>
<?php if (isset($this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_storeproduct'])) {?>
- <?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime[wpsg_mod_deliverytime_storeproduct]', __('Als Offlineprodukt anzeigen', 'wpsg'), array(0 => 'Moduleinstellungen', 1 => 'Offlineprodukt', 2 => 'Onlineprodukt'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_storeproduct'], array('noIndex' => true, 'help' => 'wpsg_mod_deliverytime_store')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime[wpsg_mod_deliverytime_storeproduct]', __('Als Offlineprodukt anzeigen', 'wpsg'), array(0 => 'Moduleinstellungen', 1 => 'Offlineprodukt', 2 => 'Onlineprodukt'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_storeproduct'], array('help' => 'wpsg_mod_deliverytime_store')); ?>
<div class="wpsg_mod_deliverytime_store wpsg_mod_deliverytime_store_1">
<?php echo wpsg_drawForm_Input('wpsg_mod_deliverytime[wpsg_mod_deliverytime_storetext]', __('Hinweistext', 'wpsg'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_storetext'], array('help' => 'wpsg_mod_deliverytime_storetext')); ?>
@@ -36,7 +36,7 @@ <?php /* Verzögerung */ ?>
<?php if ($this->hasMod('wpsg_mod_deliverytime') && ($this->get_option('wpsg_mod_deliverytime_delay') == '1')) { ?>
- <?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime[wpsg_mod_deliverytime_delay]', __('Hinweistext bei Verzögerungen anzeigen', 'wpsg'), array(0 => 'Moduleinstellungen', 1 => 'Anzeigen', 2 => 'Nicht anzeigen'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_delay'], array('noIndex' => true, 'help' => 'wpsg_mod_deliverytime_delay')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime[wpsg_mod_deliverytime_delay]', __('Hinweistext bei Verzögerungen anzeigen', 'wpsg'), array(0 => 'Moduleinstellungen', 1 => 'Anzeigen', 2 => 'Nicht anzeigen'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_delay'], array('help' => 'wpsg_mod_deliverytime_delay')); ?>
<div class="wpsg_mod_deliverytime_delay_activ" style="display:none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_deliverytime[wpsg_mod_deliverytime_delaytext]', __('Grund für verzögerte Lieferung', 'wpsg'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_delaytext'], array('help' => 'wpsg_mod_deliverytime_delayText')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_deliverytime[wpsg_mod_deliverytime_delaytime]', __('Zeitangabe der Verzögerung', 'wpsg'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_delaytime'], array('help' => 'wpsg_mod_deliverytime_delayTime')); ?>
@@ -47,7 +47,7 @@ <?php /* Urlaubsmodus aktiv */ ?>
<?php if ($this->hasMod('wpsg_mod_deliverytime') && ($this->get_option('wpsg_mod_deliverytime_holiday') == '1')) { ?>
- <?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime[wpsg_mod_deliverytime_holiday]', __('Urlaubszeit', 'wpsg'), array(0 => 'Moduleinstellungen', 1 => 'Produktspezifische Einstellung'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_holiday'], array('noIndex' => true, 'help' => 'wpsg_mod_deliverytime_holiday')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime[wpsg_mod_deliverytime_holiday]', __('Urlaubszeit', 'wpsg'), array(0 => 'Moduleinstellungen', 1 => 'Produktspezifische Einstellung'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_holiday'], array('help' => 'wpsg_mod_deliverytime_holiday')); ?>
<div class="wpsg_mod_deliverytime_holiday_activ" style="display:none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_deliverytime[wpsg_mod_deliverytime_holidayStart]', __('Urlaubsbeginn', 'wpsg'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_holidayStart'], array('datepicker' => true, 'help' => 'wpsg_mod_deliverytime_holidayStart')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_deliverytime[wpsg_mod_deliverytime_holidayEnd]', __('Urlaubsende', 'wpsg'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_holidayEnd'], array('datepicker' => true, 'help' => 'wpsg_mod_deliverytime_holidayEnd')); ?>
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..248262b 100644 --- a/views/mods/mod_discount/settings_edit.phtml +++ b/views/mods/mod_discount/settings_edit.phtml @@ -44,7 +44,6 @@ <?php foreach ($this->view['wpsg_mod_discount']['hierarchie'] as $discount_typ) { ?>
<li class="<?php echo $discount_typ; ?>">
<input type="hidden" name="wpsg_mod_discount_hierarchie[]" value="<?php echo $discount_typ; ?>" />
- <input type="checkbox" value="<?php echo $discount_typ; ?>" <?php echo ((in_array($discount_typ, (array)explode(',', $this->get_option('wpsg_mod_discount_hierarchie'))))?'checked="checked"':''); ?> name="wpsg_mod_discount_hierarchie[]" />
<?php echo $this->callMod('wpsg_mod_discount', 'getNameFromType', array($discount_typ)); ?>
</li>
<?php } ?>
@@ -57,29 +56,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 +159,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 +186,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;
@@ -129,7 +200,7 @@ function wpsg_switchUniversalDiscount()
{
- if (jQuery('#wpsg_mod_discount_universal').attr("checked") == "checked")
+ if (jQuery('#wpsg_mod_discount_universal').prop('checked'))
{
jQuery('#wpsg_mod_discount_universal_layer').show();
}
diff --git a/views/mods/mod_downloadplus/settings_edit.phtml b/views/mods/mod_downloadplus/settings_edit.phtml index 71b945a..a9728c5 100644 --- a/views/mods/mod_downloadplus/settings_edit.phtml +++ b/views/mods/mod_downloadplus/settings_edit.phtml @@ -91,14 +91,14 @@ <div role="tabpanel" class="tab-pane" id="tab4">
<p>
- <?php echo __('Das Downloadplus Modul ist eine erweiterung des Downloadprodukt Moduls und ermöglicht das Individualisieren von PDF Dokumenten.', 'wpsg'); ?>
+ <?php echo __('DownloadPlus individualisiert PDF-Dokumente für jeden Käufer. Das Modul ersetzt „DownloadProdukte“; beide Module können nicht gleichzeitig aktiv sein.', 'wpsg'); ?>
</p>
<p>
- <?php echo __('Weitere Informationen erhalten Sie auf der <a href="http://wpshopgermany.de/?p=1426">Hilfe Seite</a> oder in unserem <a href="http://forum.maennchen1.de">Support Forum</a>.', 'wpsg'); ?>
+ <?php echo wpsg_translate(__('Weitere Informationen erhalten Sie im <a href="#1#">Handbuch</a>.', 'wpsg'), 'https://doc.maennchen1.de/wpshopgermany/aktuell/module/modul-downloadplus/'); ?>
</p>
<p>
- <?php echo __('Eintrag in der Crontab:', 'wpsg'); ?>:<br /><br />
+ <?php echo __('Eintrag in der Crontab:', 'wpsg'); ?><br /><br />
<span style="font-weight:bold; font-family:monospace;">
*/5 * * * * wget -q --spider <?php echo site_url().'/?wpsg_cron=1'; ?>
</span>
diff --git a/views/mods/mod_downloadplus/settings_edit_templates.phtml b/views/mods/mod_downloadplus/settings_edit_templates.phtml index a3e97ee..45a8a60 100644 --- a/views/mods/mod_downloadplus/settings_edit_templates.phtml +++ b/views/mods/mod_downloadplus/settings_edit_templates.phtml @@ -172,6 +172,7 @@ #wpsg_dp_templates_app .head div { flex-grow:1; }
#wpsg_dp_templates_app .wpsg_field_wrap_template_name { display:flex; justify-content:space-between; align-items:center; padding-right:10px !important; }
#wpsg_dp_templates_app .wpsg_field_wrap_template_name > div { gap:1rem; display:flex; justify-content:flex-start; align-items:center; }
+ #wpsg_dp_templates_app .wpsg_field_wrap_template_name > input[type="text"] { flex:1; min-width:0; margin-right:1rem; }
#wpsg_dp_templates_app .template td.col_bg,
#wpsg_dp_templates_app .template td.col_align { width:50px; text-align:center; }
#wpsg_dp_templates_app .template tr td { vertical-align:middle; }
diff --git a/views/mods/mod_export/profil.phtml b/views/mods/mod_export/profil.phtml index 0d29381..0c987e9 100644 --- a/views/mods/mod_export/profil.phtml +++ b/views/mods/mod_export/profil.phtml @@ -21,32 +21,32 @@ <?php echo wpsg_drawForm_Text(__('Profilname', 'wpsg'), $this->view['profil']['name'], 'name', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
<?php echo wpsg_drawForm_Text(__('Dateiname', 'wpsg'), $this->view['profil']['filename'], 'filename', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
- <?php echo wpsg_drawForm_Text(__('Encoding', 'wpsg'), $this->view['arFileEncoding'][$this->view['profil']['file_encoding']], 'file_encoding', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_source' => $this->view['arFileEncoding'], 'inlineEdit_url' => $inlineEdit_url)); ?>
+ <?php echo wpsg_drawForm_Text(__('Zeichenkodierung', 'wpsg'), $this->view['arFileEncoding'][$this->view['profil']['file_encoding']], 'file_encoding', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_source' => $this->view['arFileEncoding'], 'inlineEdit_url' => $inlineEdit_url)); ?>
<?php echo wpsg_drawForm_Text(__('Dateiformat', 'wpsg'), $this->view['arExportFormats'][$this->view['profil']['format']], 'format', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_source' => $this->view['arExportFormats'], 'inlineEdit_url' => $inlineEdit_url)); ?>
<?php /* CSV */ ?>
<div class="wpsg_mod_export_format wpsg_mod_export_format_<?php echo wpsg_mod_export::FORMAT_CSV; ?>" style="display:<?php echo (($this->view['profil']['format'] == wpsg_mod_export::FORMAT_CSV)?'block':'none'); ?>;">
- <?php echo wpsg_drawForm_Text('Feld-Trennzeichen', $this->view['profil']['field_delimiter'], 'field_delimiter', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
- <?php echo wpsg_drawForm_Text('Feld-Begrenzung', $this->view['profil']['field_enclosure'], 'field_enclosure', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
- <?php echo wpsg_drawForm_Text('Maskierungs-Zeichen', $this->view['profil']['field_escape'], 'field_escape', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+ <?php echo wpsg_drawForm_Text(__('Feld-Trennzeichen', 'wpsg'), $this->view['profil']['field_delimiter'], 'field_delimiter', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+ <?php echo wpsg_drawForm_Text(__('Feld-Begrenzung', 'wpsg'), $this->view['profil']['field_enclosure'], 'field_enclosure', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+ <?php echo wpsg_drawForm_Text(__('Maskierungs-Zeichen', 'wpsg'), $this->view['profil']['field_escape'], 'field_escape', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
</div>
<?php /* XML */ ?>
<div class="wpsg_mod_export_format wpsg_mod_export_format_<?php echo wpsg_mod_export::FORMAT_XML; ?>" style="display:<?php echo (($this->view['profil']['format'] == wpsg_mod_export::FORMAT_XML)?'block':'none'); ?>;">
- <?php echo wpsg_drawForm_Text('Root-Tagname', $this->view['profil']['xml_roottag'], 'xml_roottag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+ <?php echo wpsg_drawForm_Text(__('Root-Tagname', 'wpsg'), $this->view['profil']['xml_roottag'], 'xml_roottag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
<?php if ($this->view['profil']['export_type'] === wpsg_mod_export::TYPE_ORDER) { ?>
- <?php echo wpsg_drawForm_Text('Bestellung-Tagname', $this->view['profil']['xml_ordertag'], 'xml_ordertag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
- <?php echo wpsg_drawForm_Text('Produkt-Root-Tagname', $this->view['profil']['xml_productroottag'], 'xml_productroottag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+ <?php echo wpsg_drawForm_Text(__('Bestellung-Tagname', 'wpsg'), $this->view['profil']['xml_ordertag'], 'xml_ordertag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+ <?php echo wpsg_drawForm_Text(__('Produkt-Root-Tagname', 'wpsg'), $this->view['profil']['xml_productroottag'], 'xml_productroottag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
<?php } ?>
<?php if ($this->view['profil']['export_type'] === wpsg_mod_export::TYPE_CUSTOMER) { ?>
- <?php echo wpsg_drawForm_Text('Kunden-Tagname', $this->view['profil']['xml_customertag'], 'xml_customertag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+ <?php echo wpsg_drawForm_Text(__('Kunden-Tagname', 'wpsg'), $this->view['profil']['xml_customertag'], 'xml_customertag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
<?php } else { ?>
- <?php echo wpsg_drawForm_Text('Produkt-Tagname', $this->view['profil']['xml_producttag'], 'xml_producttag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+ <?php echo wpsg_drawForm_Text(__('Produkt-Tagname', 'wpsg'), $this->view['profil']['xml_producttag'], 'xml_producttag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
<?php } ?>
</div>
@@ -104,7 +104,7 @@ <?php echo wpsg_drawForm_Text(__('Cron URL', 'wpsg'), '<a href="'.site_url().'/?wpsg_cron=1">'.site_url().'/?wpsg_cron=1</a>', false, array('noP' => false)); ?>
</fieldset>
- <?php echo wpsg_drawForm_Checkbox('wp_cron', __('Stündlich mit Wordpress Cron ausführen', 'wpsg'), ($this->view['profil']['wp_cron']??'0') === '1'); ?>
+ <?php echo wpsg_drawForm_Checkbox('wp_cron', __('Stündlich mit WordPress-Cron ausführen', 'wpsg'), ($this->view['profil']['wp_cron']??'0') === '1'); ?>
<script>
diff --git a/views/mods/mod_export/settings_edit.phtml b/views/mods/mod_export/settings_edit.phtml index b01916d..e3f6b49 100644 --- a/views/mods/mod_export/settings_edit.phtml +++ b/views/mods/mod_export/settings_edit.phtml @@ -146,9 +146,9 @@ </script>
-<a title="<?php echo __('Neuens Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil(<?php echo wpsg_mod_export::TYPE_ORDER; ?>);"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil für Bestellungen anlegen', 'wpsg'); ?></a><br />
-<a title="<?php echo __('Neuens Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil(<?php echo wpsg_mod_export::TYPE_PRODUCT; ?>);"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil für Produkte anlegen', 'wpsg'); ?></a><br />
-<a title="<?php echo __('Neuens Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil(<?php echo wpsg_mod_export::TYPE_CUSTOMER; ?>);"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil für Kunden anlegen', 'wpsg'); ?></a>
+<a title="<?php echo __('Neues Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil(<?php echo wpsg_mod_export::TYPE_ORDER; ?>);"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil für Bestellungen anlegen', 'wpsg'); ?></a><br />
+<a title="<?php echo __('Neues Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil(<?php echo wpsg_mod_export::TYPE_PRODUCT; ?>);"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil für Produkte anlegen', 'wpsg'); ?></a><br />
+<a title="<?php echo __('Neues Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil(<?php echo wpsg_mod_export::TYPE_CUSTOMER; ?>);"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil für Kunden anlegen', 'wpsg'); ?></a>
<br /><br />
diff --git a/views/mods/mod_flexipay/settings_edit.phtml b/views/mods/mod_flexipay/settings_edit.phtml index a504b91..654a1c9 100644 --- a/views/mods/mod_flexipay/settings_edit.phtml +++ b/views/mods/mod_flexipay/settings_edit.phtml @@ -70,7 +70,6 @@ ), $this->get_option('wpsg_mod_flexipay_language'), array('help' => 'wpsg_mod_flexipay_language')); ?> <?php echo wpsg_drawForm_Input('wpsg_mod_flexipay_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_flexipay_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_flexipay_gebuehr')); ?> <?php echo wpsg_drawForm_Select('wpsg_mod_flexipay_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_flexipay_mwst'), array('help' => 'wpsg_shippay_mwst')); ?> -<?php echo wpsg_drawForm_Checkbox('wpsg_mod_flexipay_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_flexipay_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?> <br /> <?php echo wpsg_drawForm_Select('wpsg_mod_flexipay_successPage', __('Seite nach erfolgreicher Zahlung', 'wpsg'), $this->view['wpsg_mod_flexipay']['arPages'], $this->get_option('wpsg_mod_flexipay_successPage'), array('help' => 'wpsg_mod_flexipay_successPage')); ?> 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_giropay/order_done.phtml b/views/mods/mod_giropay/order_done.phtml index c3a144e..0a3e276 100644 --- a/views/mods/mod_giropay/order_done.phtml +++ b/views/mods/mod_giropay/order_done.phtml @@ -5,7 +5,7 @@ */
?>
-<?php echo __('Klicken Sie auf das folgende Logo um ihre Bestellung zu bezahlen.', 'wpsg'); ?>
+<?php echo __('Klicken Sie auf das folgende Logo um Ihre Bestellung zu bezahlen.', 'wpsg'); ?>
<br /><br />
<a href="<?php echo $this->view['wpsg_mod_giropay']['payLink']; ?>"><img src="<?php echo $this->view['wpsg_mod_giropay']['logo']; ?>" alt="<?php echo $this->view['wpsg_mod_giropay']['title']; ?>" /></a>
<?php if ($this->get_option('wpsg_mod_giropay_paystart') == '1') { ?>
diff --git a/views/mods/mod_giropay/settings_edit.phtml b/views/mods/mod_giropay/settings_edit.phtml index e1d1620..3d44b65 100755 --- a/views/mods/mod_giropay/settings_edit.phtml +++ b/views/mods/mod_giropay/settings_edit.phtml @@ -31,10 +31,9 @@ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_giropay_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_giropay_giropay_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_giropay_giropay_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_giropay_giropay_mwst'), array('help' => 'wpsg_shippay_mwst')); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_giropay_giropay_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_giropay_giropay_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
</div>
- <div id="tab2" role="tabpanel" class="tab-pane active" >
+ <div id="tab2" role="tabpanel" class="tab-pane" >
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_giropay_creditcard_activ', __('Zahlungsart "Kreditkarte" aktiv', 'wpsg'), $this->get_option('wpsg_mod_giropay_creditcard_activ'), array('help' => 'wpsg_shippay_activ')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_giropay_creditcard_projectid', __('Projekt-ID für Kreditkarte', 'wpsg'), $this->get_option('wpsg_mod_giropay_creditcard_projectid'), array('help' => 'wpsg_mod_giropay_creditcard_projectid')); ?>
@@ -44,10 +43,9 @@ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_creditcard_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_giropay_creditcard_logo'), array('help' => 'wpsg_shippay_logo')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_giropay_creditcard_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_giropay_creditcard_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_giropay_creditcard_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_giropay_creditcard_mwst'), array('help' => 'wpsg_shippay_mwst')); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_giropay_creditcard_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_giropay_creditcard_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
</div>
- <div id="tab3" role="tabpanel" class="tab-pane active" >
+ <div id="tab3" role="tabpanel" class="tab-pane" >
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_giropay_directdebit_activ', __('Zahlungsart "Lastschrift" aktiv', 'wpsg'), $this->get_option('wpsg_mod_giropay_directdebit_activ'), array('help' => 'wpsg_shippay_activ')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_giropay_directdebit_projectid', __('Projekt-ID für Lastschrift', 'wpsg'), $this->get_option('wpsg_mod_giropay_directdebit_projectid'), array('help' => 'wpsg_mod_giropay_directdebit_projectid')); ?>
@@ -57,7 +55,6 @@ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_directdebit_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_giropay_directdebit_logo'), array('help' => 'wpsg_shippay_logo')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_giropay_directdebit_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_giropay_directdebit_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_giropay_directdebit_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_giropay_directdebit_mwst'), array('help' => 'wpsg_shippay_mwst')); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_giropay_directdebit_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_giropay_directdebit_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
</div>
</div>
diff --git a/views/mods/mod_icp/settings_edit.phtml b/views/mods/mod_icp/settings_edit.phtml index b8566fc..c9de970 100644 --- a/views/mods/mod_icp/settings_edit.phtml +++ b/views/mods/mod_icp/settings_edit.phtml @@ -66,7 +66,6 @@ ), $this->get_option('wpsg_mod_icp_language'), array('help' => 'wpsg_mod_icp_language')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_icp_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_icp_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_icp_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_icp_mwst'), array('help' => 'wpsg_shippay_mwst')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_icp_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_icp_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
<br />
<?php echo wpsg_drawForm_Select('wpsg_mod_icp_successPage', __('Seite nach erfolgreicher Zahlung', 'wpsg'), $this->view['wpsg_mod_icp']['arPages'], $this->get_option('wpsg_mod_icp_successPage'), array('help' => 'wpsg_mod_icp_successPage')); ?>
diff --git a/views/mods/mod_klarna/settings_edit.phtml b/views/mods/mod_klarna/settings_edit.phtml index d622a10..e9c53b2 100644 --- a/views/mods/mod_klarna/settings_edit.phtml +++ b/views/mods/mod_klarna/settings_edit.phtml @@ -13,7 +13,7 @@ ?> <?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_active', __('Zahlungsart für neue Bestellungen aktiv', 'wpsg'), $this->get_option('wpsg_mod_klarna_active'), ['help' => 'wpsg_mod_klarna_active']); ?> -<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_admin_active', __('Zahlungsart nur für Admins aktiv', 'wpsgPayone'), $this->get_option('wpsg_mod_klarna_admin_active'), ['help' => 'wpsg_mod_klarna_admin_active']); ?> +<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_admin_active', __('Zahlungsart nur für Admins aktiv', 'wpsg'), $this->get_option('wpsg_mod_klarna_admin_active'), ['help' => 'wpsg_mod_klarna_admin_active']); ?> <?php echo wpsg_drawForm_Input('wpsg_mod_klarna_api_user', __('API Benutzername', 'wpsg'), $this->get_option('wpsg_mod_klarna_api_user'), ['help' => 'wpsg_mod_klarna_api_user']); ?> <?php echo wpsg_drawForm_Input('wpsg_mod_klarna_api_password', __('API Passwort', 'wpsg'), $this->get_option('wpsg_mod_klarna_api_password'), ['help' => 'wpsg_mod_klarna_api_password']); ?> @@ -29,7 +29,7 @@ <br /> -<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_checkout', __('Zahlungen im Checkout vorauthorisieren', 'wpsg'), $this->get_option('wpsg_mod_klarna_checkout'), array('help' => 'wpsg_mod_klarna_checkout')); ?> +<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_checkout', __('Zahlungen im Checkout vorautorisieren', 'wpsg'), $this->get_option('wpsg_mod_klarna_checkout'), array('help' => 'wpsg_mod_klarna_checkout')); ?> <br /> @@ -54,5 +54,4 @@ <?php echo wpsg_drawForm_Input('wpsg_mod_klarna_fee', __('Gebühr', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_klarna_fee'), true), array('help' => 'wpsg_mod_klarna_fee','unit' => $this->get_option('wpsg_currency').' / %')); ?> <?php echo wpsg_drawForm_Select('wpsg_mod_klarna_tax_key', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_klarna_tax_key'), array('help' => 'wpsg_mod_klarna_tax_key')); ?> -<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_notaxcountry', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_klarna_notaxcountry'), array('help' => 'wpsg_mod_klarna_notaxcountry')); ?> <?php echo wpsg_drawForm_Textarea('wpsg_mod_klarna_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_klarna_hint'), array('help' => 'wpsg_mod_klarna_hint')); ?> diff --git a/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung.phtml b/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung.phtml index 32e49a2..781156c 100644 --- a/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung.phtml +++ b/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung.phtml @@ -6,7 +6,7 @@ * Betreff des Templates
*/
- $template_betreff = __('wpShopGermany: Zahlungsaufforderung', 'wpsg');
+ $template_betreff = implode(': ', wpsg_trim([__((string)$this->get_option('wpsg_shopdata_name'), 'wpsg'), __('Zahlungsaufforderung', 'wpsg')]));
?><?php echo __('Hallo %kunde_anrede% %kunde_vname% %kunde_name%,', 'wpsg'); ?>
@@ -15,7 +15,7 @@ <?php echo __('Bestelldaten', 'wpsg'); ?>:
%basket_txt%
-<?php echo __('Nutzen Sie bitte folgenden Link um den Zahlvorgang abschließen zu können', 'wpsg'); ?>:
+<?php echo __('Nutzen Sie bitte folgenden Link, um den Zahlvorgang abschließen zu können', 'wpsg'); ?>:
%order_done_url%
<?php echo __('Mit freundlichen Grüßen', 'wpsg') ?>
diff --git a/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung_html.phtml b/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung_html.phtml index a5ba35c..6354b35 100644 --- a/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung_html.phtml +++ b/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung_html.phtml @@ -6,7 +6,7 @@ * Betreff des Templates
*/
- $template_betreff = __('wpShopGermany: Zahlungsaufforderung', 'wpsg');
+ $template_betreff = implode(': ', wpsg_trim([__((string)$this->get_option('wpsg_shopdata_name'), 'wpsg'), __('Zahlungsaufforderung', 'wpsg')]));
?><p><?php echo __('Hallo %kunde_anrede% %kunde_vname% %kunde_name%,', 'wpsg'); ?></p>
@@ -19,7 +19,7 @@ <br />
<p>
- <?php echo __('Nutzen Sie bitte folgenden Link um den Zahlvorgang abschließen zu können', 'wpsg'); ?>:
+ <?php echo __('Nutzen Sie bitte folgenden Link, um den Zahlvorgang abschließen zu können', 'wpsg'); ?>:
<a href="%order_done_url%"><?php echo __('Bestellabschlussseite', 'wpsg'); ?></a>
</p>
diff --git a/views/mods/mod_kundenkontakt/templates/zahlungserinnerung.phtml b/views/mods/mod_kundenkontakt/templates/zahlungserinnerung.phtml index 48fc498..3f15c19 100644 --- a/views/mods/mod_kundenkontakt/templates/zahlungserinnerung.phtml +++ b/views/mods/mod_kundenkontakt/templates/zahlungserinnerung.phtml @@ -6,7 +6,7 @@ * Betreff des Templates
*/
- $template_betreff = __('wpShopGermany: Zahlungserinnerung', 'wpsg');
+ $template_betreff = implode(': ', wpsg_trim([__((string)$this->get_option('wpsg_shopdata_name'), 'wpsg'), __('Zahlungserinnerung', 'wpsg')]));
?><?php echo __('Hallo %kunde_anrede% %kunde_vname% %kunde_name%,', 'wpsg'); ?>
@@ -15,7 +15,7 @@ <?php echo __('Bestelldaten', 'wpsg'); ?>:
%basket_txt%
-<?php echo __('Nutzen Sie bitte folgenden Link um den Zahlvorgang abschließen zu können', 'wpsg'); ?>:
+<?php echo __('Nutzen Sie bitte folgenden Link, um den Zahlvorgang abschließen zu können', 'wpsg'); ?>:
%order_done_url%
<?php echo __('Mit freundlichen Grüßen', 'wpsg') ?>
diff --git a/views/mods/mod_kundenkontakt/templates/zahlungserinnerung_html.phtml b/views/mods/mod_kundenkontakt/templates/zahlungserinnerung_html.phtml index a89b97f..90298e0 100644 --- a/views/mods/mod_kundenkontakt/templates/zahlungserinnerung_html.phtml +++ b/views/mods/mod_kundenkontakt/templates/zahlungserinnerung_html.phtml @@ -5,7 +5,7 @@ /**
* Betreff des Templates
*/
- $template_betreff = __('wpShopGermany: Zahlungserinnerung', 'wpsg');
+ $template_betreff = implode(': ', wpsg_trim([__((string)$this->get_option('wpsg_shopdata_name'), 'wpsg'), __('Zahlungserinnerung', 'wpsg')]));
?><p><?php echo __('Hallo %kunde_anrede% %kunde_vname% %kunde_name%,', 'wpsg'); ?></p>
@@ -18,8 +18,8 @@ <br />
<p>
- <?php echo __('Nutzen Sie bitte folgenden Link um den Zahlvorgang abschließen zu können', 'wpsg'); ?>:
- <a href=""%order_done_url%"><?php echo __('Bestellabschlussseite', 'wpsg'); ?></a>
+ <?php echo __('Nutzen Sie bitte folgenden Link, um den Zahlvorgang abschließen zu können', 'wpsg'); ?>:
+ <a href="%order_done_url%"><?php echo __('Bestellabschlussseite', 'wpsg'); ?></a>
</p>
<p><?php echo __("Mit freundlichen Grüßen", "wpsg"); ?></p>
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_kundenverwaltung/order.phtml b/views/mods/mod_kundenverwaltung/order.phtml index 7ddd365..8aa7f59 100644 --- a/views/mods/mod_kundenverwaltung/order.phtml +++ b/views/mods/mod_kundenverwaltung/order.phtml @@ -8,7 +8,7 @@ ?>
-<div class="wpsg_mod_kundenverwaltung_order wpsg">
+<div class="wpsg_mod_kundenverwaltung_order wpsg alignwide">
<?php echo $this->writeFrontendMessage(); ?>
diff --git a/views/mods/mod_kundenverwaltung/profil.phtml b/views/mods/mod_kundenverwaltung/profil.phtml index d17615e..4244f31 100644 --- a/views/mods/mod_kundenverwaltung/profil.phtml +++ b/views/mods/mod_kundenverwaltung/profil.phtml @@ -131,6 +131,8 @@ <?php echo $this->writeFrontendMessage(); ?>
+ <?php $this->callMods('customer_profil_inner', [&$this->view['data']]); ?>
+
<form method="post" id="form-profil" action="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getProfilURL'); ?>">
<h2><?php echo __('Kundendaten', 'wpsg'); ?></h2>
@@ -153,7 +155,7 @@ <?php $i=0; foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
<?php /* <option value="<?php echo $i; $i++; ?>" <?php echo (($this->view['data']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option> */ ?>
<option value="<?php echo $i; /*wpsg_hspc($t);*/ ?>"
- <?php if ($this->view['data']['title'] == $i) : echo 'selected="selected"'; endif; ?>>
+ <?php if (strval($this->view['data']['title'] ?? '-1') === strval($i)) : echo 'selected="selected"'; endif; ?>>
<?php echo $t; $i++; ?>
</option>
<?php } ?>
diff --git a/views/mods/mod_kundenverwaltung/register.phtml b/views/mods/mod_kundenverwaltung/register.phtml index 26e738e..0d93425 100644 --- a/views/mods/mod_kundenverwaltung/register.phtml +++ b/views/mods/mod_kundenverwaltung/register.phtml @@ -169,7 +169,7 @@ <select class="<?php echo (($this->view['pflicht']['anrede'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_title" name="wpsg[register][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['data']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
+ <option value="<?php echo $i; ?>" <?php echo ((strval($this->view['data']['title'] ?? '-1') === strval($i))?'selected="selected"':''); $i++; ?>><?php echo $t; ?></option>
<?php } ?>
</select>
</div>
@@ -428,7 +428,8 @@ }
- \set_transient('wpsg_mod_kundenverwaltung_mathcaptcha_result', $captcha_result);
+ // Je Besucher, ein Transient galt für alle gleichzeitig
+ $_SESSION['wpsg']['mathcaptcha_result'] = (string)$captcha_result;
?>
diff --git a/views/mods/mod_kundenverwaltung/settings_edit.phtml b/views/mods/mod_kundenverwaltung/settings_edit.phtml index fe39220..792f968 100644 --- a/views/mods/mod_kundenverwaltung/settings_edit.phtml +++ b/views/mods/mod_kundenverwaltung/settings_edit.phtml @@ -14,7 +14,7 @@ <br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_showCheckoutRegister', __('Registrierung im Checkout', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegister'), array('help' => 'wpsg_mod_kundenverwaltung_showCheckoutRegister')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang', __('Registrierungzwang im Checkout', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang'), array('help' => 'wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang', __('Registrierungszwang im Checkout', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang'), array('help' => 'wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang')); ?>
<br />
@@ -62,7 +62,7 @@ <br />
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_wpuser', __('Wordpress User koppeln', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_wpuser'), array('help' => 'wpsg_mod_kundenverwaltung_wpuser_role')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_wpuser', __('WordPress-Benutzer koppeln', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_wpuser'), array('help' => 'wpsg_mod_kundenverwaltung_wpuser_role')); ?>
<div id="wpsg_mod_kundenverwaltung_wpuser_layer" style="display:none;">
<?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung_wpuser_role', __('Benutzerrolle', 'wpsg'), $this->view['arRoles'], $this->get_option('wpsg_mod_kundenverwaltung_wpuser_role')); ?>
@@ -70,12 +70,12 @@ </div>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_recaptcha_register', __('reCaptcha V2 für Registrierung', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_recaptcha_register'), array('help' => 'wpsg_mod_kundenverwaltung_recaptcha_register')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_recaptcha_register', __('reCAPTCHA v2 für Registrierung', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_recaptcha_register'), array('help' => 'wpsg_mod_kundenverwaltung_recaptcha_register')); ?>
<div id="wpsg_mod_kundenverwaltung_register_recaptcha_layer" style="display:none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_kundenveraltung_recaptcha_key', __('Websiteschlüssel', 'wpsg'), $this->get_option('wpsg_mod_kundenveraltung_recaptcha_key')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_kundenveraltung_recaptcha_secretkey', __('Geheimer Schlüssel', 'wpsg'), $this->get_option('wpsg_mod_kundenveraltung_recaptcha_secretkey')); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_recaptcha_dsgvo_layer', __('DSGVO Layer für das Recaptcha', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_recaptcha_dsgvo_layer')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_recaptcha_dsgvo_layer', __('DSGVO Layer für reCAPTCHA', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_recaptcha_dsgvo_layer')); ?>
</div>
diff --git a/views/mods/mod_micropayment_paywindow/settings_edit.phtml b/views/mods/mod_micropayment_paywindow/settings_edit.phtml index 224f120..c6d5707 100644 --- a/views/mods/mod_micropayment_paywindow/settings_edit.phtml +++ b/views/mods/mod_micropayment_paywindow/settings_edit.phtml @@ -19,7 +19,7 @@ <br />
-<?php foreach ($view['arPaymentWindow'] as $pw_key => $pw) { ?>
+<?php foreach ($view['arPaymentWindow'] as $pw_key => $pw) { if (!empty($pw['eingestellt'])) continue; ?>
<?php echo wpsg_drawForm_AdminboxStart($pw['title'], $pw_key, ['collapsable' => true, 'collapsed' => (($this->get_option('wpsg_mod_micropayment_paywindow_'.$pw_key.'_activ') === '1')?false:true)]); ?>
@@ -32,7 +32,6 @@ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_paywindow_'.$pw_key.'_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_micropayment_paywindow_'.$pw_key.'_logo'), array('help' => 'wpsg_mod_micropayment_paywindow_logo')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_paywindow_'.$pw_key.'_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_micropayment_paywindow_'.$pw_key.'_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_mod_micropayment_paywindow_gebuehr')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_micropayment_paywindow_'.$pw_key.'_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_micropayment_paywindow_'.$pw_key.'_mwst'), array('help' => 'wpsg_mod_micropayment_paywindow_mwst')); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_paywindow_'.$pw_key.'_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_micropayment_paywindow_'.$pw_key.'_mwstland'), array('help' => 'wpsg_mod_micropayment_paywindow_mwstland')); ?>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
diff --git a/views/mods/mod_mollie/gfx/mollie.svg b/views/mods/mod_mollie/gfx/mollie.svg new file mode 100644 index 0000000..a0c7e28 --- /dev/null +++ b/views/mods/mod_mollie/gfx/mollie.svg @@ -0,0 +1,4 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="100" height="25" viewBox="0 0 100 25" role="img" aria-label="Mollie"> + <rect x="0" y="0" width="100" height="25" rx="4" ry="4" fill="#ffffff" stroke="#d9dce3" stroke-width="1" /> + <text x="50" y="17" fill="#0d1b3e" font-family="Helvetica, Arial, sans-serif" font-size="12" font-weight="bold" letter-spacing="0.3" text-anchor="middle">mollie</text> +</svg> diff --git a/views/mods/mod_mollie/order_done.phtml b/views/mods/mod_mollie/order_done.phtml new file mode 100644 index 0000000..5f5a46f --- /dev/null +++ b/views/mods/mod_mollie/order_done.phtml @@ -0,0 +1,62 @@ +<?php + + /** + * Template für die Bestellabschlussseite mit Mollie + */ + + $mollie = $this->view['wpsg_mod_mollie']; + +?> +<div class="wpsg_mod_mollie"> + + <?php if ($mollie['state'] === 'PAID') { ?> + + <p><?php echo esc_html__('Ihre Zahlung ist bei uns eingegangen. Vielen Dank!', 'wpsg'); ?></p> + + <?php } else if ($mollie['state'] === 'AUTHORIZED') { ?> + + <p><?php echo esc_html__('Ihre Zahlung wurde erfolgreich autorisiert. Vielen Dank!', 'wpsg'); ?></p> + + <?php } else if ($mollie['state'] === 'RECURRING') { ?> + + <p><?php echo esc_html__('Der Betrag wird automatisch über Mollie eingezogen. Sobald die Zahlung bestätigt ist, erhalten Sie eine E-Mail.', 'wpsg'); ?></p> + + <?php } else if ($mollie['state'] === 'PENDING') { ?> + + <p><?php echo esc_html__('Ihre Zahlung wird noch verarbeitet. Sobald die Bestätigung bei uns eingeht, erhalten Sie eine E-Mail.', 'wpsg'); ?></p> + + <?php } else if ($mollie['state'] === 'TOPAY') { ?> + + <p><?php echo wpsg_translate(esc_html__('Sie bezahlen Ihre Bestellung mit der Nummer #1# in Höhe von #2#.', 'wpsg'), esc_html($this->view['order']['onr']), wpsg_ff($mollie['amount'], $this->get_option('wpsg_currency'))); ?></p> + + <p class="wpsg_mod_mollie_logo"> + <a title="<?php echo esc_attr(wpsg_translate(__('Mit #1# bezahlen', 'wpsg'), $mollie['name'])); ?>" href="<?php echo esc_url($mollie['checkout_url']); ?>"> + <img src="<?php echo esc_url($mollie['logo']); ?>" alt="<?php echo esc_attr($mollie['name']); ?>" style="height:32px; width:auto;" /> + </a> + </p> + + <p><a class="wpsg_button wpsg_mod_mollie_button" href="<?php echo esc_url($mollie['checkout_url']); ?>"><?php echo esc_html__('Jetzt bezahlen', 'wpsg'); ?></a></p> + + <p><?php echo esc_html__('Sie werden in wenigen Sekunden automatisch zur Bezahlseite weitergeleitet.', 'wpsg'); ?></p> + + <script type="text/javascript">/* <![CDATA[ */ + + window.setTimeout(function() { + + window.location.href = '<?php echo wpsg_jsquoteescape($mollie['checkout_url']); ?>'; + + }, 3000); + + /* ]]> */</script> + + <?php } else { ?> + + <p><?php echo esc_html__('Die Zahlung konnte nicht gestartet werden. Bitte wenden Sie sich an den Betreiber des Shops.', 'wpsg'); ?></p> + + <?php if (wpsg_isSizedString($mollie['error']) && $this->get_option('wpsg_mod_mollie_debug') === '1') { ?> + <p class="wpsg_error"><?php echo esc_html($mollie['error']); ?></p> + <?php } ?> + + <?php } ?> + +</div> diff --git a/views/mods/mod_mollie/order_view_afterpayment.phtml b/views/mods/mod_mollie/order_view_afterpayment.phtml new file mode 100644 index 0000000..95ac4b1 --- /dev/null +++ b/views/mods/mod_mollie/order_view_afterpayment.phtml @@ -0,0 +1,112 @@ +<?php + + /** + * Zeigt die Mollie Daten einer Bestellung in der Bestellansicht im Backend + */ + + $oOrder = $this->view['wpsg_mod_mollie']['oOrder']; + $order_id = intval($oOrder->getId()); + + $payment_id = $oOrder->getMeta('wpsg_mod_mollie_payment_id', false, ''); + $payment_status = $oOrder->getMeta('wpsg_mod_mollie_status', false, ''); + $payment_method = $oOrder->getMeta('wpsg_mod_mollie_method', false, ''); + $payment_sequence = $oOrder->getMeta('wpsg_mod_mollie_sequence', false, ''); + $mandate_id = $oOrder->getMeta('wpsg_mod_mollie_mandate_id', false, ''); + $capture_before = $oOrder->getMeta('wpsg_mod_mollie_capture_before', false, ''); + $amount_captured = $oOrder->getMeta('wpsg_mod_mollie_amount_captured', false, ''); + $amount_refunded = $oOrder->getMeta('wpsg_mod_mollie_amount_refunded', false, ''); + $amount_remaining = $oOrder->getMeta('wpsg_mod_mollie_amount_remaining', false, ''); + + $currency = $this->get_option('wpsg_currency'); + + $bAuthorized = ($payment_status === 'authorized'); + $bRefundable = ($payment_status === 'paid' && doubleval($amount_remaining) > 0); + + $mod = $this->arModule['wpsg_mod_mollie']; + + $arStatusLabel = [ + 'open' => __('Offen', 'wpsg'), + 'pending' => __('In Bearbeitung', 'wpsg'), + 'authorized' => __('Autorisiert', 'wpsg'), + 'paid' => __('Bezahlt', 'wpsg'), + 'canceled' => __('Abgebrochen', 'wpsg'), + 'expired' => __('Abgelaufen', 'wpsg'), + 'failed' => __('Fehlgeschlagen', 'wpsg') + ]; + + $payment_method_label = $payment_method; + foreach ($mod->getMethodList() as $arMethod) { if ($arMethod['id'] === $payment_method) $payment_method_label = $arMethod['name']; } + +?> +<br /> + +<?php if (wpsg_isSizedString($payment_id)) { ?> +<?php echo wpsg_drawForm_Input('', __('Mollie Zahlungs ID', 'wpsg'), $payment_id, ['readonly' => true]); ?> +<?php } ?> + +<?php if (wpsg_isSizedString($payment_status)) { ?> +<?php echo wpsg_drawForm_Input('', __('Mollie Status', 'wpsg'), ($arStatusLabel[$payment_status] ?? $payment_status), ['readonly' => true]); ?> +<?php } ?> + +<?php if (wpsg_isSizedString($payment_method)) { ?> +<?php echo wpsg_drawForm_Input('', __('Bei Mollie genutzte Methode', 'wpsg'), $payment_method_label, ['readonly' => true]); ?> +<?php } ?> + +<?php if ($payment_sequence === 'first' || $payment_sequence === 'recurring') { ?> +<?php echo wpsg_drawForm_Input('', __('Mollie Mandat', 'wpsg'), ((wpsg_isSizedString($mandate_id))?$mandate_id:__('noch nicht angelegt', 'wpsg')), ['readonly' => true, 'hint' => (($payment_sequence === 'first')?__('Erste Zahlung eines Abos, Verlängerungen werden über das Mandat eingezogen.', 'wpsg'):__('Folgezahlung eines Abos über das Mandat.', 'wpsg'))]); ?> +<?php } ?> + +<?php if ($bAuthorized && wpsg_isSizedString($capture_before)) { ?> +<?php echo wpsg_drawForm_Input('', __('Einzug möglich bis', 'wpsg'), wpsg_date('d.m.Y H:i', strtotime($capture_before)), ['readonly' => true]); ?> +<?php } ?> + +<?php if (doubleval($amount_captured) > 0) { ?> +<?php echo wpsg_drawForm_Input('', __('Eingezogen', 'wpsg'), wpsg_ff($amount_captured, $currency), ['readonly' => true]); ?> +<?php } ?> + +<?php if (doubleval($amount_refunded) > 0) { ?> +<?php echo wpsg_drawForm_Input('', __('Erstattet', 'wpsg'), wpsg_ff($amount_refunded, $currency), ['readonly' => true]); ?> +<?php } ?> + +<?php if (wpsg_isSizedString($payment_id)) { ?> + +<br /> + +<p> + + <a class="button" href="<?php echo esc_url($mod->getOrderAjaxURL($order_id, 'refresh')); ?>"><?php echo esc_html__('Status aktualisieren', 'wpsg'); ?></a> + + <?php if ($bAuthorized) { ?> + <a class="button button-primary" onclick="return confirm('<?php echo esc_js(__('Den autorisierten Betrag jetzt einziehen?', 'wpsg')); ?>');" href="<?php echo esc_url($mod->getOrderAjaxURL($order_id, 'capture')); ?>"><?php echo esc_html__('Zahlung einziehen', 'wpsg'); ?></a> + <a class="button" onclick="return confirm('<?php echo esc_js(__('Die Reservierung freigeben? Der Betrag kann danach nicht mehr eingezogen werden.', 'wpsg')); ?>');" href="<?php echo esc_url($mod->getOrderAjaxURL($order_id, 'cancel')); ?>"><?php echo esc_html__('Autorisierung freigeben', 'wpsg'); ?></a> + <?php } ?> + +</p> + +<?php } ?> + +<?php if ($bRefundable) { ?> + +<?php echo wpsg_drawForm_Input('wpsg_mod_mollie_refund_amount', __('Erstattungsbetrag', 'wpsg'), wpsg_ff($amount_remaining), ['hint' => wpsg_translate(__('Höchstens #1#', 'wpsg'), wpsg_ff($amount_remaining, $currency))]); ?> + +<p> + <a class="button" id="wpsg_mod_mollie_refund" href="<?php echo esc_url($mod->getOrderAjaxURL($order_id, 'refund')); ?>"><?php echo esc_html__('Betrag erstatten', 'wpsg'); ?></a> +</p> + +<script type="text/javascript">/* <![CDATA[ */ + + jQuery('#wpsg_mod_mollie_refund').on('click', function() { + + var amount = jQuery('#wpsg_mod_mollie_refund_amount').val(); + + if (!confirm('<?php echo esc_js(__('Den Betrag über Mollie erstatten?', 'wpsg')); ?>')) return false; + + location.href = this.href + '&amount=' + encodeURIComponent(amount); + + return false; + + }); + +/* ]]> */</script> + +<?php } ?> diff --git a/views/mods/mod_mollie/settings_edit.phtml b/views/mods/mod_mollie/settings_edit.phtml new file mode 100644 index 0000000..ab362c5 --- /dev/null +++ b/views/mods/mod_mollie/settings_edit.phtml @@ -0,0 +1,95 @@ +<?php + + /** + * Template für die Einstellungen des Mollie Moduls + */ + + $view = $this->view['wpsg_mod_mollie']; + +?> +<?php echo wpsg_drawForm_Checkbox('wpsg_mod_mollie_testmode', __('Testmodus', 'wpsg'), $this->get_option('wpsg_mod_mollie_testmode'), ['hint' => __('Im Testmodus wird der Test-API-Schlüssel verwendet. Mollie unterscheidet Test- und Livebetrieb allein über den Schlüssel.', 'wpsg')]); ?> +<?php echo wpsg_drawForm_Input('wpsg_mod_mollie_apikey_test', __('API-Schlüssel (Test)', 'wpsg'), $this->get_option('wpsg_mod_mollie_apikey_test'), ['hint' => __('Beginnt mit test_', 'wpsg')]); ?> +<?php echo wpsg_drawForm_Input('wpsg_mod_mollie_apikey_live', __('API-Schlüssel (Live)', 'wpsg'), $this->get_option('wpsg_mod_mollie_apikey_live'), ['hint' => __('Beginnt mit live_', 'wpsg')]); ?> +<?php echo wpsg_drawForm_Input('', __('Webhook URL', 'wpsg'), $view['webhookURL'], ['readonly' => true, 'hint' => __('Mollie ruft diese URL bei jeder Statusänderung auf. Sie wird bei jeder Zahlung automatisch mitgesendet und muss von außen erreichbar sein.', 'wpsg')]); ?> + +<br /> + +<?php echo wpsg_drawForm_Input('wpsg_mod_mollie_currency', __('Währung', 'wpsg'), $this->get_option('wpsg_mod_mollie_currency'), ['hint' => __('ISO-4217-Code, z.B. EUR', 'wpsg')]); ?> +<?php echo wpsg_drawForm_Select('wpsg_mod_mollie_locale', __('Sprache der Bezahlseite', 'wpsg'), [ + 'auto' => __('Automatisch (Sprache von WordPress)', 'wpsg'), + 'de_DE' => __('Deutsch (Deutschland)', 'wpsg'), + 'de_AT' => __('Deutsch (Österreich)', 'wpsg'), + 'de_CH' => __('Deutsch (Schweiz)', 'wpsg'), + 'en_GB' => __('Englisch (Großbritannien)', 'wpsg'), + 'en_US' => __('Englisch (USA)', 'wpsg'), + 'nl_NL' => __('Niederländisch', 'wpsg'), + 'fr_FR' => __('Französisch', 'wpsg'), + 'it_IT' => __('Italienisch', 'wpsg'), + 'es_ES' => __('Spanisch', 'wpsg'), + 'pl_PL' => __('Polnisch', 'wpsg') +], $this->get_option('wpsg_mod_mollie_locale')); ?> +<?php echo wpsg_drawForm_Input('wpsg_mod_mollie_description', __('Beschreibung der Zahlung', 'wpsg'), $this->get_option('wpsg_mod_mollie_description'), ['hint' => __('Erscheint auf dem Kontoauszug des Kunden, maximal 255 Zeichen. Platzhalter wie %order_id% oder %kunde_id% sind möglich.', 'wpsg')]); ?> + +<br /> + +<?php echo wpsg_drawForm_Select('wpsg_mod_mollie_successPage', __('Seite nach erfolgreicher Zahlung', 'wpsg'), $view['arPages'], $this->get_option('wpsg_mod_mollie_successPage')); ?> +<?php echo wpsg_drawForm_Select('wpsg_mod_mollie_errorPage', __('Seite nach fehlgeschlagener Zahlung', 'wpsg'), $view['arPages'], $this->get_option('wpsg_mod_mollie_errorPage')); ?> + +<br /> + +<?php echo wpsg_drawForm_Checkbox('wpsg_mod_mollie_autocapture', __('Autorisierte Zahlungen beim Versand einziehen', 'wpsg'), $this->get_option('wpsg_mod_mollie_autocapture'), ['hint' => __('Bei Methoden wie Klarna, Billie, Riverty oder in3 reserviert Mollie den Betrag zunächst nur. Ist die Option aktiv, wird er eingezogen, sobald die Bestellung auf "Ware versendet" wechselt. Sonst erfolgt der Einzug über die Bestellansicht.', 'wpsg')]); ?> + +<?php if ($view['hasAbo']) { ?> +<?php echo wpsg_drawForm_Checkbox('wpsg_mod_mollie_recurring', __('Abo-Verlängerungen automatisch einziehen', 'wpsg'), $this->get_option('wpsg_mod_mollie_recurring'), ['hint' => __('Die erste Zahlung eines Abos legt bei Mollie ein Mandat an, über das jede Verlängerung ohne Zutun des Kunden eingezogen wird. Möglich mit Kreditkarte, Apple Pay, Google Pay, PayPal, iDEAL, Bancontact und eps.', 'wpsg')]); ?> +<?php } ?> + +<br /> + +<?php echo wpsg_drawForm_Checkbox('wpsg_mod_mollie_debug', __('Debugmodus', 'wpsg'), $this->get_option('wpsg_mod_mollie_debug'), ['hint' => __('Schreibt die Kommunikation mit Mollie in das Bestellprotokoll.', 'wpsg')]); ?> + +<br /> + +<?php if (!$view['hasApiKey']) { ?> +<div class="wpsg_hinweis"><?php echo esc_html__('Es ist kein gültiger API-Schlüssel für die aktive Umgebung hinterlegt. Speichern Sie zuerst den Schlüssel, danach werden hier die bei Mollie freigeschalteten Zahlungsmethoden angezeigt.', 'wpsg'); ?></div> +<?php } else if (!wpsg_isSizedArray($view['arMollieMethods'])) { ?> +<div class="wpsg_hinweis"><?php echo esc_html__('Mollie hat keine freigeschalteten Zahlungsmethoden gemeldet. Prüfen Sie den API-Schlüssel und die Freischaltung im Mollie Dashboard.', 'wpsg'); ?></div> +<?php } ?> + +<br /> + +<?php foreach ($view['arMethods'] as $index => $arMethod) { ?> + + <?php + + $key_active = 'wpsg_mod_mollie_m'.$index.'_active'; + $bActive = ($this->get_option($key_active) === '1'); + + $method_id = (string)$arMethod['id']; + $method_min = (string)($view['arMollieMethods'][$method_id]['min'] ?? ''); + + // Methoden, die Mollie für dieses Konto nicht freigeschaltet hat, werden gekennzeichnet + $bAtMollie = (($method_id === '') || array_key_exists($method_id, (array)$view['arMollieMethods'])); + + $title = $arMethod['name']; + + if (!$bAtMollie) $title .= ' <span style="color:#a00;">('.esc_html__('bei Mollie nicht freigeschaltet', 'wpsg').')</span>'; + + ?> + + <?php echo wpsg_drawForm_AdminboxStart($title, 'wpsg_mod_mollie_m'.$index, ['collapsable' => true, 'collapsed' => !$bActive]); ?> + + <?php echo wpsg_drawForm_Checkbox($key_active, __('Zahlungsart aktiv', 'wpsg'), $this->get_option($key_active)); ?> + <?php echo wpsg_drawForm_Input('wpsg_mod_mollie_m'.$index.'_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_mollie_m'.$index.'_name'), ['placeholder' => $arMethod['name']]); ?> + <?php echo wpsg_drawForm_Textarea('wpsg_mod_mollie_m'.$index.'_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_mollie_m'.$index.'_hint')); ?> + <?php echo wpsg_drawForm_Input('wpsg_mod_mollie_m'.$index.'_fee', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_mollie_m'.$index.'_fee'), true), ['unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr']); ?> + <?php echo wpsg_drawForm_Select('wpsg_mod_mollie_m'.$index.'_tax_key', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_mollie_m'.$index.'_tax_key')); ?> + + <?php if ($method_min !== '') { ?> + <div class="wpsg_hinweis"><?php echo wpsg_translate(esc_html__('Mollie erlaubt diese Methode ab #1#.', 'wpsg'), esc_html($method_min).' '.esc_html($this->get_option('wpsg_mod_mollie_currency'))); ?></div> + <?php } ?> + + <?php echo wpsg_drawForm_AdminboxEnd(); ?> + +<?php } ?> + +<div class="wpsg_hinweis"><?php echo esc_html__('Welche Methoden Ihnen zur Verfügung stehen, entscheidet Ihr Mollie Dashboard. Logos und Betragsgrenzen werden bei jedem Speichern neu von Mollie gelesen.', 'wpsg'); ?></div> diff --git a/views/mods/mod_newsletter/checkout_customer_inner.phtml b/views/mods/mod_newsletter/checkout_customer_inner.phtml index 97c8ef4..1e5bf3e 100644 --- a/views/mods/mod_newsletter/checkout_customer_inner.phtml +++ b/views/mods/mod_newsletter/checkout_customer_inner.phtml @@ -8,6 +8,6 @@ ?>
<div class="wpsg_checkoutblock">
<label for="wpsg_mod_newsletter">
- <input class="wpsg_checkout" type="checkbox" id="wpsg_mod_newsletter" name="wpsg[checkout][wpsg_mod_newsletter]" value="1" <?php echo (($this->view['basket']['checkout']['wpsg_mod_newsletter'] == '1')?'checked="checked"':''); ?> /><?php echo __("Melden Sie sich hier für unseren Newsletter an.", "wpsg"); ?>
+ <input class="wpsg_checkout" type="checkbox" id="wpsg_mod_newsletter" name="wpsg[checkout][wpsg_mod_newsletter]" value="1" <?php echo ((($this->view['basket']['checkout']['wpsg_mod_newsletter'] ?? '') == '1')?'checked="checked"':''); ?> /><?php echo esc_html($this->view['wpsg_mod_newsletter']['consent']); ?>
</label>
</div>
\ No newline at end of file diff --git a/views/mods/mod_newsletter/customer_sidebar.phtml b/views/mods/mod_newsletter/customer_sidebar.phtml index 417098a..a41511c 100644 --- a/views/mods/mod_newsletter/customer_sidebar.phtml +++ b/views/mods/mod_newsletter/customer_sidebar.phtml @@ -1,18 +1,12 @@ -<div id="wpsg_customer_newsletter" class="postbox">
- <h3 class="wpsg_handlediv">
- <span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></span>
- <span><?php echo __('Newsletter', 'wpsg'); ?></span>
- </h3>
- <div class="inside">
+<?php echo wpsg_drawForm_AdminboxStart(__('Newsletter', 'wpsg')); ?>
<?php if ($this->view['wpsg_mod_newsletter']['found'] === true) { ?>
<input type="hidden" name="wpsg_mod_newsletter[abo_id]" value="<?php echo $this->view['wpsg_mod_newsletter']['abo_id']; ?>" />
- <?php echo wpsg_drawForm_Input('', __('Name', 'wpsg'), $this->view['wpsg_mod_newsletter']['name'], array('text' => true, 'nohspc' => true)); ?>
+ <?php echo wpsg_drawForm_Text(__('Name', 'wpsg'), $this->view['wpsg_mod_newsletter']['name']); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_newsletter[status]', __('Status', 'wpsg'), $this->view['wpsg_mod_newsletter']['arStatus'], $this->view['wpsg_mod_newsletter']['status']); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_newsletter[group_id]', __('Abonnentengruppe', 'wpsg'), $this->view['wpsg_mod_newsletter']['arGroups'], $this->view['wpsg_mod_newsletter']['groupIds'], array('multiple' => ((sizeof($this->view['wpsg_mod_newsletter']['arGroups']) > 5)?5:sizeof($this->view['wpsg_mod_newsletter']['arGroups'])))); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_newsletter[update]', __('Daten übernehmen', 'wpsg'), false); ?>
<?php } else { ?>
- <?php echo wpsg_drawForm_Input('', __('Status', 'wpsg'), $this->view['wpsg_mod_newsletter']['status'], array('text' => true, 'nohspc' => true)); ?>
+ <?php echo wpsg_drawForm_Text(__('Status', 'wpsg'), $this->view['wpsg_mod_newsletter']['status']); ?>
<?php } ?>
- </div>
-</div>
\ No newline at end of file +<?php echo wpsg_drawForm_AdminboxEnd(); ?>
\ No newline at end of file diff --git a/views/mods/mod_newsletter/settings_edit.phtml b/views/mods/mod_newsletter/settings_edit.phtml index def9fd9..d447582 100644 --- a/views/mods/mod_newsletter/settings_edit.phtml +++ b/views/mods/mod_newsletter/settings_edit.phtml @@ -5,11 +5,13 @@ */
?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_newsletter_key', __('Schlüssel der REST-Schnittstelle', 'wpsg'), $this->get_option('wpsg_mod_newsletter_key')); ?>
+
<?php if ($this->view['plugin_active'] !== true) { ?>
-<div class="wpsg_error"><br /><?php echo __('Das Modul ist nur mit aktiviertem wpNewsletterGermany Plugin funktionsfähig.', 'wpsg'); ?><br /></div>
+<div class="wpsg_error"><br /><?php echo esc_html($this->view['connection_state']); ?><br /></div>
<?php } else { ?>
- <?php echo wpsg_drawForm_Select('wpsg_mod_newsletter_groups[]', __('Gruppenzuordnung nach Registrierung', 'wpsg'), $this->view['arGroup'], (array)explode(',', $this->get_option('wpsg_mod_newsletter_groups')), array('help' => 'wpsg_mod_newsletter_groups','multiple' => ((sizeof($this->view['arGroup']) > 5)?5:sizeof($this->view['arGroup'])))); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_newsletter_groups', __('Gruppenzuordnung nach Registrierung', 'wpsg'), $this->view['arGroup'], (array)explode(',', $this->get_option('wpsg_mod_newsletter_groups')), array('help' => 'wpsg_mod_newsletter_groups','multiple' => ((sizeof($this->view['arGroup']) > 5)?5:sizeof($this->view['arGroup'])))); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_newsletter_action', __('Aktion', 'wpsg'), array('0' => __('Opt-In Mail versenden', 'wpsg'), '1' => __('Direkt anmelden', 'wpsg')), $this->get_option('wpsg_mod_newsletter_action'), array('help' => 'wpsg_mod_newsletter_action')); ?>
<div class="form-group form-group-sm form-select has-feedback">
@@ -20,7 +22,7 @@ <div class="wpsg_field_wrap">
<select class="form-control input-sm" size="<?php echo ((sizeof($this->view['arGroup']) > 5)?5:sizeof($this->view['arGroup'])); ?>" multiple="multiple" name="wpsg_mod_newsletter_imoprtgroups[]" id="wpsg_mod_newsletter_imoprtgroups">
<?php foreach ($this->view['arGroup'] as $group_id => $group) {?>
- <option value="<?php echo $group_id; ?>"><?php echo $group; ?></option>
+ <option value="<?php echo intval($group_id); ?>"><?php echo esc_html($group); ?></option>
<?php } ?>
</select>
<a class="glyphicon glyphicon glyphicon-question-sign form-control-feedback activated" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_newsletter_imoprtgroups" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_newsletter_imoprtgroups"></a>
@@ -57,7 +59,7 @@ strGroups = strGroups.substring(0, strGroups.length - 1);
- location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_newsletter&do=import&noheader=1&groups=' + strGroups;
+ location.href = '<?php echo esc_js(admin_url('admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_newsletter&do=import&noheader=1&groups=')); ?>' + strGroups;
} // function wpsg_doImport()
diff --git a/views/mods/mod_nlsatolo/settings_edit.phtml b/views/mods/mod_nlsatolo/settings_edit.phtml index 8ddb9ba..6edaee3 100644 --- a/views/mods/mod_nlsatolo/settings_edit.phtml +++ b/views/mods/mod_nlsatolo/settings_edit.phtml @@ -7,13 +7,13 @@ ?>
<?php if ($this->view['plugin_active'] !== true) { ?>
- <div class="wpsg_error"><br /><?php echo __('Das Modul ist nur mit aktiviertem Satollo Newsletter Plugin funktionsfaehig.', 'wpsg'); ?><br /></div>
+ <div class="wpsg_error"><br /><?php echo __('Das Modul ist nur mit aktiviertem Satollo Newsletter Plugin funktionsfähig.', 'wpsg'); ?><br /></div>
<?php } else { ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_nlsatolo_doubleoptin', __('Double Opt-In', 'wpsg'), array('0' => __('Nein', 'wpsg'), '1' => __('Ja', 'wpsg')), $this->get_option('wpsg_mod_nlsatolo_doubleoptin'), array('help' => 'wpsg_mod_nlsatolo_doubleoptin')); ?>
<?php /* Listen werden im Satolo-Newsletter-Plugin unter Subscribers > Listen erstellen > Listen angelegt*/ ?>
- <?php echo wpsg_drawForm_Select('wpsg_mod_nlsatolo_group', __('Gruppezuordnung nach Registrierung', 'wpsg'), $this->view['arLists'], $this->get_option('wpsg_mod_nlsatolo_group'), array('help' => 'wpsg_mod_nlsatolo_group')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_nlsatolo_group', __('Gruppenzuordnung nach Registrierung', 'wpsg'), $this->view['arLists'], $this->get_option('wpsg_mod_nlsatolo_group'), array('help' => 'wpsg_mod_nlsatolo_group')); ?>
<?php } ?>
\ No newline at end of file diff --git a/views/mods/mod_onepagecheckout/onepage.phtml b/views/mods/mod_onepagecheckout/onepage.phtml index b02f25c..213b62c 100644 --- a/views/mods/mod_onepagecheckout/onepage.phtml +++ b/views/mods/mod_onepagecheckout/onepage.phtml @@ -1,605 +1,605 @@ -<?php
-
- /**
- * Template für den Bestellablauf auf einer Seite
- */
-
-?>
-
-<script type="text/javascript">/* <![CDATA[ */
-
- jQuery(document).ready(function() {
-
- <?php if ($this->get_option('wpsg_form_validation') == '1') { ?>
-
- if (typeof jQuery.validationEngine == "object")
- {
-
- jQuery("#form-step2").validationEngine('attach', {promptPosition : "bottomLeft", scroll: false});
-
- jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function(){
- jQuery("#form-step2").validationEngine('detach');
- });
-
- }
-
- <?php } else if ($this->get_option('wpsg_form_validation') == '2') { ?>
-
- jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>");
- jQuery.validator.addClassRules('validate[required]', { cRequired: true } );
- jQuery("#form-step2").validate( {
- ignore: '',
- errorClass: 'wpsg_error',
- onsubmit: false,
- showErrors: function(errorMap, errorList) {
-
- this.defaultShowErrors();
-
- }
- } );
-
- jQuery('#wpsg_checkout2button').bind('click', function() {
-
- var bReturn = jQuery('#form-step2').validate().form();
- if (jQuery('#form-step2 input.wpsg_error').length > 0) jQuery('#form-step2 input.wpsg_error')[0].focus();
- return bReturn;
-
- } );
-
- <?php } ?>
-
- } );
-
-/* ]]> */</script>
-
-<div class="wpsg wpsg_onepagecheckout wpsg_checkout wpsg_checkout2 <?php echo ((isset($_REQUEST['wpsg_basket_ajax']))?'wpsg_basket_ajax':''); ?>">
-
- <?php echo $this->writeFrontendMessage(); ?>
-
- <?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?>
- <?php $GLOBALS['step'] = 2; $this->render(WPSG_PATH_VIEW.'/warenkorb/progress.phtml'); ?>
- <?php } ?>
- <form id="wpsg_basket_form" name="wpsg_basket_form" method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>" enctype="multipart/form-data">
-
- <?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 1) { ?>
- <?php $this->view['noFormTag'] = true; $this->render(WPSG_PATH_VIEW.'/warenkorb/basket.phtml'); ?>
- <?php } ?>
-
- <div class="wpsg_clear"></div>
-
- <div class="wpsg_box" id="wpsg_box_payship">
-
- <div class="wpsg_inner">
-
- <?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?>
- <div class="wpsg_shipping">
-
- <h2><?php echo __('Versandarten', 'wpsg'); ?></h2>
-
- <div class="shippay_wrap">
- <?php foreach ($this->view['arShipping'] as $s) { ?>
- <div class="shippay_item_wrap">
-
- <input <?php echo (($this->view['basket']['checkout']['shipping'] == $s['id'] || sizeof($this->view['arShipping']) == 1)?'checked="checked"':''); ?> type="radio" value="<?php echo $s['id']; ?>" name="wpsg[checkout][shipping]" id="shipping_<?php echo $s['id']; ?>" />
-
- <?php if (wpsg_isSizedString($s['logo'])) { ?>
- <img class="wpsg_payship_logo" src="<?php echo $s['logo']; ?>" alt="<?php echo $s['name']; ?>" />
- <?php } else { ?>
- <div class="wpsg_payship_name"><?php echo __($s['name'], 'wpsg'); ?></div>
- <?php } ?>
- <?php if ((isset($s['hint']) && trim($s['hint']) != '') || $s['price'] > 0) { ?>
- <div id="shipping_<?php echo $s['id']; ?>_hint" class="shippay_hint">
- <?php if ($s['price'] > 0) { ?>
- <?php echo __('Gebühr', 'wpsg'); ?>: <?php echo wpsg_ff($s['price'], $this->get_option('wpsg_currency')); ?><br />
- <?php } ?>
- <?php echo $this->replaceUniversalPlatzhalter(__($s['hint'], 'wpsg')); ?>
- </div>
- <?php } ?>
-
- <div class="shippay_checkmark"></div>
-
- </div>
- <?php } ?>
- </div>
-
- </div>
- <?php } ?>
-
- <?php if ($this->callMods('checkout_handlePayment') === true) { ?>
-
- <?php if (!$this->hasMod('wpsg_mod_crefopay')) { ?>
- <?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?>
- <div class="wpsg_payment">
-
- <h2><?php echo __('Zahlungsarten', 'wpsg'); ?></h2>
-
- <div class="shippay_wrap">
- <?php foreach ($this->view['arPayment'] as $p) { ?>
- <div class="shippay_item_wrap">
-
- <input <?php echo (($this->view['basket']['checkout']['payment'] == $p['id'] || sizeof($this->view['arPayment']) == 1)?'checked="checked"':''); ?> type="radio" value="<?php echo $p['id']; ?>" name="wpsg[checkout][payment]" id="payment_<?php echo $p['id']; ?>" />
-
- <div class="wpsg_payship_name"><?php echo __($p['name'], 'wpsg'); ?></div>
-
- <?php if (wpsg_isSizedString($p['logo'])) { ?>
- <img class="wpsg_payship_logo" src="<?php echo $p['logo']; ?>" alt="<?php echo $p['name']; ?>" />
- <?php } ?>
-
- <?php if ((isset($p['hint']) && trim($p['hint']) != '') || $p['preis'] > 0) { ?>
- <div id="payment_<?php echo $p['id']; ?>_hint" class="shippay_hint">
- <?php if ($p['preis'] > 0) { ?>
- <?php echo __('Gebühr', 'wpsg'); ?>: <?php echo wpsg_ff($p['preis'], $this->get_option('wpsg_currency')); ?><br />
- <?php } ?>
- <?php echo $this->replaceUniversalPlatzhalter(__($p['hint'], 'wpsg')); ?>
- </div>
- <?php } ?>
-
- <div class="shippay_checkmark"></div>
-
- </div>
- <?php } ?>
- </div>
-
- </div>
- <?php } ?>
- <?php } ?>
-
- <?php } ?>
-
- <div class="wpsg_clear"></div>
-
- </div>
-
- </div>
-
- <h2><?php echo __('Kundendaten', 'wpsg'); ?></h2>
-
- <?php if ($this->hasMod('wpsg_mod_kundenverwaltung') && $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutLogin') == '1') { ?>
- <div class="onepagecheckout_customer_login" style="border:1px solid #cecece; padding:20px; margin:20px 0;">
- <?php echo wpsg_drawForm_Checkbox('onepagecheckout_customer_login', __('Login für bestehenden Kundenaccount', 'wpsg'), $this->get_option('onepagecheckout_customer_login')); ?>
- <div class="onepagecheckout_customer_login_activ" style="display:none; margin:20px 0;">
- <?php $this->callMod('wpsg_mod_kundenverwaltung', 'checkout_login'); ?>
- </div>
- </div>
- <?php } ?>
-
- <?php if (($this->hasMod('wpsg_mod_kundenverwaltung') && $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegister') == '1') || ($this->hasMod('wpsg_mod_kundenverwaltung') && $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang') == '1')) { ?>
- <div class="onepagecheckout_customer_registration" style="border:1px solid #cecece; padding:20px; margin:20px 0;">
- <?php echo wpsg_drawForm_Checkbox('onepagecheckout_customer_registration', __('neuen Kundenaccount registrieren', 'wpsg'), $this->get_option('onepagecheckout_customer_registration')); ?>
- <div class="onepagecheckout_customer_registration_activ" style="display:none; margin:20px 0;">
- <?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'checkout_customer_inner'); ?>
- </div>
- </div>
- <?php } ?>
-
- <div class="onepagecheckout_customer_guest" style="border:1px solid #cecece; padding:20px; margin:20px 0;">
- <div class="onepagecheckout_customer_guest_label"><?php echo wpsg_drawForm_Checkbox('onepagecheckout_customer_guest', __('Als Gast bestellen', 'wpsg'), $this->get_option('onepagecheckout_customer_guest')); ?></div>
- <div class="onepagecheckout_customer_guest_activ" style="display:none; margin:20px 0;">
-
- <div class="wpsg_box" id="wpsg_box_kundendaten">
-
- <div class="wpsg_inner">
-
- <?php if ($this->view['pflicht']['firma'] != '2') { ?>
- <div class="wpsg_checkoutblock">
- <label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
- <?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
- </label>
- <input class="<?php echo (($this->view['pflicht']['firma'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("firma", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_firma" name="wpsg[checkout][firma]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['firma']); ?>" />
- </div>
- <?php } ?>
-
- <?php if ($this->view['pflicht']['anrede'] != '2') { ?>
- <div class="wpsg_checkoutblock">
- <label for="wpsg_title"><?php echo __('Anrede', 'wpsg'); ?>
- <?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label>
- <select class="<?php echo (($this->view['pflicht']['anrede'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_title" name="wpsg[checkout][title]">
- <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
- <?php $i=0; foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
- <option value="<?php echo $i; /*wpsg_hspc($t);*/ $i++; ?>" <?php echo (($this->view['basket']['checkout']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
- <?php } ?>
- </select>
- </div>
- <?php } ?>
-
- <?php if ($this->view['pflicht']['vname'] != '2') { ?>
- <div class="wpsg_checkoutblock">
- <label for="vname" class="wpsg_checkout"><?php echo __("Vorname", "wpsg"); ?>
- <?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
- </label>
- <input class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("vname", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="vname" name="wpsg[checkout][vname]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['vname']); ?>" />
- </div>
- <?php } ?>
-
- <?php if ($this->view['pflicht']['name'] != '2') { ?>
- <div class="wpsg_checkoutblock">
- <label for="name" class="wpsg_checkout"><?php echo __("Name", "wpsg"); ?>
- <?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
- </label>
- <input class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="name" name="wpsg[checkout][name]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['name']); ?>" />
- </div>
- <?php } ?>
-
- <?php if ($this->view['pflicht']['email'] != '2') { ?>
- <div class="wpsg_checkoutblock">
- <label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?>
- <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
- </label>
- <input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email" name="wpsg[checkout][email]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['email']); ?>" />
- </div>
- <?php } ?>
-
- <?php if (isset($this->view['pflicht']['emailconfirm']) && $this->view['pflicht']['emailconfirm'] == '1') { ?>
- <div class="wpsg_checkoutblock">
- <label for="email" class="wpsg_checkout"><?php echo __("E-Mail (Wiederholung)", "wpsg"); ?>
- <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
- </label>
- <input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email2" name="wpsg[checkout][email2]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['email2']); ?>" />
- </div>
- <?php } ?>
-
- <?php if ($this->view['pflicht']['geb'] != '2') { ?>
- <div class="wpsg_checkoutblock">
- <label for="geb" class="wpsg_checkout"><?php echo __('Geburtsdatum (Format: TT.MM.JJJJ)',"wpsg"); ?>
- <?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
- </label>
- <input class="wpsg_input_text <?php echo (($this->view['pflicht']['geb'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("geb", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="geb" name="wpsg[checkout][geb]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['geb']); ?>" />
- </div>
- <?php } ?>
-
- <?php if ($this->view['pflicht']['fax'] != '2') { ?>
- <div class="wpsg_checkoutblock">
- <label for="fax" class="wpsg_checkout"><?php echo __("Fax.", "wpsg"); ?>
- <?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
- </label>
- <input class="wpsg_input_text <?php echo (($this->view['pflicht']['fax'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("fax", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="fax" name="wpsg[checkout][fax]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['fax']); ?>" />
- </div>
- <?php } ?>
-
- <?php if ($this->view['pflicht']['tel'] != '2') { ?>
- <div class="wpsg_checkoutblock">
- <label for="tel" class="wpsg_checkout"><?php echo __("Tel.", "wpsg"); ?>
- <?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
- </label>
- <input class="wpsg_input_text <?php echo (($this->view['pflicht']['tel'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("tel", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="tel" name="wpsg[checkout][tel]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['tel']); ?>" />
- </div>
- <?php } ?>
-
- <?php if ($this->view['pflicht']['strasse'] != '2') { ?>
-
- <?php if ($this->view['pflicht']['wpsg_showNr'] === '1') { ?>
-
- <div class="wpsg_checkoutblock" id="wpsg_streetnr">
- <label for="strasse" class="street wpsg_checkout"><?php echo __('Straße:', 'wpsg'); ?>
- <?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
- <input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="strasse" name="wpsg[checkout][strasse]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['strasse'])); ?>" />
- </label>
- <label for="nr" class="nr wpsg_checkout"><?php echo __('Nr:', 'wpsg'); ?>
- <?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
- <input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("nr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="nr" name="wpsg[checkout][nr]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['nr'])); ?>" />
- </label>
- </div>
-
- <?php } else { ?>
-
- <div class="wpsg_checkoutblock">
- <label for="strasse" class="wpsg_checkout"><?php echo __("Straße Nr.", "wpsg"); ?>
- <?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
- </label>
- <input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="strasse" name="wpsg[checkout][strasse]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['strasse']); ?>" />
- </div>
-
- <?php } ?>
-
- <?php } ?>
-
- <?php if ($this->view['pflicht']['plz'] != '2') { ?>
- <div class="wpsg_checkoutblock">
- <label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl", "wpsg"); ?>
- <?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
- </label>
- <input class="wpsg_input_text <?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="plz" name="wpsg[checkout][plz]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['plz']); ?>" />
- </div>
- <?php } ?>
-
- <?php if ($this->view['pflicht']['ort'] != '2') { ?>
- <div class="wpsg_checkoutblock">
- <label for="ort" class="wpshopgermany_checkout"><?php echo __("Ort", "wpsg"); ?>
- <?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
- </label>
- <input class="<?php echo (($this->view['pflicht']['ort'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ort", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="ort" name="wpsg[checkout][ort]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['ort']); ?>" />
- </div>
- <?php } ?>
-
- <?php
- $lhidden = '';
- if ($this->hasMod('wpsg_mod_onepagecheckout') && ($this->get_option('wpsg_mod_onepagecheckout_basket') == 1 )) {
- $lhidden = 'hidden="hidden"';
- }
- ?>
-
- <?php if ($this->view['pflicht']['land'] != '2') { ?>
- <div class="wpsg_checkoutblock" <?php echo $lhidden;?>>
- <label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land", "wpsg"); ?>
- <?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
- </label>
- <select name="wpsg[checkout][land]" class="<?php echo (($this->view['pflicht']['land'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_land">
- <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
- <?php foreach ($this->view['laender'] as $l) { ?>
- <option value="<?php echo wpsg_hspc($l['id']); ?>" <?php echo (($l['id'] == $this->view['basket']['checkout']['land'])?'selected="selected"':(($this->get_option('wpsg_defaultland') == $l['id'])?'selected="selected"':'')); ?>><?php echo wpsg_hspc(__($l['name'], 'wpsg')); ?></option>
- <?php } ?>
- </select>
- </div>
- <?php } ?>
-
- <?php if ($this->view['pflicht']['ustidnr'] != '2') { ?>
- <div class="wpsg_checkoutblock">
- <label for="wpsg_ustidnr" class="wpshopgermany_checkout"><?php echo __("UStIdNr.", "wpsg"); ?>
- <?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
- </label>
- <input class="<?php echo (($this->view['pflicht']['ustidnr'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ustidnr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_ustidnr" name="wpsg[checkout][ustidnr]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['ustidnr'])); ?>" />
- </div>
- <?php } ?>
-
- <?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
- <?php if ($this->get_option('wpsg_kundenvariablen_show') == '1') { ?>
- <?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
- <div class="wpsg_checkoutblock">
- <label class="wpsg_cv" for="wpsg_cv_<?php echo $c_id; ?>">
- <?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
- <?php if ($c['typ'] == '0') { // Textfeld ?>
- <input class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[checkout][custom][<?php echo $c_id; ?>]" type="text" value="<?php if (isset($this->view['basket']['checkout']['custom'][$c_id])) echo wpsg_hspc($this->view['basket']['checkout']['custom'][$c_id]); ?>" />
- <?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
- <select class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[checkout][custom][<?php echo $c_id; ?>]">
- <option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
- <?php foreach ((array)$arAuswahl as $a) { ?>
- <option value="<?php echo wpsg_hspc($a); ?>" <?php if (isset($this->view['basket']['checkout']['custom'][$c_id])) echo (($a == $this->view['basket']['checkout']['custom'][$c_id])?'selected="selected"':''); ?>><?php echo wpsg_hspc($a); ?></option>
- <?php } ?>
- </select>
- <?php } else if ($c['typ'] == '2') { // Checkbox ?>
- <input type="hidden" name="wpsg[checkout][custom][<?php echo $c_id; ?>]" value="0" />
- <input class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> checkbox" type="checkbox" value="1" name="wpsg[checkout][custom][<?php echo $c_id; ?>]" value="1" <?php if(isset($this->view['basket']['checkout']['custom'][$c_id])) echo wpsg_hspc(($this->view['basket']['checkout']['custom'][$c_id] == '1')?'checked="checked"':''); ?> />
- <?php } ?>
- </label>
- </div>
- <?php } } ?>
- <?php } ?>
- <?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
-
- <div class="wpsg_clear"></div>
-
- <?php /* $this->callMods('checkout_customer_inner'); */ ?>
-
- <br />
-
- <?php $this->callMods('checkout_inner_prebutton', array(&$this->view)); ?>
-
- <div class="wpsg_box">
-
- <h2><?php echo __('Bestellkommentar', 'wpsg'); ?></h2>
-
- <div class="wpsg_spacer"></div>
-
- <div class="wpsg_inner wpsg_commentblock">
- <textarea name="wpsg[checkout][comment]" id="wpsg_checkout_comment"><?php echo wpsg_hspc($this->view['basket']['checkout']['comment']); ?></textarea>
- </div>
- </div>
-
- <div class="wpsg_mandatoryfield_hint">
- <?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
- </div>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
-
- <br />
-
- <?php /* Abfrage Satollo-Newsletter */ ?>
- <?php echo $this->callMod('wpsg_mod_nlsatolo', 'checkout_customer_inner'); ?>
-
- <?php /* Einverständnisabfrage Trusted Shops */ ?>
- <?php echo $this->callMod('wpsg_mod_trustedshops', 'checkout_customer_inner'); ?>
-
- <div class="wpsg_clear"></div>
-
- <br />
-
- <?php $this->ClearSessionErrors(); ?>
-
- <br />
-
- <?php if ($this->get_option('wpsg_mod_onepagecheckout_basket') == 0) { ?>
- <input type="submit" onclick="location.href='<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>'; return false;" class="wpsg_button wpsg_basketbutton" value="<?php echo __('Zurück zum Warenkorb', 'wpsg'); ?>" name="wpsg_redirect_basket" />
- <?php } ?>
- <input type="submit" id="wpsg_checkout2button" class="wpsg_button wpsg_checkout2button" value="<?php echo __('Weiter', 'wpsg'); ?>" name="wpsg_checkout" />
-
- <div class="wpsg_clear"></div>
-
- <br />
-
- </form>
-
- <script type="text/javascript">/* <![CDATA[ */
-
- function wpsg_setShipPay(jqElement)
- {
-
- jqElement.parents('.shippay_wrap').find('.shippay_item_wrap').removeClass('shippay_active');
- jqElement.addClass('shippay_active');
-
- jqElement.find('input').prop('checked', true);
-
- return true;
-
- }
-
- jQuery(document).ready(function() {
-
- jQuery('#onepagecheckout_customer_login').bind('change', function() {
-
- if (jQuery(this).is(':checked')) {
-
- jQuery('.onepagecheckout_customer_login_activ').show();
- jQuery('.onepagecheckout_customer_guest_label').hide();
- jQuery('.onepagecheckout_customer_registration').hide();
-
- } else {
-
- jQuery('.onepagecheckout_customer_login_activ').hide();
- jQuery('.onepagecheckout_customer_guest_label').show();
- jQuery('.onepagecheckout_customer_registration').show();
-
- }
-
- } ).change();
-
- jQuery('#onepagecheckout_customer_registration').bind('change', function() {
-
- if (jQuery(this).is(':checked')) {
-
- jQuery('.onepagecheckout_customer_registration_activ, .onepagecheckout_customer_guest_activ').show();
- jQuery('.onepagecheckout_customer_login').hide();
- jQuery('.onepagecheckout_customer_guest_label').hide();
-
- } else {
-
- jQuery('.onepagecheckout_customer_registration_activ, .onepagecheckout_customer_guest_activ').hide();
- jQuery('.onepagecheckout_customer_login').show();
- jQuery('.onepagecheckout_customer_guest_label').show();
-
- }
-
- } ).change();
-
- jQuery('#onepagecheckout_customer_guest').bind('change', function() {
-
- if (jQuery(this).is(':checked')) {
-
- jQuery('.onepagecheckout_customer_guest_activ').show();
- jQuery('.onepagecheckout_customer_login').hide();
- jQuery('.onepagecheckout_customer_registration').hide();
-
- } else {
- jQuery('.onepagecheckout_customer_guest_activ').hide();
- jQuery('.onepagecheckout_customer_login').show();
- jQuery('.onepagecheckout_customer_registration').show();
- }
-
- } ).change();
-
- jQuery('.shippay_wrap .shippay_item_wrap').bind('click', function() {
-
- wpsg_setShipPay(jQuery(this));
-
- jQuery.ajax( {
- 'url': wpsg_ajax.ajaxurl,
- 'method': 'get',
- 'data': {
- 'wpsg[action]': 'updateCheckout',
- 'wpsg_form_data': jQuery('#wpsg_checkout_form').serialize()
- },
- 'async': true,
- 'success': function(data) { }
- } );
-
- } );
-
- jQuery('.shippay_wrap .shippay_item_wrap').each(function() {
-
- if (jQuery(this).find('input[type="radio"]').prop('checked')) wpsg_setShipPay(jQuery(this));
-
- } );
-
- jQuery('#wpsg_box_kundendaten input').bind('keypress', function(e) {
-
- if(e.keyCode == 13)
- {
-
- jQuery('#wpsg_checkout2button').click();
- return false;
-
- }
-
- } );
-
- jQuery('.shippay input[type="radio"]').bind('change', function() {
-
- jQuery(this).parents('.shippay_wrap').find('.shippay').removeClass('wpsg_hover');
-
- if (jQuery(this).prop("checked"))
- {
-
- jQuery(this).parents('.shippay').addClass('wpsg_hover');
-
- }
-
- wpsg_showPaymentHint();
- wpsg_showShippingHint();
-
- } );
-
- jQuery('.shippay input[type="radio"]:checked').change();
- jQuery('.shippay').bind('click', function(e) {
-
- if (jQuery(this).hasClass('wpsg_hover')) return true;
-
- jQuery(this).find('input[type="radio"]').attr("checked", "checked");
- jQuery(this).find('input[type="radio"]').change();
-
- } );
-
- <?php if ($this->get_option('wpsg_form_validation') == '1') { ?>
- if (typeof jQuery.validationEngine == "object")
- {
-
- jQuery("#wpsg_basket_form").validationEngine('attach', { promptPosition : "bottomLeft", scroll: false } );
-
- jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function() {
- jQuery("#wpsg_basket_form").validationEngine('detach');
- });
-
- }
- <?php } else if ($this->get_option('wpsg_form_validation') == '2') { ?>
-
- jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>");
- jQuery.validator.addClassRules('validate[required]', { cRequired: true } );
- jQuery("#wpsg_basket_form").validate( {
- ignore: '',
- errorClass: 'wpsg_error',
- onsubmit: false,
- showErrors: function(errorMap, errorList) {
-
- this.defaultShowErrors();
- var errors = this.numberOfInvalids();
-
- }
- } );
-
- jQuery('.wpsg_checkout2button').bind('click', function() {
-
- var bReturn = jQuery('#wpsg_basket_form').validate().form();
- if (jQuery('#wpsg_basket_form input.wpsg_error').length > 0) jQuery('#wpsg_basket_form input.wpsg_error')[0].focus();
- return bReturn;
-
- } );
-
- <?php } ?>
-
- land = <?php if (wpsg_isSizedInt($this->view['basket']['checkout']['land'])) echo $this->view['basket']['checkout']['land'];
- else echo $this->get_option('wpsg_defaultland'); ?>;
-
- // Land der Rechnungsadresse setzen
- //land = jQuery('#set_land').val();
- jQuery('#wpsg_land').val(land);
- //alert('land: ' + land);
-
- } );
-
- /* ]]> */</script>
-
+<?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; ?>" <?php echo ((strval($this->view['basket']['checkout']['title'] ?? '-1') === strval($i))?'selected="selected"':''); $i++; ?>><?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..483338b 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. Solange dieses Modul aktiv ist, zeigt die zugeordnete Seite noch den alten Bestellablauf. Richten Sie den SmartCheckout ein und deaktivieren Sie danach dieses Modul.', '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/list.phtml b/views/mods/mod_ordercondition/list.phtml index 00f5535..d68b1f5 100644 --- a/views/mods/mod_ordercondition/list.phtml +++ b/views/mods/mod_ordercondition/list.phtml @@ -153,6 +153,12 @@ /* ]]> */</script>
+ <?php echo wpsg_drawForm_Checkbox('garan_exclude_'.$oc['id'], __('Schließt Gewährleistungslabel aus', 'wpsg'), $oc['garan_exclude'], array(
+ 'noHidden' => true,
+ 'inlineEdit' => true,
+ 'inlineEdit_url' => WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1&field=garan_exclude&oc_id='.$oc['id']
+ )); ?>
+
<div class="wpsg_mod_ordercondition_shipping_<?php echo $oc['id']; ?>" style="display:<?php echo (($oc['typ'] === '3')?'block':'none'); ?>;">
<?php echo wpsg_drawForm_TextStart(); ?>
<span class="wpsg_editable" id="oc_shipping_<?php echo $oc['id']; ?>"><?php
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_orderstates/settings_edit.phtml b/views/mods/mod_orderstates/settings_edit.phtml index 2e2896c..d9e8ab6 100644 --- a/views/mods/mod_orderstates/settings_edit.phtml +++ b/views/mods/mod_orderstates/settings_edit.phtml @@ -20,7 +20,7 @@ <template v-if="arStatesNotDeleted.length === 0">
<?php echo __('Keine Bestellzustände angelegt.', 'wpsg'); ?>
</template>
- <template v-if="arStatesNotDeleted.length === 1">
+ <template v-else-if="arStatesNotDeleted.length === 1">
<?php echo __('Ein Bestellzustand wurde definiert.', 'wpsg'); ?>
</template>
<template v-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_orderupload/settings_edit.phtml b/views/mods/mod_orderupload/settings_edit.phtml index 3f810a9..60584ca 100644 --- a/views/mods/mod_orderupload/settings_edit.phtml +++ b/views/mods/mod_orderupload/settings_edit.phtml @@ -7,12 +7,6 @@ ?>
<br/>
-<?php /* Upload pro Produkt oder pro Bestellung */ ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_orderupload__mode', __('Upload-typ', 'wpsg'), array(
- wpsg_mod_orderupload::MODE_ORDER => __('Upload pro Bestellung', 'wpsg'),
- wpsg_mod_orderupload::MODE_PRODUCT => __('Upload pro Produkt', 'wpsg')
-), $this->get_option('wpsg_mod_orderupload_mode'), array('help' => 'wpsg_mod_orderupload_mode')); ?>
-
<?php /* Platzhalter für Dateiname */ ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_orderupload_filename', __('Neuer Dateiname', 'wpsg'), $this->get_option('wpsg_mod_orderupload_filename'), array('help' => 'wpsg_mod_orderupload_filename')); ?>
@@ -23,7 +17,7 @@ <?php /* maximale Upload-Größe */?>
<?php echo wpsg_drawForm_Input('wpsg_mod_orderupload_maxweight', __('maximale Größe des Uploads (Angaben in MB)', 'wpsg'), $this->get_option('wpsg_mod_orderupload_maxweight'), array('help' => 'wpsg_mod_orderupload_maxweight'));?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_orderupload_maxweight_text', __('Text bei Überschreiten der max. Uploadgrenze', 'wpsg'), $this->get_option('wpsg_mod_orderupload_maxweight_text'), array('help' => '"wpsg_mod_orderupload_text')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_orderupload_maxweight_text', __('Text bei Überschreiten der max. Uploadgrenze', 'wpsg'), $this->get_option('wpsg_mod_orderupload_maxweight_text'), array('help' => 'wpsg_mod_orderupload_maxweight_text')); ?>
<br />
<?php /* mehrere Dateien */?>
diff --git a/views/mods/mod_orderupload/smartcheckout_checkout.phtml b/views/mods/mod_orderupload/smartcheckout_checkout.phtml new file mode 100644 index 0000000..7da51cb --- /dev/null +++ b/views/mods/mod_orderupload/smartcheckout_checkout.phtml @@ -0,0 +1,77 @@ +<?php + + /** + * Template für den Bestellupload im SmartCheckout + * + * Aufbau und Verhalten wie beim Upload zum Produkt (smartcheckout_row.phtml): Dateiliste mit Größe und + * Löschen, darunter die Dateiauswahl. Die Datei wird direkt nach der Auswahl hochgeladen (data-sc-upload, + * siehe smartcheckout.js), entfernt wird über data-sc-send, beides landet in + * wpsg_mod_orderupload::smartcheckout_ajax(). Der Block wird bei jeder Antwort neu geliefert. + */ + + $arUploads = (array)($_SESSION['wpsg']['wpsg_mod_orderupload'] ?? []); + $uploadsum = floatval($this->view['wpsg_mod_orderupload']['uploadsum'] ?? 0); + $maxweight = (string)($this->view['wpsg_mod_orderupload']['maxweight'] ?? ''); + $bRequired = ($this->get_option('wpsg_mod_orderupload_optional') != '1'); + $bMulti = ($this->get_option('wpsg_mod_orderupload_multifiles') == '1'); + $arMessages = (array)($this->view['wpsg_mod_orderupload']['messages'] ?? []); + $arAllowed = (array)($this->view['wpsg_mod_orderupload']['allowedext'] ?? []); + $strAccept = implode(',', array_map(function($ext) { return '.'.$ext; }, $arAllowed)); + +?> +<div class="sc_orderupload"> + + <h2 class="sc_title"><?php echo esc_html__('Dateiupload', 'wpsg'); ?><?php if ($bRequired) { ?><span class="sc_required" aria-hidden="true">*</span><?php } ?></h2> + + <div class="sc_upload"> + + <div class="sc_upload_label"><?php echo esc_html__('Upload zur Bestellung', 'wpsg'); ?></div> + + <div class="sc_upload_target"> + + <?php /* Meldungen des letzten Uploads bzw. Entfernens, wie beim Upload zum Produkt direkt am Block */ ?> + <?php foreach ($arMessages as $message) { ?> + <div class="sc_upload_message sc_upload_message_<?php echo esc_attr($message['type']); ?>"><?php echo wp_kses_post($message['text']); ?></div> + <?php } ?> + + <?php if (wpsg_isSizedArray($arUploads)) { ?> + <ul> + <?php foreach ($arUploads as $ou_index => $ou) { ?> + <li> + <a href="<?php echo esc_url($ou[2]); ?>" target="_blank" rel="noopener"><?php echo wpsg_hspc($ou[0]); ?> <span class="size">(<?php echo esc_html(wpsg_formatSize($ou[3])); ?>)</span></a> + <a + href="#" + class="removeLink" + role="button" + data-sc-send="wpsg_mod_orderupload_remove" + data-sc-value="<?php echo intval($ou_index); ?>" + data-sc-confirm="<?php echo esc_attr__('Sind Sie sich sicher, dass Sie dieses Dokument aus der Bestellung entfernen möchten?', 'wpsg'); ?>" + title="<?php echo esc_attr__('Upload entfernen.', 'wpsg'); ?>" + ><img src="<?php echo esc_url(WPSG_URL.'views/gfx/bin_x.png'); ?>" alt="<?php echo esc_attr__('Löschen', 'wpsg'); ?>" /></a> + </li> + <?php } ?> + </ul> + <?php } ?> + + <?php if ($uploadsum > 0) { ?> + <input + type="file" + name="wpsg_mod_orderupload_file<?php echo (($bMulti)?'[]':''); ?>" + data-sc-upload="1" + data-sc-upload-wait="<?php echo esc_attr__('Bitte warten ', 'wpsg'); ?>" + <?php if ($strAccept !== '') { ?>accept="<?php echo esc_attr($strAccept); ?>"<?php } ?> + <?php echo (($bMulti)?'multiple="multiple"':''); ?> + aria-label="<?php echo esc_attr__('Upload zur Bestellung', 'wpsg'); ?>" + /> + <?php } ?> + + </div> + + <div class="sc_hint"><?php echo esc_html(wpsg_translate(__('Es stehen Ihnen #1# Mb von #2# Mb für den Upload zur Verfügung', 'wpsg'), $uploadsum, $maxweight)); ?></div> + <?php if (wpsg_isSizedArray($arAllowed)) { ?> + <div class="sc_hint"><?php echo esc_html(wpsg_translate(__('Erlaubte Dateiendungen: #1#', 'wpsg'), implode(', ', $arAllowed))); ?></div> + <?php } ?> + + </div> + +</div> diff --git a/views/mods/mod_orderupload/smartcheckout_row.phtml b/views/mods/mod_orderupload/smartcheckout_row.phtml new file mode 100644 index 0000000..66986f9 --- /dev/null +++ b/views/mods/mod_orderupload/smartcheckout_row.phtml @@ -0,0 +1,21 @@ +<?php + + /** + * Template für den Upload zum Produkt an einer Warenkorbposition im SmartCheckout + * + * Das Ziel trägt dieselbe ID wie im klassischen Warenkorb, die Scripte aus basket_after.phtml + * ersetzen seinen Inhalt nach dem Hochladen bzw. Löschen. + */ + + $product_index = $this->view['wpsg_mod_orderupload']['product_index']; + +?> +<div class="sc_upload"> + + <div class="sc_upload_label"><?php echo esc_html__('Upload zum Produkt', 'wpsg'); ?></div> + + <div id="wpsg_mod_orderupload_<?php echo intval($product_index); ?>_target" class="wpsg_mod_orderupload_target sc_upload_target"> + <?php echo $this->view['wpsg_mod_orderupload']['strHTMLTarget']; ?> + </div> + +</div> diff --git a/views/mods/mod_ordervars/checkout_inner_prebutton.phtml b/views/mods/mod_ordervars/checkout_inner_prebutton.phtml index fb109a3..99b6c08 100644 --- a/views/mods/mod_ordervars/checkout_inner_prebutton.phtml +++ b/views/mods/mod_ordervars/checkout_inner_prebutton.phtml @@ -13,27 +13,26 @@ <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']; ?>">
- <?php echo $this->callMod('wpsg_mod_ordervars', 'getNameById', array($ov['id'])); ?>
- <?php if ($ov['pflicht'] == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ <?php echo $this->callMod('wpsg_mod_ordervars', 'getNameById', array($ov['id'])); ?><?php if ($ov['pflicht'] == '1') { ?> <span class="wpsg_required">*</span><?php } ?>:
</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_packagetracking/settings_edit_list.phtml b/views/mods/mod_packagetracking/settings_edit_list.phtml index 46b1f1b..7e5ed7c 100644 --- a/views/mods/mod_packagetracking/settings_edit_list.phtml +++ b/views/mods/mod_packagetracking/settings_edit_list.phtml @@ -6,7 +6,7 @@ ?>
<?php if (wpsg_isSizedArray($this->view['wpsg_mod_packagetracking']['provider'])) { ?>
-<table class="trackingprovider_table" style="table-layout:fixed; width:75rem;">
+<table class="trackingprovider_table" style="table-layout:fixed; width:100%; max-width:75rem;">
<colgroup>
<col class="wpsg_label" />
<col class="wpsg_value" />
@@ -31,7 +31,7 @@ </tr>
<tr>
<td class="wpsg_label"><?php echo __('Url', 'wpsg'); ?>:</td>
- <td class="wpsg_value wpsg_editable" id="tp_<?php echo $p['id']; ?>_url"><?php echo $p['url']; ?></td>
+ <td class="wpsg_value wpsg_editable" style="overflow-wrap:anywhere;" id="tp_<?php echo $p['id']; ?>_url"><?php echo $p['url']; ?></td>
<td class="wpsg_delcol">
<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" data-wpsg-tip="wpsg_mod_packagetracking_url" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_mod_packagetracking_url" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_mod_packagetracking_url"></a>
@@ -79,4 +79,4 @@ <?php } ?>
<br /><br />
-<a href="#" onclick="return wpsg_mod_packagetracking_add();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span>Neuen Anbieter anlegen</a>
+<a href="#" onclick="return wpsg_mod_packagetracking_add();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neuen Anbieter anlegen', 'wpsg'); ?></a>
diff --git a/views/mods/mod_paypal/order_done.phtml b/views/mods/mod_paypal/order_done.phtml index 12f66a7..9f45680 100644 --- a/views/mods/mod_paypal/order_done.phtml +++ b/views/mods/mod_paypal/order_done.phtml @@ -1,39 +1,48 @@ <?php
/**
- * Dieses Template wird nach einer PayPal Zahlung angezeigt
+ * Dieses Template wird nach dem Bestellabschluss mit der Zahlungsart PayPal angezeigt
*/
+ if (!defined('ABSPATH')) exit;
+
+ $bDone = (($this->view['wpsg_mod_paypal']['done']??'') === '1');
+ $strLink = (string)($this->view['paypalLink']??'');
+
?>
-<?php if (!wpsg_isSizedInt($this->view['wpsg_mod_paypal']['done'])) { ?>
-
- <p><?php echo __('Um den Betrag mit PayPal zu bezahlen klicken Sie bitte auf folgendes Logo.', 'wpsg'); ?></p>
-
+<?php if (!$bDone) { ?>
+
+ <p><?php echo esc_html__('Um den Betrag mit PayPal zu bezahlen klicken Sie bitte auf folgendes Logo.', 'wpsg'); ?></p>
+
<p>
- <a title="<?php echo __('Mit PayPal bezahlen', 'wpsg'); ?>" href="<?php echo $this->view['paypalLink']; ?>">
- <img src="<?php echo $this->getRessourceURL('mods/mod_paypal/gfx/pp-logo-big.png'); ?>" align="left" alt="<?php echo __('Mit PayPal bezahlen', 'wpsg'); ?>" style="margin-right:7px;">
+ <a title="<?php echo esc_attr__('Mit PayPal bezahlen', 'wpsg'); ?>" href="<?php echo esc_url($strLink); ?>">
+ <img src="<?php echo esc_url($this->getRessourceURL('mods/mod_paypal/gfx/pp-logo-big.png')); ?>" align="left" alt="<?php echo esc_attr__('Mit PayPal bezahlen', 'wpsg'); ?>" style="margin-right:7px;">
</a>
</p>
-
+
<?php if ($this->get_option('wpsg_mod_paypal_autostart') == '1') { ?>
-
+
<script>
-
- jQuery(document).ready(function() {
+
+ jQuery(document).ready(function() {
+
window.setTimeout(function() {
- location.href = "<?php echo $this->view['paypalLink']; ?>";
+
+ location.href = <?php echo wp_json_encode($strLink); ?>;
+
}, 1000);
- } );
-
+
+ });
+
</script>
-
+
<?php } ?>
-
+
<?php } else { ?>
<p>
- <?php echo __('Die Zahlung wurde bereits mit PayPal abgeschlossen.', 'wpsg'); ?>
+ <?php echo esc_html__('Die Zahlung wurde bereits mit PayPal abgeschlossen.', 'wpsg'); ?>
</p>
<?php } ?>
diff --git a/views/mods/mod_paypal/order_view_afterpayment.phtml b/views/mods/mod_paypal/order_view_afterpayment.phtml index af7c067..20bbfd2 100644 --- a/views/mods/mod_paypal/order_view_afterpayment.phtml +++ b/views/mods/mod_paypal/order_view_afterpayment.phtml @@ -3,32 +3,64 @@ /**
* Template für die Integration der PayPal Zahlungsart in die Bestellverwaltung
*/
-
- $wpsg_mod_paypal_paymentid = $this->view['oOrder']->getMeta('wpsg_mod_paypal_paymentid');
- $wpsg_mod_paypal_saleid = $this->view['oOrder']->getMeta('wpsg_mod_paypal_saleid');
-
+
+ if (!defined('ABSPATH')) exit;
+
+ $oOrder = $this->view['oOrder'];
+
+ $strPaymentID = (string)$oOrder->getMeta(wpsg_mod_paypal::META_PAYPAL_ID);
+ $strPaymentState = strtolower((string)$oOrder->getMeta(wpsg_mod_paypal::META_STATE));
+ $strSaleID = (string)$oOrder->getMeta(wpsg_mod_paypal::META_CAPTURE_ID);
+ $bLegacy = ((string)$oOrder->getMeta(wpsg_mod_paypal::META_API) !== 'v2');
+
+ // Farbe des Status: eingezogen grün, offen gelb, abgebrochen rot
+ $arStateClass = [
+ 'completed' => 'success',
+ 'approved' => (($bLegacy)?'success':'warning'),
+ 'created' => 'warning',
+ 'saved' => 'warning',
+ 'payer_action_required' => 'warning',
+ 'pending' => 'warning',
+ 'voided' => 'danger',
+ 'failed' => 'danger',
+ 'canceled' => 'danger'
+ ];
+
+ $strRefreshURL = wpsg_admin_url('Order', 'view', ['action' => 'ajax', 'mod' => 'wpsg_mod_paypal', 'do' => 'refresh', 'edit_id' => $oOrder->getId()], ['noheader' => '1']);
+
?>
-<?php if (wpsg_isSizedString($wpsg_mod_paypal_paymentid)) { ?>
-
- <div class="wpsg_form_field ">
- <div class="wpsg_form_left">
- <label for=""><?php echo __('PaymentID', 'wpsg'); ?>: [<a href="<?php
-
- echo wpsg_admin_url('Order', 'view', ['action' => 'ajax', 'mod' => 'wpsg_mod_paypal', 'do' => 'refresh', 'edit_id' => $this->view['oOrder']->getId()], ['noheader' => '1']);
-
- ?>"><?php echo __('Status Aktualisieren', 'wpsg'); ?></a>]</label>
- </div>
- <div class="wpsg_form_right">
- <p class="" id=""><?php echo wpsg_translate(__('#1# (#2#)', 'wpsg'), $this->view['oOrder']->getMeta('wpsg_mod_paypal_paymentid'), $this->view['oOrder']->getMeta('wpsg_mod_paypal_paymentstate')); ?></p>
- </div>
- <div class="wpsg_clear"></div>
- </div>
-
-<?php } ?>
+<?php if ($strPaymentID !== '') { ?>
+
+ <?php
+
+ if ($strPaymentState !== '') {
+
+ $strState = '<span class="label label-'.esc_attr($arStateClass[$strPaymentState]??'default').'" style="font-size:12px;">'.esc_html(strtoupper($strPaymentState)).'</span>';
+
+ } else {
+
+ $strState = '<span class="label label-default" style="font-size:12px;">'.esc_html__('Unbekannt', 'wpsg').'</span>';
+
+ }
+
+ $strState .= ' <a class="btn btn-default btn-xs" href="'.esc_url($strRefreshURL).'"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> '.esc_html__('Status Aktualisieren', 'wpsg').'</a>';
+
+ ?>
+
+ <?php echo wpsg_drawForm_Text(__('PayPal Status', 'wpsg'), $strState); ?>
+ <?php echo wpsg_drawForm_Text((($bLegacy)?__('PaymentID', 'wpsg'):__('PayPal Order-ID', 'wpsg')), '<code>'.esc_html($strPaymentID).'</code>'); ?>
+
+ <?php if ($strSaleID !== '') { ?>
+
+ <?php echo wpsg_drawForm_Text((($bLegacy)?__('SaleID', 'wpsg'):__('Transaktions-ID', 'wpsg')), '<code>'.esc_html($strSaleID).'</code>'); ?>
+
+ <?php } ?>
+
+ <?php if ($bLegacy) { ?>
+
+ <?php echo wpsg_drawForm_Text(__('Schnittstelle', 'wpsg'), esc_html__('Payments API v1 (bestehende Zahlung)', 'wpsg')); ?>
-<?php if (wpsg_isSizedString($wpsg_mod_paypal_saleid)) { ?>
+ <?php } ?>
- <?php echo wpsg_drawForm_Input('', __('SaleID', 'wpsg'), $this->view['oOrder']->getMeta('wpsg_mod_paypal_saleid'), array('text' => true)); ?>
-
<?php } ?>
diff --git a/views/mods/mod_paypal/settings_edit.phtml b/views/mods/mod_paypal/settings_edit.phtml index a366dff..41bd9bd 100644 --- a/views/mods/mod_paypal/settings_edit.phtml +++ b/views/mods/mod_paypal/settings_edit.phtml @@ -1,77 +1,130 @@ -<?php
+<?php
/**
* Templatedatei für die Einstellungen des PayPal Moduls
*/
+ if (!defined('ABSPATH')) exit;
+
+ $arView = $this->view['wpsg_mod_paypal'];
+ $arStatus = (array)($arView['arStatus']??[]);
+ $bSandbox = (bool)$arView['bSandbox'];
+
+ $arStornoStatus = (array)$this->get_option('wpsg_mod_paypal_stornostate');
+ $strDeveloperURL = 'https://developer.paypal.com/dashboard/applications/'.(($bSandbox)?'sandbox':'live');
+
+ // Das gespeicherte Prüfergebnis gilt nur für den aktuell eingestellten Modus
+ $bChecked = (isset($arStatus['time']) && (bool)($arStatus['sandbox']??false) === $bSandbox);
+
+ $strBadge = '<span class="label label-%s" style="font-size:12px;">%s</span>';
+
+ if ($bSandbox) {
+
+ $strMode = sprintf($strBadge, 'warning', esc_html__('Sandbox (Testbetrieb)', 'wpsg'));
+
+ } else {
+
+ $strMode = sprintf($strBadge, 'success', esc_html__('Live', 'wpsg'));
+
+ }
+
+ if (!$arView['bCredentials']) {
+
+ $strConnection = sprintf($strBadge, 'default', esc_html__('Keine Zugangsdaten hinterlegt', 'wpsg'));
+
+ } else if (!$bChecked) {
+
+ $strConnection = sprintf($strBadge, 'default', esc_html__('Noch nicht geprüft, bitte speichern', 'wpsg'));
+
+ } else if ($arStatus['connected'] === true) {
+
+ $strConnection = sprintf($strBadge, 'success', esc_html__('Verbindung erfolgreich', 'wpsg'));
+
+ } else {
+
+ $strConnection = sprintf($strBadge, 'danger', esc_html__('Anmeldung fehlgeschlagen', 'wpsg'));
+
+ if ((string)($arStatus['message']??'') !== '') $strConnection .= '<br /><small class="text-danger">'.esc_html($arStatus['message']).'</small>';
+
+ }
+
+ if ($bChecked && $arStatus['connected'] === true) {
+
+ $strWebHook = sprintf($strBadge, (($arStatus['webhook'] === true)?'success':'warning'), (($arStatus['webhook'] === true)?esc_html__('Angemeldet', 'wpsg'):esc_html__('Nicht angemeldet', 'wpsg')));
+
+ } else {
+
+ $strWebHook = sprintf($strBadge, 'default', esc_html__('Unbekannt', 'wpsg'));
+
+ }
+
?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_paypal_bezeichnung'), array('help' => 'wpsg_shippay_name')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_paypal_aktiv'), array('help' => 'wpsg_shippay_activ')); ?>
-<?php echo wpsg_drawForm_Textarea('wpsg_mod_paypal_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_paypal_hint'), array('help' => 'wpsg_shippay_hint')); ?>
-
-<br />
-
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_clientid', __('Client ID', 'wpsg'), $this->get_option('wpsg_mod_paypal_clientid'), array('hint' => wpsg_translate(__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'), 'help' => 'wpsg_mod_paypal_clientid')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_secret', __('Secret', 'wpsg'), $this->get_option('wpsg_mod_paypal_secret'), array('hint' => wpsg_translate(__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'), 'help' => 'wpsg_mod_paypal_secret')); ?>
-
-<div class="wpsg_form_field ">
- <div class="wpsg_form_left">
- <label for=""><?php echo __('Stornierung bei Statuswechsel', 'wpsg'); ?>:</label>
- </div>
- <div class="wpsg_form_right">
- <a href="#" class="wpsg_mod_paypal_stornostate"><?php echo __('Bearbeiten', 'wpsg'); ?></a>
- </div>
- <div class="wpsg_clear"></div>
-</div>
-<div class="wpsg_mod_paypal_stornostate_layer" style="display:none;">
-
- <?php foreach ($this->arStatus as $status_id => $status_label) { $arStornoStatus = (array)$this->get_option('wpsg_mod_paypal_stornostate'); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_stornostate['.$status_id.']', __($status_label, 'wpsg'), $arStornoStatus[$status_id], array('labelright' => true)); ?>
- <?php } ?>
-
- <br />
-
-</div>
-
-<?php echo wpsg_drawForm_Input('', __('WebHook URL', 'wpsg'), $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypal', 'webHook', array(), true), array('readonly' => true, 'help' => 'wpsg_mod_paypal_webhook_url')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_createwebhook', __('Beim speichern versuchen den WebHook anzumelden.', 'wpsg'), 0, array('labelright' => true, 'noDoubleDot' => true, 'help' => 'wpsg_mod_paypal_createwebhook')); ?>
-
-<script type="text/javascript">/* <![CDATA[ */
-
- jQuery(document).ready(function() {
-
- jQuery('.wpsg_mod_paypal_stornostate').bind('click', function() {
-
- jQuery('.wpsg_mod_paypal_stornostate_layer').toggle();
-
- if (jQuery('.wpsg_mod_paypal_stornostate_layer').is(':visible')) jQuery(this).html('<?php echo __('Ausblenden', 'wpsg'); ?>');
- else jQuery(this).html('<?php echo __('Bearbeiten', 'wpsg'); ?>');
-
- return false;
-
- } );
-
- } );
-
-/* ]]> */</script>
-
-<br />
-
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_paypal_sandbox'), array('help' => 'wpsg_mod_paypal_sandbox')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_subject', __('Betreff der Überweisung', 'wpsg'), $this->get_option('wpsg_mod_paypal_subject'), array('help' => 'wpsg_mod_paypal_subject')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_invoicenumber', __('Formatierung InvoiceNumber', 'wpsg'), $this->get_option('wpsg_mod_paypal_invoicenumber'), array('help' => 'wpsg_mod_paypal_invoicenumber')); ?>
-
-<br />
-
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_paypal_gebuehr'), true), array('help' => 'wpsg_shippay_gebuehr', 'unit' => $this->get_option('wpsg_currency').' / %')); ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_paypal_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_paypal_mwst'), array('help' => 'wpsg_shippay_mwst')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_paypal_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
-
-<br />
-
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_currency', __('Währungscode (Standard: EUR)', 'wpsg'), $this->get_option('wpsg_mod_paypal_currency'), array('help' => 'wpsg_mod_paypal_currency')); ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_paypal_language', __('Sprache im PayPal Interface', 'wpsg'), array('DE' => __('Deutsch', 'wpsg'), 'US' => __('Englisch', 'wpsg'), 'FR' => __('Französisch', 'wpsg')), $this->get_option('wpsg_mod_paypal_language'), array('help' => 'wpsg_mod_paypal_language')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_autostart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_paypal_autostart'), array('help' => 'wpsg_shippay_paystart')); ?>
-<?php echo wpsg_drawForm_Select('wpsg_page_mod_paypal_success', __('Erfolgsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_paypal_success'), array('help' => 'wpsg_page_mod_paypal_success')); ?>
-<?php echo wpsg_drawForm_Select('wpsg_page_mod_paypal_error', __('Fehlerseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_paypal_error'), array('help' => 'wpsg_page_mod_paypal_error')); ?>
+<?php wpsg_drawForm_AdminboxStart(__('Verbindung zu PayPal', 'wpsg'), 'wpsg_mod_paypal_status'); ?>
+
+ <?php echo wpsg_drawForm_Text(__('Umgebung', 'wpsg'), $strMode); ?>
+ <?php echo wpsg_drawForm_Text(__('Zugangsdaten', 'wpsg'), $strConnection); ?>
+ <?php echo wpsg_drawForm_Text(__('WebHook', 'wpsg'), $strWebHook); ?>
+
+ <?php if ($bChecked) { ?>
+
+ <?php echo wpsg_drawForm_Text(__('Zuletzt geprüft', 'wpsg'), esc_html(wpsg_formatTimestamp($arStatus['time']))); ?>
+
+ <?php } ?>
+
+ <?php if ($bChecked && $arStatus['connected'] === true && $arStatus['webhook'] !== true) { ?>
+
+ <div class="wpsg_hinweis"><?php echo esc_html__('Der WebHook ist bei PayPal noch nicht angemeldet. Aktivieren Sie unten "WebHook beim Speichern anmelden" und speichern Sie die Einstellungen.', 'wpsg'); ?></div>
+
+ <?php } ?>
+
+<?php wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php wpsg_drawForm_AdminboxStart(__('Zahlungsart im Shop', 'wpsg'), 'wpsg_mod_paypal_payment'); ?>
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypal_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_paypal_bezeichnung'), ['help' => 'wpsg_shippay_name']); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_paypal_aktiv'), ['help' => 'wpsg_shippay_activ']); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_paypal_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_paypal_hint'), ['help' => 'wpsg_shippay_hint']); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypal_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_paypal_gebuehr'), true), ['help' => 'wpsg_shippay_gebuehr', 'unit' => $this->get_option('wpsg_currency').' / %']); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_paypal_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_paypal_mwst'), ['help' => 'wpsg_shippay_mwst']); ?>
+
+<?php wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php wpsg_drawForm_AdminboxStart(__('Zugangsdaten', 'wpsg'), 'wpsg_mod_paypal_credentials'); ?>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_paypal_sandbox'), ['help' => 'wpsg_mod_paypal_sandbox', 'hint' => esc_html__('Im Sandbox Modus werden keine echten Zahlungen ausgeführt. Sandbox und Live haben eigene Zugangsdaten.', 'wpsg')]); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypal_clientid', __('Client ID', 'wpsg'), $this->get_option('wpsg_mod_paypal_clientid'), ['help' => 'wpsg_mod_paypal_clientid']); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypal_secret', __('Secret', 'wpsg'), $this->get_option('wpsg_mod_paypal_secret'), ['help' => 'wpsg_mod_paypal_secret', 'hint' => wpsg_translate(__('Client ID und Secret erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Dashboard</a> unter "Apps & Credentials".', 'wpsg'), esc_url($strDeveloperURL))]); ?>
+
+<?php wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php wpsg_drawForm_AdminboxStart(__('WebHook', 'wpsg'), 'wpsg_mod_paypal_webhook'); ?>
+
+ <?php echo wpsg_drawForm_Input('', __('WebHook URL', 'wpsg'), $arView['webhookURL'], ['readonly' => true, 'help' => 'wpsg_mod_paypal_webhook_url', 'hint' => esc_html__('Über den WebHook meldet PayPal den Zahlungseingang an den Shop. Die URL muss per HTTPS von außen erreichbar sein.', 'wpsg')]); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_createwebhook', __('WebHook beim Speichern anmelden', 'wpsg'), 0, ['help' => 'wpsg_mod_paypal_createwebhook']); ?>
+
+<?php wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php wpsg_drawForm_AdminboxStart(__('Zahlungsablauf', 'wpsg'), 'wpsg_mod_paypal_process'); ?>
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypal_subject', __('Betreff der Überweisung', 'wpsg'), $this->get_option('wpsg_mod_paypal_subject'), ['help' => 'wpsg_mod_paypal_subject']); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypal_invoicenumber', __('Formatierung InvoiceNumber', 'wpsg'), $this->get_option('wpsg_mod_paypal_invoicenumber'), ['help' => 'wpsg_mod_paypal_invoicenumber']); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypal_currency', __('Währungscode (Standard: EUR)', 'wpsg'), $this->get_option('wpsg_mod_paypal_currency'), ['help' => 'wpsg_mod_paypal_currency']); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_paypal_language', __('Sprache im PayPal Interface', 'wpsg'), ['DE' => __('Deutsch', 'wpsg'), 'US' => __('Englisch', 'wpsg'), 'FR' => __('Französisch', 'wpsg')], $this->get_option('wpsg_mod_paypal_language'), ['help' => 'wpsg_mod_paypal_language']); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_autostart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_paypal_autostart'), ['help' => 'wpsg_shippay_paystart']); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_page_mod_paypal_success', __('Erfolgsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_paypal_success'), ['help' => 'wpsg_page_mod_paypal_success']); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_page_mod_paypal_error', __('Fehlerseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_paypal_error'), ['help' => 'wpsg_page_mod_paypal_error']); ?>
+
+<?php wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php wpsg_drawForm_AdminboxStart(__('Stornierung bei Statuswechsel', 'wpsg'), 'wpsg_mod_paypal_storno'); ?>
+
+ <p class="text-muted"><?php echo esc_html__('Wechselt eine mit PayPal bezahlte Bestellung in einen der markierten Status, wird der Betrag automatisch über PayPal erstattet.', 'wpsg'); ?></p>
+
+ <?php foreach ($this->arStatus as $status_id => $status_label) { ?>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_stornostate['.$status_id.']', __($status_label, 'wpsg'), ($arStornoStatus[$status_id]??'0')); ?>
+
+ <?php } ?>
+
+<?php wpsg_drawForm_AdminboxEnd(); ?>
diff --git a/views/mods/mod_paypalapi/checkout2_inner_prebutton.phtml b/views/mods/mod_paypalapi/checkout2_inner_prebutton.phtml deleted file mode 100644 index 5c2e29d..0000000 --- a/views/mods/mod_paypalapi/checkout2_inner_prebutton.phtml +++ /dev/null @@ -1,60 +0,0 @@ -<?php - - declare(strict_types=1); - - /** - * @author: daniel - * @date: 09.06.24 - * @time: 12:04 - */ - - namespace wpsg; - -?> - -<?php echo GiroPayPalAPI::getInstance()->integrateSDK(); ?> - -<script> - - paypal.PaymentFields({ - fundingSource: paypal.FUNDING.GIROPAY, - style: { - variables: {}, - rules: {}, - }, - onInit: (data, actions) => { - - const form = document.querySelector("form#wpsg_checkout_form"); - - form.addEventListener("submit", (e) => { - - const formData = new FormData(form); - const paymentSource = formData.get("wpsg[checkout][payment]"); - - if (paymentSource === '10_1') { - - e.preventDefault(); - - actions.validate().then((valid) => { - - if (valid) { - - window.location.href = '<?php echo $this->getUrl(\wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'giroPaySet', [], true); ?>'; - - } - - }); - - } - - }); - - }, - fields: { - name: { - value: "<?php echo ($_SESSION['wpsg']['checkout']['vname']??'').' '.($_SESSION['wpsg']['checkout']['name']??''); ?>" - }, - }, - }).render("#giropay-container"); - -</script> diff --git a/views/mods/mod_paypalapi/gfx/giropay.svg b/views/mods/mod_paypalapi/gfx/giropay.svg deleted file mode 100644 index dd1928f..0000000 --- a/views/mods/mod_paypalapi/gfx/giropay.svg +++ /dev/null @@ -1 +0,0 @@ -<svg width="75px" height="32px" viewBox="0 0 75 32" version="1.1" xmlns="http://www.w3.org/2000/svg"><title>logo giropay</title><desc>Created with Sketch.</desc><defs><polygon id="path-1" points="0 0.017902439 46.0918699 0.017902439 46.0918699 19.8373984 0 19.8373984"></polygon><polygon id="path-3" points="0 19.9821138 46.0918699 19.9821138 46.0918699 0.162601626 0 0.162601626"></polygon></defs><g id="SPB_&_AltPay_NewAssets" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="matrix(1.614571, 0, 0, 1.614571, -161.457123, -256.816772)"><g id="logo-giropay" transform="translate(100.000000, 159.000000)"><g id="Group-3" transform="translate(0.000000, 0.144715)"><mask id="mask-2" fill="#FFFFFF"><polygon points="0 0.017902439 46.0918699 0.017902439 46.0918699 19.8373984 0 19.8373984" transform="matrix(1, 0, 0, 1, 0, 0)"></polygon></mask><g id="Clip-2"></g><path d="M0,3.5735122 C0,1.60977236 1.5998374,0.017902439 3.57349593,0.017902439 L42.5182114,0.017902439 C44.4918699,0.017902439 46.0918699,1.60977236 46.0918699,3.5735122 L46.0918699,16.2818049 C46.0918699,18.2455447 44.4918699,19.8374146 42.5182114,19.8374146 L3.57349593,19.8374146 C1.5998374,19.8374146 0,18.2455447 0,16.2818049 L0,3.5735122 Z" id="Fill-1" fill="#003a7d" mask="url(#mask-2)"></path></g><path d="M1.46738211,3.84021138 L1.46738211,16.3065528 C1.46738211,17.5338699 2.46738211,18.5288293 3.70087805,18.5288293 L24.1036423,18.5288293 L24.1036423,1.61793496 L3.70087805,1.61793496 C2.46738211,1.61793496 1.46738211,2.61289431 1.46738211,3.84021138" id="Fill-4" fill="#ffffff"></path><path d="M5.67102439,10.0205528 C5.67102439,9.34152846 6.00582114,8.77730081 6.64663415,8.77730081 C7.42126829,8.77730081 7.74630894,9.39892683 7.74630894,9.95356098 C7.74630894,10.7187642 7.25866667,11.235187 6.64663415,11.235187 C6.13004878,11.235187 5.67102439,10.795187 5.67102439,10.0205528 Z M9.41053659,7.57226016 L7.8515122,7.57226016 L7.8515122,8.47112195 L7.8324878,8.47112195 C7.46907317,7.85908943 6.87606504,7.45746341 6.13964228,7.45746341 C4.59021138,7.45746341 3.8921626,8.56689431 3.8921626,10.0491707 C3.8921626,11.5221789 4.74321951,12.5550244 6.11102439,12.5550244 C6.79964228,12.5550244 7.37346341,12.2872195 7.78468293,11.7038049 L7.80370732,11.7038049 L7.80370732,11.9716098 C7.80370732,12.9472195 7.26826016,13.4158374 6.27362602,13.4158374 C5.55622764,13.4158374 5.11622764,13.2628293 4.59021138,13.0046179 L4.50419512,14.3626667 C4.90582114,14.5060813 5.58500813,14.6782764 6.40744715,14.6782764 C8.41590244,14.6782764 9.41053659,14.0182764 9.41053659,11.9716098 L9.41053659,7.57226016 Z" id="Fill-6" fill="#ED1C24"></path><mask id="mask-4" fill="#FFFFFF"><polygon points="0 19.9821138 46.0918699 19.9821138 46.0918699 0.162601626 0 0.162601626" transform="matrix(1, 0, 0, 1, 0, 0)"></polygon></mask><g id="Clip-9"></g><path d="M10.5985366,6.75918699 L12.32,6.75918699 L12.32,5.49674797 L10.5985366,5.49674797 L10.5985366,6.75918699 Z M10.598374,12.5549593 L12.3198374,12.5549593 L12.3198374,7.57219512 L10.598374,7.57219512 L10.598374,12.5549593 Z" id="Fill-8" fill="#ED1C24" mask="url(#mask-4)"></path><path d="M17.1133333,7.51479675 C16.9411382,7.48617886 16.7307317,7.45739837 16.5299187,7.45739837 C15.7839024,7.45739837 15.3534959,7.85918699 15.0570732,8.4904065 L15.0380488,8.4904065 L15.0380488,7.57219512 L13.4694309,7.57219512 L13.4694309,12.5549593 L15.1910569,12.5549593 L15.1910569,10.4508943 C15.1910569,9.47544715 15.6404878,8.89203252 16.4439024,8.89203252 C16.6447154,8.89203252 16.835935,8.89203252 17.0273171,8.94943089 L17.1133333,7.51479675 Z" id="Fill-10" fill="#ED1C24" mask="url(#mask-4)"></path><path d="M20.0773496,11.4647154 C19.2835285,11.4647154 18.9583252,10.804878 18.9583252,10.0682927 C18.9583252,9.32243902 19.2835285,8.66243902 20.0773496,8.66243902 C20.8711707,8.66243902 21.196374,9.32243902 21.196374,10.0682927 C21.196374,10.804878 20.8711707,11.4647154 20.0773496,11.4647154 M20.0773496,12.6697561 C21.7223902,12.6697561 22.9752358,11.7133333 22.9752358,10.0682927 C22.9752358,8.41382114 21.7223902,7.45739837 20.0773496,7.45739837 C18.4323089,7.45739837 17.1794634,8.41382114 17.1794634,10.0682927 C17.1794634,11.7133333 18.4323089,12.6697561 20.0773496,12.6697561" id="Fill-11" fill="#ED1C24" mask="url(#mask-4)"></path><path d="M29.3757073,10.0110244 C29.3757073,10.8048455 28.9836748,11.3500488 28.3332683,11.3500488 C27.7594472,11.3500488 27.2812358,10.8048455 27.2812358,10.0780163 C27.2812358,9.332 27.7020488,8.77720325 28.3332683,8.77720325 C29.0026992,8.77720325 29.3757073,9.35102439 29.3757073,10.0110244 Z M25.5597724,14.5633821 L27.2812358,14.5633821 L27.2812358,11.856878 L27.3002602,11.856878 C27.6254634,12.4498862 28.2758699,12.6697236 28.8783089,12.6697236 C30.360748,12.6697236 31.1545691,11.4456585 31.1545691,9.97265041 C31.1545691,8.76777236 30.399122,7.45736585 29.0218862,7.45736585 C28.2376585,7.45736585 27.5106667,7.77297561 27.166439,8.47118699 L27.147252,8.47118699 L27.147252,7.5721626 L25.5597724,7.5721626 L25.5597724,14.5633821 Z" id="Fill-12" fill="#ffffff" mask="url(#mask-4)"></path><path d="M33.505252,10.9769919 C33.505252,10.4987805 33.9642764,10.3169919 34.5476911,10.3169919 C34.8059024,10.3169919 35.0546829,10.3361789 35.2745203,10.3457724 C35.2745203,10.929187 34.8633008,11.5221951 34.2128943,11.5221951 C33.8112683,11.5221951 33.505252,11.3212195 33.505252,10.9769919 Z M36.9769593,12.5550407 C36.900374,12.1628455 36.8813496,11.770813 36.8813496,11.3786179 L36.8813496,9.52317073 C36.8813496,8.00252033 35.7815122,7.45747967 34.5094797,7.45747967 C33.7730569,7.45747967 33.1322439,7.56268293 32.5202114,7.81130081 L32.5488293,8.97813008 C33.0270407,8.7103252 33.5816748,8.60512195 34.1364715,8.60512195 C34.7580976,8.60512195 35.2650894,8.78674797 35.2745203,9.46577236 C35.0546829,9.42756098 34.7485041,9.39894309 34.4711057,9.39894309 C33.5530569,9.39894309 31.8984228,9.58056911 31.8984228,11.1013821 C31.8984228,12.1820325 32.7784228,12.6698374 33.7634634,12.6698374 C34.4711057,12.6698374 34.9493171,12.392439 35.3415122,11.770813 L35.3606992,11.770813 C35.3606992,12.0290244 35.3893171,12.2872358 35.3989106,12.5550407 L36.9769593,12.5550407 Z" id="Fill-13" fill="#ffffff" mask="url(#mask-4)"></path><path d="M37.750748,14.5634634 C38.1045691,14.6398862 38.4583902,14.6782602 38.8218049,14.6782602 C40.3998537,14.6782602 40.7728618,13.463626 41.2606667,12.2107805 L43.0873333,7.5722439 L41.3658699,7.5722439 L40.3426179,10.8239512 L40.3234309,10.8239512 L39.2522114,7.5722439 L37.3967642,7.5722439 L39.414813,12.6698049 C39.2904228,13.1098049 38.9653821,13.3584228 38.5445691,13.3584228 C38.3053821,13.3584228 38.0949756,13.3296423 37.8655447,13.2532195 L37.750748,14.5634634 Z" id="Fill-14" fill="#ffffff" mask="url(#mask-4)"></path></g></g></svg>
\ No newline at end of file diff --git a/views/mods/mod_paypalapi/order_done.phtml b/views/mods/mod_paypalapi/order_done.phtml index 170a63f..5054509 100644 --- a/views/mods/mod_paypalapi/order_done.phtml +++ b/views/mods/mod_paypalapi/order_done.phtml @@ -10,6 +10,10 @@ <p><?php echo __('Zahlung wurde erfolgreich durchgeführt.', 'wpsg'); ?></p>
+<?php } else if (wpsg_isSizedString($this->view['wpsg_mod_paypalapi']['done'], '3')) { ?> + + <p><?php echo __('Die Zahlung mit PayPal kann derzeit nicht gestartet werden. Bitte wenden Sie sich an den Shopbetreiber.', 'wpsg'); ?></p> + <?php } else if (wpsg_isSizedString($this->view['wpsg_mod_paypalapi']['done'], '1')) { ?>
<p><?php echo __('Zahlung wurde bereits ausgeführt.', 'wpsg'); ?></p>
diff --git a/views/mods/mod_paypalapi/order_done_giropay.phtml b/views/mods/mod_paypalapi/order_done_giropay.phtml deleted file mode 100644 index 5d765e4..0000000 --- a/views/mods/mod_paypalapi/order_done_giropay.phtml +++ /dev/null @@ -1,80 +0,0 @@ -<?php - - declare(strict_types=1); - - /** - * @author: daniel - * @date: 13.06.24 - * @time: 14:59 - */ - - namespace wpsg; - - $client_id = $this->view['clientId']??null; - -?> - -<?php if ($client_id !== null) { ?> - - <p><?php echo __('Die Bestellung ist bei uns eingegangen, bitte begleichen Sie den offenen Betrag mit giroPAy über folgenden Button.', 'wpsg'); ?></p> - - <script src="https://sandbox.paypal.com/sdk/js?client-id=<?php echo $client_id; ?>&components=buttons,payment-fields,marks,funding-eligibility&enable-funding=giropay¤cy=EUR"></script> - - <div id="giropay-btn"></div> - - <script> - - paypal.Buttons({ - fundingSource: paypal.FUNDING.GIROPAY, - style: { - label: "pay", - }, - createOrder() { - return fetch('<?php echo $this->getUrl(\wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'giroPayCreateOrder', [ - 'order_id' => intval($_REQUEST['order_id']) - ], true); ?>', { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: null, - }) - .then((response) => response.json()) - .then((order) => order.id); - }, - onApprove(data) { - - console.log('onApprove'); - - return fetch('<?php echo $this->getUrl(\wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'giroPayApproveOrder', [], true); ?>', { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ - orderID: data.orderID - }) - }) - .then((response) => response.json()) - .then((orderData) => { - - //console.log('Capture result', orderData, JSON.stringify(orderData, null, 2)); - //const transaction = orderData.purchase_units[0].payments.captures[0]; - //console.log('Transaction Status:', transaction.status); - //console.log('Transaction ID:', transaction.id); - - location.reload(); - - }); - }, - onCancel(data, actions) { console.log(`Order Canceled - ID: ${data.orderID}`); }, - onError(err) { console.error(err); } - }).render("#giropay-btn"); - - </script> - -<?php } else { ?> - - <p><?php echo __('Den Betrag haben wir mittels GiroPay dankend erhalten.', 'wpsg'); ?></p> - -<?php }
\ No newline at end of file diff --git a/views/mods/mod_paypalapi/overview_button.phtml b/views/mods/mod_paypalapi/overview_button.phtml deleted file mode 100644 index dfe5490..0000000 --- a/views/mods/mod_paypalapi/overview_button.phtml +++ /dev/null @@ -1,89 +0,0 @@ -<?php - - declare(strict_types=1); - - /** - * @author: daniel - * @date: 13.06.24 - * @time: 14:48 - */ - - namespace wpsg; - -?> - -<?php GiroPayPalAPI::getInstance()->integrateSDK(); ?> - - -<div style="width:300px; float:right;"> - <div id="giropay-btn"></div> -</div> - -<script> - - paypal.Buttons({ - fundingSource: paypal.FUNDING.GIROPAY, - style: { - label: "pay", - }, - createOrder() { - - const form = document.getElementById('wpsg_form'); - - if (form.checkValidity()) { - - return fetch("<?php echo $this->getUrl(\wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'giroPayCreateOrderFromSession', [ ], true); ?>", { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: { } - }) - .then((response) => response.json()) - .then((order) => order.id); - - } else form.reportValidity(); - - }, - onApprove(data) { - - return fetch("<?php echo $this->getUrl(\wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'giroPayApproveOrder', [], true); ?>", { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ - orderID: data.orderID - }) - }) - .then((response) => response.json()) - .then((orderData) => { - - location.href = orderData.order_done_url; - - // Successful capture! For dev/demo purposes: - // console.log('Capture result', orderData, JSON.stringify(orderData, null, 2)); - - // const transaction = orderData.order_paypal.purchase_units[0].payments.captures[0]; - - //console.log('Transaction Status:', transaction.status); - //console.log('Transaction ID:', transaction.id); - - }); - - }, - onCancel(data, actions) { - - console.log(`Order Canceled - ID: ${data.orderID}`); - - location.href = '<?php echo $this->getUrl(\wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'giroPayCancelOrder', [], true); ?>'; - - }, - onError(err) { - - <?php if ($GLOBALS['wpsg_sc']->get_option('wpsg_debugModus') === "1") { ?>console.error(err);<?php } ?> - - } - }).render("#giropay-btn"); - -</script>
\ No newline at end of file diff --git a/views/mods/mod_paypalapi/overview_preauth_button.phtml b/views/mods/mod_paypalapi/overview_preauth_button.phtml new file mode 100644 index 0000000..9fd775a --- /dev/null +++ b/views/mods/mod_paypalapi/overview_preauth_button.phtml @@ -0,0 +1,15 @@ +<?php + + /** + * Ersetzt in der Bestellübersicht den Button "zahlungspflichtig bestellen", solange die Zahlung noch nicht bei PayPal autorisiert wurde + */ + +?> + +<?php if (($this->view['wpsg_mod_paypalapi']['preauth_changed']??false) === true) { ?> +<div class="wpsg_mod_paypalapi_preauth_hint"> + <p><?php echo esc_html__('Ihre Bestellung hat sich seit der Autorisierung geändert. Bitte autorisieren Sie die Zahlung erneut bei PayPal.', 'wpsg'); ?></p> +</div> +<?php } ?> + +<input type="submit" class="wpsg_orderbutton wpsg_mod_paypalapi_preauth_button" value="<?php echo esc_attr__('Mit PayPal bezahlen', 'wpsg'); ?>" name="wpsg_order" /> 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..7576912 100644 --- a/views/mods/mod_paypalapi/settings_edit.phtml +++ b/views/mods/mod_paypalapi/settings_edit.phtml @@ -1,223 +1,182 @@ -<?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')); ?> + +<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')); ?> + +<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-Entwicklerportal 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).is(':checked')?'1':'0')).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'); + + el_wpsg_mod_paypalapi_plus_aktiv.dispatchEvent(new Event('change')); + +</script> diff --git a/views/mods/mod_prepayment/mail_html_payment_after.phtml b/views/mods/mod_prepayment/mail_html_payment_after.phtml index 42417af..0726d69 100644 --- a/views/mods/mod_prepayment/mail_html_payment_after.phtml +++ b/views/mods/mod_prepayment/mail_html_payment_after.phtml @@ -18,7 +18,7 @@ <tr> <td> - <?php if ($this->get_option('wpsg_mod_prepayment_qrcode') == true) { + <?php if ($this->get_option('wpsg_mod_prepayment_qrcode_mail') == '1') { require_once WPSG_PATH_LIB.'phpgirocode.class.php'; @@ -31,7 +31,7 @@ ]); ?> - <?php echo __('Girocode für einfache Überweisungen', 'wpsg'); ?><br /><br /> + <?php echo __('GiroCode für einfache Überweisungen', 'wpsg'); ?><br /><br /> <img src="data:image/png;base64,<?php echo $qrcode; ?>" alt="Base64 Image"> <?php } ?> </td> diff --git a/views/mods/mod_prepayment/order_done.phtml b/views/mods/mod_prepayment/order_done.phtml index 4e8443d..9fb9a20 100644 --- a/views/mods/mod_prepayment/order_done.phtml +++ b/views/mods/mod_prepayment/order_done.phtml @@ -34,13 +34,13 @@ <!-- Girocode (EPC) -->
<p>
- <?php echo __('Wenn Ihre Banking-App Girocode unterstützt, können Sie diesen QRCode scannen.', 'wpsg'); ?>
+ <?php echo __('Wenn Ihre Banking-App GiroCode unterstützt, können Sie diesen QR-Code scannen.', 'wpsg'); ?>
</p>
<?php
$img = [
- 'title' => __('Girocode', 'wpsg'),
+ 'title' => __('GiroCode', 'wpsg'),
'invoiceAmount' => $this->view['basket']['sum']['preis_gesamt_brutto'],
'referenceNumber' => $this->view['wpsg_mod_prepayment']['subject'],
'hash' => $this->callMod('wpsg_mod_prepayment', 'genQRCode', [
@@ -66,7 +66,7 @@ </div>
<div class="wpsg_mod_prepayment_girocode_left_amount">
<h4><?php echo wpsg_translate(__('Betrag', 'wpsg')); ?></h4>
- <?php echo sprintf("%.2f", $img['invoiceAmount']); ?>
+ <?php echo wpsg_ff($img['invoiceAmount']); ?>
</div>
</div>
</div>
diff --git a/views/mods/mod_prepayment/settings_edit.phtml b/views/mods/mod_prepayment/settings_edit.phtml index 7d99ebe..d8bdbe3 100644 --- a/views/mods/mod_prepayment/settings_edit.phtml +++ b/views/mods/mod_prepayment/settings_edit.phtml @@ -23,7 +23,6 @@ <br />
<?php echo wpsg_drawForm_Input('wpsg_mod_prepayment_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_prepayment_gebuehr'), true), array('help' => 'wpsg_mod_prepayment_gebuehr','unit' => $this->get_option('wpsg_currency').' / %')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_prepayment_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_prepayment_mwst'), array('help' => 'wpsg_mod_prepayment_mwst')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_prepayment_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_prepayment_mwstland'), array('help' => 'wpsg_mod_prepayment_mwstland')); ?>
<br />
<?php echo wpsg_drawForm_Input('wpsg_mod_prepayment_kinhaber', __('Kontoinhaber', 'wpsg'), $this->get_option('wpsg_mod_prepayment_kinhaber'), array('help' => 'wpsg_mod_prepayment_kinhaber')); ?>
diff --git a/views/mods/mod_printshop/producttemplate.phtml b/views/mods/mod_printshop/producttemplate.phtml index ed8ad94..dd344ab 100644 --- a/views/mods/mod_printshop/producttemplate.phtml +++ b/views/mods/mod_printshop/producttemplate.phtml @@ -313,6 +313,11 @@ <div class="wpsg_product_buttonarea">
<div class="wpsg_product_buttons_add_basket">
+ <?php /* Urlaubsgruß im Urlaubszeitraum */ ?>
+ <?php if ($this->hasMod('wpsg_mod_deliverytime') && $this->callMod('wpsg_mod_deliverytime', 'holiday', array($this->view['data']['product_key']))) { ?>
+ <div class="wpsg_product_deliverytime_holiday" style="padding:10px; border:1px solid #ff0000;"><?php echo wpsg_hspc($this->callMod('wpsg_mod_deliverytime', 'displayHolidaytext', array($this->view['data']['product_key']))); ?></div>
+ <?php } ?>
+
<?php if ($this->view['oProduct']->canOrder()) { ?>
<div class="wpsg_produkt_add_basket_wrapper">
@@ -320,24 +325,7 @@ <input type="text" value="<?php echo ((wpsg_isSizedInt($this->view['data']['menge']))?$this->view['data']['menge']:'1'); ?>" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" <?php echo (($this->view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?> />
- <?php /* Urlaubsmodus aktiv */ ?>
- <?php if ($this->hasMod('wpsg_mod_deliverytime') && ($this->get_option('wpsg_mod_deliverytime_holiday') == '1')) { ?>
-
- <?php if ($this->callMod('wpsg_mod_deliverytime', 'holiday', array($this->view['data']['product_key']))) { ?>
-
- <div class="wpsg_product_deliverytime_holiday" style="height:50px; padding:10px; width:50%; float:right; border:1px solid #ff0000;">
-
- <?php echo __($this->callMod('wpsg_mod_deliverytime', 'displayHolidaytext', array($this->view['data']['product_key']))); ?>
-
- </div>
-
- <?php } ?>
-
- <?php } else {?>
-
- <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
-
- <?php } ?>
+ <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
<?php if (in_array($this->get_option('wpsg_afterinsert'), array('2', '3'))) { ?>
<script type="text/javascript">
diff --git a/views/mods/mod_productgroups/add.phtml b/views/mods/mod_productgroups/add.phtml index 2d304f6..09de0a8 100644 --- a/views/mods/mod_productgroups/add.phtml +++ b/views/mods/mod_productgroups/add.phtml @@ -69,7 +69,7 @@ <?php echo wpsg_drawForm_Select('template_file', __('Template', 'wpsg'), $this->view['templates'], $this->view['data']['template_file']); ?>
<?php echo wpsg_drawForm_Select('infopage', __('Info Seite', 'wpsg'), $this->view['pages'], $this->view['data']['infopage']); ?>
- <?php echo wpsg_drawForm_Input('pos', __('Positionsnummer (Sortierung, aufsteigend)', 'wpsg'), $this->view['data']['pos']); ?>
+ <?php echo wpsg_drawForm_Input('pos', __('Positionsnummer (Sortierung, aufsteigend)', 'wpsg'), $this->view['data']['pos'] ?? ''); ?>
<div class="form-group form-group-sm ">
<label class="col-sm-6 control-label"><?php echo __('Produktgruppenbild', 'wpsg'); ?></label>
diff --git a/views/mods/mod_productgroups/index.phtml b/views/mods/mod_productgroups/index.phtml index 274c25a..c512509 100644 --- a/views/mods/mod_productgroups/index.phtml +++ b/views/mods/mod_productgroups/index.phtml @@ -81,6 +81,7 @@ <thead>
<tr>
<th class="wpsg_pic_col"></th>
+ <th class="col_id"><?php echo __("ID", 'wpsg'); ?></th>
<th class="wpsg_order col_name" data-order="nr"><?php echo __("Name", 'wpsg'); ?></th>
<th class="wpsg_order col_template" data-order="template"><?php echo __("Template", 'wpsg'); ?></th>
<th class="wpsg_order col_pos" data-order="template"><?php echo __("Position", 'wpsg'); ?></th>
@@ -97,6 +98,7 @@ <?php } ?>
</td>
+ <td class="col_id"><?php echo intval($pg->id); ?></td>
<td class="col_name">
<strong><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php
diff --git a/views/mods/mod_productgroups/produkt_addedit_sidebar.phtml b/views/mods/mod_productgroups/produkt_addedit_sidebar.phtml index 3a790b8..6cbb9bd 100644 --- a/views/mods/mod_productgroups/produkt_addedit_sidebar.phtml +++ b/views/mods/mod_productgroups/produkt_addedit_sidebar.phtml @@ -17,8 +17,8 @@ <p><?php echo __('Bisher wurden keine Produktgruppen angelegt.', 'wpsg'); ?></p>
<?php } else { ?>
<?php echo wpsg_drawForm_Select('wpsg_productgroup', __('Produktgruppe', 'wpsg'), @$this->view['wpsg_mod_productgroups']['data'], @$this->view['wpsg_mod_productgroups']['produkt_data']['pgruppe']); ?>
- <?php echo wpsg_drawForm_Input('wpsg_productgroup_sticky_von', __('Sticky von', 'wpsg'), @$this->view['wpsg_mod_productgroups']['sticky_von']); ?>
- <?php echo wpsg_drawForm_Input('wpsg_productgroup_sticky_bis', __('Sticky bis', 'wpsg'), @$this->view['wpsg_mod_productgroups']['sticky_bis']); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_productgroup_sticky_von', __('Hervorheben von', 'wpsg'), @$this->view['wpsg_mod_productgroups']['sticky_von']); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_productgroup_sticky_bis', __('Hervorheben bis', 'wpsg'), @$this->view['wpsg_mod_productgroups']['sticky_bis']); ?>
<?php } ?>
<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&page=wpsg-Productgroups"><span class="wpsg-glyphicon glyphicon glyphicon-book"></span><?php echo __('Produktgruppenverwaltung', 'wpsg'); ?></a><br />
diff --git a/views/mods/mod_productgroups/settings_edit.phtml b/views/mods/mod_productgroups/settings_edit.phtml index 2d00f6c..8d1d5e6 100644 --- a/views/mods/mod_productgroups/settings_edit.phtml +++ b/views/mods/mod_productgroups/settings_edit.phtml @@ -8,7 +8,7 @@ <?php echo wpsg_drawForm_Select('wpsg_productgroups_page', __('Produktgruppenübersichtsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_productgroups_page'), array('help' => 'wpsg_mod_productgroups_page')); ?>
<?php echo wpsg_drawForm_Select('wpsg_productgroups_page_layout', __('Layout der Übersichtsseite', 'wpsg'), [
'0' => 'Layout 1 (show.phtml)',
- '1' => 'Layout 2 (show_2.phml)'
+ '1' => 'Layout 2 (show_2.phtml)'
], $this->get_option('wpsg_productgroups_page_layout'), ['help' => 'wpsg_productgroups_page_layout']); ?>
<?php echo wpsg_drawForm_Select('wpsg_productgroups_order', __('Sortierung innerhalb der Gruppe', 'wpsg'), array(
'id' => __('Nach ID', 'wpsg'),
diff --git a/views/mods/mod_productindex/layouts/grid.phtml b/views/mods/mod_productindex/layouts/grid.phtml index 9784483..b7373e8 100644 --- a/views/mods/mod_productindex/layouts/grid.phtml +++ b/views/mods/mod_productindex/layouts/grid.phtml @@ -168,7 +168,7 @@ <?php //if ($this->hasMod('wpsg_mod_stock') && $this->callMod('wpsg_mod_stock', 'checkBestand', array($this->getProduktID($p['id']), 1)) === false) { ?>
<?php if (false) { ?>
- <span class="wpsg_produkt_soldout"><?php echo __('wpGermany Vollversion erwerben, Updates erhalten und weiterProdukt ausverkauft', 'wpsg'); ?></span>
+ <span class="wpsg_produkt_soldout"><?php echo __('Produkt ausverkauft', 'wpsg'); ?></span>
<?php } else { ?>
<a class="wpsg_button" title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo __('Zum Produkt', 'wpsg'); ?></a>
<?php } ?>
diff --git a/views/mods/mod_productvariants/admin_edit.phtml b/views/mods/mod_productvariants/admin_edit.phtml index d85d397..aaa0a7d 100644 --- a/views/mods/mod_productvariants/admin_edit.phtml +++ b/views/mods/mod_productvariants/admin_edit.phtml @@ -112,14 +112,6 @@ } );
- jQuery('#productvariation_anr_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
- submitdata: {
- field: 'vari_anr',
- product_id: jQuery('#wpsg_mod_productvariants_product_id').val(),
- field_id: '<?php echo $vari['id']; ?>'
- }
- });
-
jQuery('#productvariation_price_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
submitdata: {
field: 'vari_price',
@@ -179,10 +171,10 @@ <?php } ?>
<?php if ($this->hasMod('wpsg_mod_weight')) { ?>
- <td class="col_stock"><span class="wpsg_editable" id="productvariation_weight_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['weight']); ?></span></td>
+ <td class="col_stock"><span class="wpsg_editable" id="productvariation_weight_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc(wpsg_ff($vari['weight'])); ?></span></td>
<?php } ?>
<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
- <td class="col_stock"><span class="wpsg_editable" id="productvariation_fmenge_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['fmenge']); ?></span></td>
+ <td class="col_stock"><span class="wpsg_editable" id="productvariation_fmenge_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc(wpsg_ff($vari['fmenge'])); ?></span></td>
<?php } ?>
<?php } ?>
diff --git a/views/mods/mod_productvariants/basket_row.phtml b/views/mods/mod_productvariants/basket_row.phtml index 6a187a1..c542636 100644 --- a/views/mods/mod_productvariants/basket_row.phtml +++ b/views/mods/mod_productvariants/basket_row.phtml @@ -19,7 +19,7 @@ <?php if (is_numeric($vari)) { ?>
<?php echo $value['name'] ?>:
<strong>
- <?php echo $value['value'] ?>; <?php echo __('Art. Nr.', 'wpsg').': '.$value['artnr'] ?>;
+ <?php echo $value['value'] ?>; <?php if (wpsg_getStr($value['artnr']) !== '') echo __('Art. Nr.', 'wpsg').': '.$value['artnr'].'; '; ?>
<?php if ($this->callMod('wpsg_mod_productvariants', 'showVariPrice', array($value['preis']))) { ?>
(<?php echo wpsg_ff($value['preis'], $this->get_option('wpsg_currency')); ?>)
<?php } ?>
diff --git a/views/mods/mod_productvariants/overview_row.phtml b/views/mods/mod_productvariants/overview_row.phtml index e16d6ac..95d75d7 100644 --- a/views/mods/mod_productvariants/overview_row.phtml +++ b/views/mods/mod_productvariants/overview_row.phtml @@ -19,7 +19,7 @@ <?php if (is_numeric($vari)) { ?>
<?php echo $value['name'] ?>:
<strong>
- <?php echo $value['value'] ?>; <?php echo __('Art. Nr.', 'wpsg').': '.$value['artnr'] ?>;
+ <?php echo $value['value'] ?>; <?php if (wpsg_getStr($value['artnr']) !== '') echo __('Art. Nr.', 'wpsg').': '.$value['artnr'].'; '; ?>
<?php if ($this->callMod('wpsg_mod_productvariants', 'showVariPrice', array($value['preis']))) { ?>
(<?php echo wpsg_ff($value['preis'], $this->get_option('wpsg_currency')); ?>)
<?php } ?>
diff --git a/views/mods/mod_productvariants/settings_edit.phtml b/views/mods/mod_productvariants/settings_edit.phtml index 5495a19..d516a57 100644 --- a/views/mods/mod_productvariants/settings_edit.phtml +++ b/views/mods/mod_productvariants/settings_edit.phtml @@ -21,7 +21,6 @@ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_productvariants_price', __('Preis der Variation direkt anzeigen', 'wpsg'), $this->get_option('wpsg_mod_productvariants_price')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_vp_detailview', __('Erweiterte Variantenanzeige aktivieren', 'wpsg'), $this->get_option('wpsg_vp_detailview'), array('help' => 'wpsg_vp_detailview')); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_vp_replaceanr', __('Produktartikelnummer ersetzen', 'wpsg'), $this->get_option('wpsg_vp_replaceanr'), array('hint' => __('Ersetzt die Produktartikelnummer durch die zusammengesetzte Artikelnummern der Varianten.', 'wpsg'), 'help' => 'wpsg_vp_replaceanr')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_vp_product_stock_nocalc', __('Produktbestand nach Kauf nicht berechnen', 'wpsg'), $this->get_option('wpsg_vp_product_stock_nocalc'), [
'hint' => __('Ist diese Option aktiv, so bildet sich der Bestand im Produkt bei Variantenprodukten nicht aus den Varianten neu sondern wird einfach reduziert.', 'wpsg'), 'help' => 'wpsg_vp_product_stock_nocalc'
]); ?>
@@ -31,7 +30,7 @@ ]); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_vp_product_stock_display', __('Produktbestand statt Variantenbestand anzeigen', 'wpsg'), $this->get_option('wpsg_vp_product_stock_display'), [
- 'hint' => __('Ist diese Option aktiv, so wird im nur der Produktbestand im Produkttemplate (Frontend) angezeigt..', 'wpsg'), 'help' => 'wpsg_vp_product_stock_display'
+ 'hint' => __('Ist diese Option aktiv, so wird nur der Produktbestand im Produkttemplate (Frontend) angezeigt.', 'wpsg'), 'help' => 'wpsg_vp_product_stock_display'
]); ?>
</div>
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_productvars/smartcheckout_row.phtml b/views/mods/mod_productvars/smartcheckout_row.phtml new file mode 100644 index 0000000..b5845b5 --- /dev/null +++ b/views/mods/mod_productvars/smartcheckout_row.phtml @@ -0,0 +1,57 @@ +<?php + + /** + * Template für die Produktvariablen an einer Warenkorbposition im SmartCheckout + * + * Die Feldnamen entsprechen denen aus basket_row.phtml, gespeichert wird über + * wpsg_mod_productvars::basket_preUpdate(). Pflichtfelder tragen required, der leere + * Platzhalter der Auswahl wird serverseitig zu not_set. + */ + + $p = $this->view['wpsg_mod_productvars']['p']; + $product_index = $p['product_index']; + $arError = (array)$this->view['error']; + +?> +<div class="sc_pvars"> + + <?php foreach ($this->view['wpsg_mod_productvars']['data'] as $pv) { ?> + <?php + + $field_name = 'wpsg_mod_productvars['.$pv['id'].']['.$product_index.']'; + $field_id = 'wpsg_sc_pvar_'.$pv['id'].'_'.$product_index; + $value = wpsg_getStr($p['wpsg_mod_productvars'][$pv['id']]); + $bError = in_array('wpsg_mod_productvars_'.$pv['id'].'_'.$product_index, $arError); + $bRequired = ($pv['pflicht'] == '1'); + $strRequired = (($bRequired)?'<span class="sc_required" aria-hidden="true">*</span>':''); + + ?> + <div class="sc_pvar sc_pvar_typ<?php echo intval($pv['typ']); ?><?php echo (($bError)?' sc_invalid':''); ?>"> + + <?php if ($pv['typ'] == '3') { // Checkbox ?> + <label class="sc_pvar_check"> + <input type="hidden" value="0" name="<?php echo esc_attr($field_name); ?>" /> + <input type="checkbox" value="1" name="<?php echo esc_attr($field_name); ?>" <?php echo (($value === '1')?'checked="checked"':''); ?><?php echo (($bRequired)?' required':''); ?> /> + <span><?php echo wpsg_hspc(__($pv['name'], 'wpsg')); ?><?php echo $strRequired; ?></span> + </label> + <?php } else { ?> + <label class="sc_pvar_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="sc_pvar_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 ((wpsg_hspc($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') { // Textfeld mehrzeilig ?> + <textarea class="sc_pvar_input" id="<?php echo esc_attr($field_id); ?>" name="<?php echo esc_attr($field_name); ?>" rows="3"<?php echo (($bRequired)?' required':''); ?>><?php echo wpsg_hspc($value); ?></textarea> + <?php } else { // Textfeld ?> + <input class="sc_pvar_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> diff --git a/views/mods/mod_produktartikel/produkt_edit_allgemein.phtml b/views/mods/mod_produktartikel/produkt_edit_allgemein.phtml index e4a96d6..19973a6 100644 --- a/views/mods/mod_produktartikel/produkt_edit_allgemein.phtml +++ b/views/mods/mod_produktartikel/produkt_edit_allgemein.phtml @@ -6,5 +6,5 @@ */
?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel[path]', __('URL Path Segment', 'wpsg'), wpsg_getStr($this->view['data']['post_name']), array('help' => 'wpsg_mod_produktartikel_url_path_seg')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel[path]', __('URL-Segment', 'wpsg'), wpsg_getStr($this->view['data']['post_name']), array('help' => 'wpsg_mod_produktartikel_url_path_seg')); ?>
diff --git a/views/mods/mod_produktartikel/settings_edit.phtml b/views/mods/mod_produktartikel/settings_edit.phtml index 02b27dd..b97485d 100644 --- a/views/mods/mod_produktartikel/settings_edit.phtml +++ b/views/mods/mod_produktartikel/settings_edit.phtml @@ -6,10 +6,10 @@ ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel_pathkey', __('Path Key (Produkte)', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_pathkey'), array('maxlength' => 20, 'help' => 'wpsg_mod_produktartikel_pathkey')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel_pathkey_cat', __('Path Key (Kategorien)', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_pathkey_cat'), array('maxlength' => 20, 'help' => 'wpsg_mod_produktartikel_pathkey_cat')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel_pathkey', __('URL-Präfix (Produkte)', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_pathkey'), array('maxlength' => 20, 'help' => 'wpsg_mod_produktartikel_pathkey')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel_pathkey_cat', __('URL-Präfix (Kategorien)', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_pathkey_cat'), array('maxlength' => 20, 'help' => 'wpsg_mod_produktartikel_pathkey_cat')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_showui', __('Custom Post Type in Wordpress Menü sichtbar', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_showui'), array('help' => 'wpsg_mod_produktartikel_showui'))?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_showui', __('Beitragstyp im WordPress-Menü sichtbar', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_showui'), array('help' => 'wpsg_mod_produktartikel_showui'))?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_postthumbnail', __('Produktbild als Beitragsbild übergeben', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_postthumbnail'), array('help' => 'wpsg_mod_produktartikel_postthumbnail')); ?>
@@ -17,7 +17,7 @@ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_showCategory', __('Direkt in den Kategorieansichten anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_showCategory'), array('help' => 'wpsg_mod_produktartikel_showCategory')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_showSearch', __('Direkt in den Suchergebnissen anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_showSearch'), array('help' => 'wpsg_mod_produktartikel_showSearch')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_showFeed', __('Direkt in den Feeds anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_showFeed'), array('help' => 'wpsg_mod_produktartikel_showFeed')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_onlyMainQuery', __('Nur Main Query berücksichtigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_onlyMainQuery'), array('help' => 'wpsg_mod_produktartikel_onlyMainQuery')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_onlyMainQuery', __('Nur Hauptabfrage berücksichtigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_onlyMainQuery'), array('help' => 'wpsg_mod_produktartikel_onlyMainQuery')); ?>
<br />
@@ -69,17 +69,16 @@ <?php } ?>
<?php if (!is_array($this->view['arTemplates']) || sizeof($this->view['arTemplates']) <= 0) { ?>
-<?php echo wpsg_drawForm_Text(__('Produkttemplate für List Ansicht', 'wpsg'), __('Keine Templatedateien gefunden!', 'wpsg'), array('class_content_wrap' => 'wpsg_error')); ?>
+<?php echo wpsg_drawForm_Text(__('Produkttemplate für Listenansicht', 'wpsg'), __('Keine Templatedateien gefunden!', 'wpsg'), array('class_content_wrap' => 'wpsg_error')); ?>
<?php } else { ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_produktartikel_listtemplate', __('Produkttemplate für List Ansicht', 'wpsg'), wpsg_array_merge(array('-1' => __('Wie Produkttemplate', 'wpsg')), $this->view['arTemplates']), wpsg_getStr($this->get_option('wpsg_mod_produktartikel_listtemplate')), array('help' => 'mod_produktartikel_listtemplate', 'noKeys1' => true)); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_produktartikel_listtemplate', __('Produkttemplate für Listenansicht', 'wpsg'), wpsg_array_merge(array('-1' => __('Wie Produkttemplate', 'wpsg')), $this->view['arTemplates']), wpsg_getStr($this->get_option('wpsg_mod_produktartikel_listtemplate')), array('help' => 'mod_produktartikel_listtemplate', 'noKeys1' => true)); ?>
<?php } ?>
<?php if (!is_array($this->view['arTemplates']) || sizeof($this->view['arTemplates']) <= 0) { ?>
-<?php echo wpsg_drawForm_Text(__('Produkttemplate für Such Ansicht', 'wpsg'), __('Keine Templatedateien gefunden!', 'wpsg'), array('class_content_wrap' => 'wpsg_error')); ?>
+<?php echo wpsg_drawForm_Text(__('Produkttemplate für Suchansicht', 'wpsg'), __('Keine Templatedateien gefunden!', 'wpsg'), array('class_content_wrap' => 'wpsg_error')); ?>
<?php } else { ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_produktartikel_searchtemplate', __('Produkttemplate für Such Ansicht', 'wpsg'), wpsg_array_merge(array('-1' => __('Wie Produkttemplate', 'wpsg')), $this->view['arTemplates']), wpsg_getStr($this->get_option('wpsg_mod_produktartikel_searchtemplate')), array('help' => 'mod_produktartikel_searchtemplate', 'noKeys1' => true)); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_produktartikel_searchtemplate', __('Produkttemplate für Suchansicht', 'wpsg'), wpsg_array_merge(array('-1' => __('Wie Produkttemplate', 'wpsg')), $this->view['arTemplates']), wpsg_getStr($this->get_option('wpsg_mod_produktartikel_searchtemplate')), array('help' => 'mod_produktartikel_searchtemplate', 'noKeys1' => true)); ?>
<?php } ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel_rating', __('Anzahl Bewertungen im Frontend', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_rating'), array('help' => 'wpsg_mod_produktartikel_rating')); ?>
<br />
diff --git a/views/mods/mod_produktattribute/settings_edit.phtml b/views/mods/mod_produktattribute/settings_edit.phtml index 1d0e672..761e16b 100644 --- a/views/mods/mod_produktattribute/settings_edit.phtml +++ b/views/mods/mod_produktattribute/settings_edit.phtml @@ -120,7 +120,7 @@ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktattribute_showProduct', __('Produktattribut(e) im Produkttemplate anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktattribute_showProduct'), array('help' => 'wpsg_mod_produktattribute_showProduct')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktattribute_showBasket', __('Produktattribut(e) im Warenkorbtemplate anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktattribute_showBasket'), array('help' => 'wpsg_mod_produktattribute_showBasket')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktattribute_showOverview', __('Produktattribut(e) im Bestellübersichtstemplate anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktattribute_showOverview'), array('help' => 'wpsg_mod_produktattribute_showOverview')); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktattribute_showMail', __('Produktattribut(e) in Mailemplates anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktattribute_showMail'), array('help' => 'wpsg_mod_produktattribute_showMail')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktattribute_showMail', __('Produktattribut(e) in Mailtemplates anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktattribute_showMail'), array('help' => 'wpsg_mod_produktattribute_showMail')); ?>
</div>
</div>
diff --git a/views/mods/mod_rechnungen/accounting_pdf.phtml b/views/mods/mod_rechnungen/accounting_pdf.phtml index fd4c273..c663e4b 100644 --- a/views/mods/mod_rechnungen/accounting_pdf.phtml +++ b/views/mods/mod_rechnungen/accounting_pdf.phtml @@ -174,7 +174,7 @@ if ($bNoTax) {
- $discount_value = $this->view['basket']['arCalculation']['sum']['discount_netto'];
+ $discount_value = abs($this->view['basket']['arCalculation']['sum']['discount_netto']);
$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_netto'];
$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_netto'];
@@ -182,7 +182,7 @@ } else {
- $discount_value = $this->view['basket']['arCalculation']['sum']['discount_brutto'];
+ $discount_value = abs($this->view['basket']['arCalculation']['sum']['discount_brutto']);
$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_brutto'];
$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_brutto'];
@@ -659,7 +659,7 @@ $pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
- $pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] + $this->view['basket']['arCalculation']['sum']['discount_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
+ $pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
//if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) )
$offset += 5;
@@ -897,7 +897,7 @@ }
$bvars_name = $this->callMod('wpsg_mod_ordervars', 'getNameById', array($bvars_id));
- $strBVars .= "\r\n".$bvars_name.": ".$bvars_value;
+ $strBVars .= "\r\n".$bvars_name.((substr($bvars_name, -1) === '?')?' ':': ').$bvars_value;
}
@@ -909,7 +909,7 @@ $filename = $this->view['filename'].".pdf";
- ob_end_clean();
+ if (ob_get_level() > 0) ob_end_clean();
if ($this->view['preview']) {
diff --git a/views/mods/mod_rechnungen/accountingmail.phtml b/views/mods/mod_rechnungen/accountingmail.phtml index dd18ba5..afa04f8 100644 --- a/views/mods/mod_rechnungen/accountingmail.phtml +++ b/views/mods/mod_rechnungen/accountingmail.phtml @@ -11,7 +11,7 @@ <?php echo __("Sie erhalten hiermit die Rechnungskorrektur in Höhe von", "wpsg"); ?> <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?> <?php echo __("für Ihre Bestellung mit der Bestellnummer", "wpsg"); ?> <?php echo ((trim($this->view['data']['onr']) != '')?$this->view['data']['onr']:$this->view['data']['o_id']); ?>.
<?php if (wpsg_tf($this->view['storno_fee']) > 0) { ?>
-<?php echo wpsg_translate(__('Darin ist eine Gebühr von #1# #2# enthalten.', 'wpsg'), $this->view['storno_fee'], $this->get_option('wpsg_currency')); ?>
+<?php echo wpsg_translate(__('Darin ist eine Gebühr von #1# #2# enthalten.', 'wpsg'), wpsg_ff($this->view['storno_fee_value'] ?? wpsg_tf($this->view['storno_fee'])), $this->get_option('wpsg_currency')); ?>
<?php } ?>
<?php echo __("Mit freundlichen Grüßen", "wpsg"); ?>
diff --git a/views/mods/mod_rechnungen/accountingmail_html.phtml b/views/mods/mod_rechnungen/accountingmail_html.phtml index 3208f4e..1c84464 100644 --- a/views/mods/mod_rechnungen/accountingmail_html.phtml +++ b/views/mods/mod_rechnungen/accountingmail_html.phtml @@ -13,7 +13,7 @@ <p><?php echo __("Sie erhalten hiermit die Rechnungskorrektur in Höhe von", "wpsg"); ?> <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?> <?php echo __("für Ihre Bestellung mit der Bestellnummer", "wpsg"); ?> <?php echo ((trim($this->view['data']['onr']) != '')?$this->view['data']['onr']:$this->view['data']['o_id']); ?>.</p>
<?php if (wpsg_tf($this->view['storno_fee']) > 0) { ?>
-<p><?php echo wpsg_translate(__('Darin ist eine Gebühr von #1# #2# enthalten.', 'wpsg'), $this->view['storno_fee'], $this->get_option('wpsg_currency')); ?></p>
+<p><?php echo wpsg_translate(__('Darin ist eine Gebühr von #1# #2# enthalten.', 'wpsg'), wpsg_ff($this->view['storno_fee_value'] ?? wpsg_tf($this->view['storno_fee'])), $this->get_option('wpsg_currency')); ?></p>
<?php } ?>
<p><?php echo __("Mit freundlichen Grüßen", "wpsg"); ?></p>
diff --git a/views/mods/mod_rechnungen/archive.phtml b/views/mods/mod_rechnungen/archive.phtml new file mode 100644 index 0000000..fbc0c35 --- /dev/null +++ b/views/mods/mod_rechnungen/archive.phtml @@ -0,0 +1,153 @@ +<?php
+
+ /**
+ * Archivliste im Reiter „Archiv“ (wird beim Anklicken nachgeladen)
+ */
+
+?>
+<?php $arLegacy = $this->view['arLegacy']; if ($arLegacy['files'] > 0) { ?>
+<?php
+
+ $legacy_url = function($do) {
+
+ return wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&noheader=1&do='.$do, 'wpsg-mod_rechnungen-archive');
+
+ };
+
+ $legacy_path = 'uploads/wpsg_rechnungen/';
+ // Zustand nach den Dateien, nicht nach dem Übernahme-Vermerk: siehe doc/code-kommentar.md#alte-rechnungsablage
+ $nTodo = sizeof($arLegacy['scan']['todo']);
+ $nDone = $arLegacy['scan']['done'];
+ $nUnknown = sizeof($arLegacy['scan']['unknown']) + sizeof($arLegacy['scan']['conflict']);
+
+ $arConfirm = [];
+ if ($nTodo > 0) $arConfirm[] = wpsg_translate(_n('Achtung: #1# Rechnung fehlt noch in der aktuellen Ablage und geht mit dem Löschen verloren.', 'Achtung: #1# Rechnungen fehlen noch in der aktuellen Ablage und gehen mit dem Löschen verloren.', $nTodo, 'wpsg'), $nTodo);
+ if ($nUnknown > 0) $arConfirm[] = wpsg_translate(_n('Achtung: #1# Datei lässt sich keiner Rechnung zuordnen und geht mit dem Löschen verloren.', 'Achtung: #1# Dateien lassen sich keiner Rechnung zuordnen und gehen mit dem Löschen verloren.', $nUnknown, 'wpsg'), $nUnknown);
+ $arConfirm[] = wpsg_translate(_n('Den Ordner #1# mit #2# Datei endgültig löschen? Vorher sichern!', 'Den Ordner #1# mit #2# Dateien endgültig löschen? Vorher sichern!', $arLegacy['files'], 'wpsg'), $legacy_path, $arLegacy['files']);
+
+ $legacy_delete = '<p><a href="'.esc_url($legacy_url('legacyDelete')).'" class="button" onclick="return confirm(\''.esc_js(implode("\n\n", $arConfirm)).'\');">'.__('Alte Ablage löschen', 'wpsg').'</a></p>';
+
+?>
+<div class="wpsg_archive_legacy">
+ <h3><?php echo __('Altbestand', 'wpsg'); ?></h3>
+ <?php if ($nTodo > 0) { ?>
+ <p><?php echo __('Die Übernahme der Rechnungen aus wpShopGermany 3 ist nicht sauber durchgelaufen.', 'wpsg').' '.wpsg_translate(_n('Unter #1# liegt #2# Rechnung, die in der aktuellen Ablage fehlt und sich im Shop nicht herunterladen lässt.', 'Unter #1# liegen #2# Rechnungen, die in der aktuellen Ablage fehlen und sich im Shop nicht herunterladen lassen.', $nTodo, 'wpsg'), '<code>'.$legacy_path.'</code>', $nTodo); ?></p>
+ <?php if ($nUnknown > 0) { ?>
+ <p><?php echo wpsg_translate(_n('#1# Datei lässt sich keiner Rechnung zuordnen und bleibt dort liegen.', '#1# Dateien lassen sich keiner Rechnung zuordnen und bleiben dort liegen.', $nUnknown, 'wpsg'), $nUnknown); ?></p>
+ <?php } ?>
+ <p><a href="<?php echo esc_url($legacy_url('legacyMigrate')); ?>" class="button button-primary"><?php echo wpsg_translate(_n('Alte Ablage übernehmen (#1# Datei)', 'Alte Ablage übernehmen (#1# Dateien)', $nTodo, 'wpsg'), $nTodo); ?></a></p>
+ <?php echo $legacy_delete; ?>
+ <?php } else { ?>
+ <?php if ($arLegacy['result'] !== null) { ?>
+ <p><?php echo wpsg_translate(__('Alte Ablage übernommen am #1#: #2#, #3#.', 'wpsg'), wpsg_formatTimestamp(strtotime($arLegacy['result']['date']), true),
+ wpsg_translate(_n('#1# Datei kopiert', '#1# Dateien kopiert', $arLegacy['result']['copied'], 'wpsg'), $arLegacy['result']['copied']),
+ wpsg_translate(_n('#1# war schon vorhanden', '#1# waren schon vorhanden', $arLegacy['result']['done'], 'wpsg'), $arLegacy['result']['done'])); ?></p>
+ <?php } else { ?>
+ <p><?php echo wpsg_translate(_n('Die Rechnungen aus wpShopGermany 3 wurden vollständig übernommen: #1# Datei liegt auch in der aktuellen Ablage.', 'Die Rechnungen aus wpShopGermany 3 wurden vollständig übernommen: #1# Dateien liegen auch in der aktuellen Ablage.', $nDone, 'wpsg'), $nDone); ?></p>
+ <?php } ?>
+ <?php if ($nUnknown > 0) { ?>
+ <p><?php echo wpsg_translate(_n('#1# Datei lässt sich keiner Rechnung zuordnen und liegt nur in der alten Ablage.', '#1# Dateien lassen sich keiner Rechnung zuordnen und liegen nur in der alten Ablage.', $nUnknown, 'wpsg'), $nUnknown); ?></p>
+ <?php } ?>
+ <p><?php echo wpsg_translate(__('Datenaltbestand aus wpShopGermany 3: Bitte den Ordner #1# sichern und anschließend löschen.', 'wpsg'), '<code>'.$legacy_path.'</code>'); ?></p>
+ <?php echo $legacy_delete; ?>
+ <?php } ?>
+</div>
+<?php } ?>
+<?php if (sizeof($this->view['arArchive']) === 0) { ?>
+ <p><?php echo __('Es sind noch keine Rechnungen vorhanden.', 'wpsg'); ?></p>
+<?php } else { ?>
+
+<?php
+
+ $archive_url = function($do, $period) {
+
+ return wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&noheader=1&do='.$do.'&period='.rawurlencode($period), 'wpsg-mod_rechnungen-archive');
+
+ };
+
+ $archive_actions = function($period, $year, $files) use ($archive_url) {
+
+ if ($files <= 0) return '';
+
+ $keep_until = $this->callMod('wpsg_mod_rechnungen', 'getArchiveKeepUntil', [$year]);
+ $confirm = wpsg_translate(__('Alle Rechnungsdateien aus #1# endgültig löschen? Die Einträge in den Bestellungen bleiben, die PDFs lassen sich danach nicht mehr herunterladen. Vorher das ZIP sichern!', 'wpsg'), $period);
+
+ if (date('Y-m-d') <= $keep_until) $confirm = wpsg_translate(__('Achtung: Die Aufbewahrungsfrist für #1# läuft noch bis #2#.', 'wpsg'), $period, wpsg_formatTimestamp(strtotime($keep_until), true))."\n\n".$confirm;
+
+ return '<span style="white-space:nowrap;"><a href="'.esc_url($archive_url('archiveZip', $period)).'" class="button">'.__('ZIP', 'wpsg').'</a> '.
+ '<a href="'.esc_url($archive_url('archiveDelete', $period)).'" class="button" onclick="return confirm(\''.esc_js($confirm).'\');">'.__('Löschen', 'wpsg').'</a></span> ';
+
+ };
+
+?>
+
+<style>.wpsg_mod_rechnungen_archive td { white-space:nowrap; } .wpsg_mod_rechnungen_archive th, .wpsg_mod_rechnungen_archive .wpsg_archive_deleted { white-space:normal; } .wpsg_archive_toggle { text-decoration:none; color:inherit; } .wpsg_archive_toggle .dashicons { vertical-align:text-bottom; }</style>
+<?php
+
+ // Jahre ohne verbliebene Dateien, aber mit Löschvermerk: Ansicht „Gelöscht“
+ $arArchiveView = ['present' => [], 'deleted' => []];
+
+ foreach ($this->view['arArchive'] as $year => $arMonth) {
+
+ $bDeleted = (array_sum(array_column($arMonth, 'files')) === 0 && sizeof(array_filter(array_column($arMonth, 'deleted'))) > 0);
+ $arArchiveView[($bDeleted)?'deleted':'present'][$year] = $arMonth;
+
+ }
+
+?>
+
+<p class="wpsg_archive_views">
+ <a href="#" class="button button-primary" data-view="present"><?php echo wpsg_translate(__('Vorhanden (#1#)', 'wpsg'), sizeof($arArchiveView['present'])); ?></a>
+ <?php if (sizeof($arArchiveView['deleted']) > 0) { ?>
+ <a href="#" class="button" data-view="deleted"><?php echo wpsg_translate(__('Gelöscht (#1#)', 'wpsg'), sizeof($arArchiveView['deleted'])); ?></a>
+ <?php } ?>
+</p>
+
+<?php foreach ($arArchiveView as $view => $arYear) { if (sizeof($arYear) === 0) continue; ?>
+<table class="table wpsg_mod_rechnungen_archive" data-view="<?php echo $view; ?>" <?php echo ($view === 'deleted')?'style="display:none;"':''; ?>>
+ <thead>
+ <tr>
+ <th><?php echo __('Zeitraum', 'wpsg'); ?></th>
+ <th class="col_number"><?php echo __('Rechnungen', 'wpsg'); ?></th>
+ <th class="col_number"><?php echo str_replace('skorrektur', 's­korrektur', esc_html(__('Rechnungskorrekturen', 'wpsg'))); ?></th>
+ <th class="col_number"><?php echo __('Dateien', 'wpsg'); ?></th>
+ <th class="col_number"><?php echo __('Größe', 'wpsg'); ?></th>
+ <th><?php echo __('Aufbewahrung bis', 'wpsg'); ?></th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php $bOpen = ($view === 'present'); ?>
+ <?php foreach ($arYear as $year => $arMonth) { ?>
+ <?php $files = array_sum(array_column($arMonth, 'files')); ?>
+ <tr class="wpsg_archive_year" data-year="<?php echo $year; ?>">
+ <td><a href="#" class="wpsg_archive_toggle"><span class="dashicons dashicons-arrow-<?php echo ($bOpen)?'down':'right'; ?>"></span><strong><?php echo $year; ?></strong></a></td>
+ <td class="col_number"><strong><?php echo array_sum(array_column($arMonth, 'rnr')); ?></strong></td>
+ <td class="col_number"><strong><?php echo array_sum(array_column($arMonth, 'gnr')); ?></strong></td>
+ <td class="col_number"><strong><?php echo $files; ?></strong></td>
+ <td class="col_number"><strong><?php echo ($files > 0)?size_format(array_sum(array_column($arMonth, 'size')), 1):''; ?></strong></td>
+ <td><?php echo wpsg_formatTimestamp(strtotime($this->callMod('wpsg_mod_rechnungen', 'getArchiveKeepUntil', [$year])), true); ?></td>
+ <td class="col_actions"><?php echo $archive_actions(strval($year), $year, $files); ?></td>
+ </tr>
+ <?php foreach ($arMonth as $month => $m) { ?>
+ <tr class="wpsg_archive_month" data-year="<?php echo $year; ?>" <?php echo ($bOpen)?'':'style="display:none;"'; ?>>
+ <td> <?php echo $year.'/'.$month; ?></td>
+ <td class="col_number"><?php echo $m['rnr']; ?></td>
+ <td class="col_number"><?php echo $m['gnr']; ?></td>
+ <td class="col_number"><?php echo $m['files']; ?></td>
+ <td class="col_number"><?php echo ($m['files'] > 0)?size_format($m['size'], 1):''; ?></td>
+ <td></td>
+ <td class="col_actions" style="white-space:normal;">
+ <?php if ($m['files'] > 0) echo $archive_actions($year.'/'.$month, $year, $m['files']); ?>
+ <?php if ($m['deleted'] !== false) echo '<span class="wpsg_archive_deleted">'.wpsg_translate(__('Dateien gelöscht am #1#', 'wpsg'), wpsg_formatTimestamp(strtotime($m['deleted']), true)).'</span>'; ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php $bOpen = false; ?>
+ <?php } ?>
+ </tbody>
+</table>
+<?php } ?>
+
+<?php } ?>
+
diff --git a/views/mods/mod_rechnungen/invoice_pdf.phtml b/views/mods/mod_rechnungen/invoice_pdf.phtml index c5d649c..2f497c1 100644 --- a/views/mods/mod_rechnungen/invoice_pdf.phtml +++ b/views/mods/mod_rechnungen/invoice_pdf.phtml @@ -75,12 +75,7 @@ $abscissa = $rightPos;
$ordinate = 0;
- $transparency = str_replace("%", "", $shop->get_option('wpsg_rechnungen_logo_transparency'));
- if($transparency !== "100") $transparency = str_replace(array("0", "00"), "", $transparency);
-
- $alpha = 1;
- if(!is_null($transparency) && $transparency !== "100") $alpha = "0.$transparency";
- if(!is_null($transparency) && $transparency === "100") $alpha = $transparency;
+ $alpha = wpsg_logo_alpha($shop->get_option('wpsg_rechnungen_logo_transparency'));
$logo_pos = $shop->get_option('wpsg_rechnungen_logo_position');
@@ -922,7 +917,7 @@ }
$bvars_name = $this->callMod('wpsg_mod_ordervars', 'getNameById', array($bvars_id));
- $strBVars .= "\r\n".$bvars_name.": ".$bvars_value;
+ $strBVars .= "\r\n".$bvars_name.((substr($bvars_name, -1) === '?')?' ':': ').$bvars_value;
}
diff --git a/views/mods/mod_rechnungen/multi_invoice_pdf.phtml b/views/mods/mod_rechnungen/multi_invoice_pdf.phtml index b0c9344..c1aea97 100644 --- a/views/mods/mod_rechnungen/multi_invoice_pdf.phtml +++ b/views/mods/mod_rechnungen/multi_invoice_pdf.phtml @@ -91,12 +91,7 @@ $sum = $this->view['multi_data']['orders'][0]['sum']; $abscissa = $rightPos;
$ordinate = 0;
- $transparency = str_replace("%", "", $shop->get_option('wpsg_rechnungen_logo_transparency'));
- if($transparency !== "100") $transparency = str_replace(array("0", "00"), "", $transparency);
-
- $alpha = 1;
- if(!is_null($transparency) && $transparency !== "100") $alpha = "0.$transparency";
- if(!is_null($transparency) && $transparency === "100") $alpha = $transparency;
+ $alpha = wpsg_logo_alpha($shop->get_option('wpsg_rechnungen_logo_transparency'));
$logo_pos = $shop->get_option('wpsg_rechnungen_logo_position');
@@ -514,20 +509,23 @@ $sum = $this->view['multi_data']['orders'][0]['sum']; if ($bTaxCol) {
$pdf->setXY($prod_left + 97, $prod_top + $offset + $sum_multi_offset);
- $pdf->Cell(15, 8, (($bNoTax)?'0.00 %':wpsg_ff($arCalculation['tax'][$oOrderProduct->getTaxKey().'_'.$oOrder->getInvoiceCountry()->getId()]['tax_value'], '%')), 0, 0, 'C');
+ $pdf->Cell(15, 8, (($bNoTax)?'0.00 %':wpsg_ff($arCalculation['tax'][$oOrderProduct->getTaxKey().'_'.$oOrder->getInvoiceCountry()->getId()]['tax_value']??0, '%')), 0, 0, 'C');
}
$pdf->setXY($prod_left + 112, $prod_top + $offset + $sum_multi_offset);
$pdf->Cell(15, 8, $oOrderProduct->getAmount(), 0, 0, 'C');
- $preis = $oOrderProduct->getPrice(wpsg_ShopController::getShop()->getFrontendTaxview());
+ // Steuerfreie Bestellung: Nettopreise wie in der Einzelrechnung
+ $price_view = ((abs($arCalculation['sum']['brutto'] - $arCalculation['sum']['netto']) < 0.005)?WPSG_NETTO:wpsg_ShopController::getShop()->getFrontendTaxview());
+
+ $preis = round($oOrderProduct->getPrice($price_view), 2);
$pdf->setXY($prod_left + 127, $prod_top + $offset + $sum_multi_offset);
$pdf->Cell(25, 8, wpsg_ff($preis, $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset + $sum_multi_offset);
- $pdf->Cell(25, 8, wpsg_ff($oOrderProduct->getPriceSum(wpsg_ShopController::getShop()->getFrontendTaxview()), $this->get_option('wpsg_currency')), 0, 0, 'R');
+ $pdf->Cell(25, 8, wpsg_ff($preis * $oOrderProduct->getAmount(), $this->get_option('wpsg_currency')), 0, 0, 'R');
/**
* Produktbeschreibung anzeigen Ja/Nein
diff --git a/views/mods/mod_rechnungen/multi_invoicemail.phtml b/views/mods/mod_rechnungen/multi_invoicemail.phtml index 9e0c31e..5810a25 100644 --- a/views/mods/mod_rechnungen/multi_invoicemail.phtml +++ b/views/mods/mod_rechnungen/multi_invoicemail.phtml @@ -10,7 +10,7 @@ foreach ($this->view['multi_data']['order_data'] as $order_data) {
$oOrder = $order_data['oOrder'];
- $str['onr'][] = intval($oOrder->getNr());
+ $str['onr'][] = $oOrder->getNr();
}
diff --git a/views/mods/mod_rechnungen/multi_invoicemail_html.phtml b/views/mods/mod_rechnungen/multi_invoicemail_html.phtml index 8e2b02e..2aef894 100644 --- a/views/mods/mod_rechnungen/multi_invoicemail_html.phtml +++ b/views/mods/mod_rechnungen/multi_invoicemail_html.phtml @@ -12,7 +12,7 @@ foreach ($this->view['multi_data']['order_data'] as $order_data) {
$oOrder = $order_data['oOrder'];
- $str['onr'][] = intval($oOrder->getNr());
+ $str['onr'][] = $oOrder->getNr();
}
diff --git a/views/mods/mod_rechnungen/order_view.phtml b/views/mods/mod_rechnungen/order_view.phtml index 3020df2..6487bce 100644 --- a/views/mods/mod_rechnungen/order_view.phtml +++ b/views/mods/mod_rechnungen/order_view.phtml @@ -43,17 +43,17 @@ 'template_url': '<?php echo wpsg_ShopController::getShop()->getRessourceURL('mods/mod_rechnungen/html/e_invoice_app.html'); ?>',
'default_profile': <?php echo intval(wpsg_ShopController::getShop()->get_option('wpsg_mod_rechnungen_einvoice')); ?>,
'arProfile': <?php echo json_encode([
- 100 + ZugferdProfiles::PROFILE_MINIMUM => ['label' => __('EN16931 Minimum', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_MINIMUM)],
+ 100 + ZugferdProfiles::PROFILE_EN16931 => ['label' => __('EN16931 Comfort (empfohlen)', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_EN16931)],
100 + ZugferdProfiles::PROFILE_BASIC => ['label' => __('EN16931 Basic', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_BASIC)],
- 100 + ZugferdProfiles::PROFILE_BASICWL => ['label' => __('EN16931 Basic WL', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_BASICWL)],
- 100 + ZugferdProfiles::PROFILE_EN16931 => ['label' => __('EN16931 Comfort', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_EN16931)],
100 + ZugferdProfiles::PROFILE_EXTENDED => ['label' => __('EN16931 Extended', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_EXTENDED)],
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG => ['label' => __('EN16931 XRechnung 1', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG)],
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2 => ['label' => __('EN16931 XRechnung 2', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2)],
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_1 => ['label' => __('EN16931 XRechnung 2.1', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2_1)],
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_2 => ['label' => __('EN16931 XRechnung 2.2', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2_2)],
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_3 => ['label' => __('EN16931 XRechnung 2.3', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2_3)],
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG_3 => ['label' => __('EN16931 XRechnung 3', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_3)]
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG_3 => ['label' => __('XRechnung 3 (für öffentliche Auftraggeber)', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_3)],
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_3 => ['label' => __('XRechnung 2.3', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2_3)],
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_2 => ['label' => __('XRechnung 2.2', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2_2)],
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_1 => ['label' => __('XRechnung 2.1', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2_1)],
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2 => ['label' => __('XRechnung 2', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2)],
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG => ['label' => __('XRechnung 1', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG)],
+ 100 + ZugferdProfiles::PROFILE_MINIMUM => ['label' => __('ZUGFeRD Minimum (keine gültige E-Rechnung)', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_MINIMUM)],
+ 100 + ZugferdProfiles::PROFILE_BASICWL => ['label' => __('ZUGFeRD Basic WL (keine gültige E-Rechnung)', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_BASICWL)]
]); ?>
});
diff --git a/views/mods/mod_rechnungen/order_view_orderdata_after.phtml b/views/mods/mod_rechnungen/order_view_orderdata_after.phtml index 55ec2a0..2373b9e 100755 --- a/views/mods/mod_rechnungen/order_view_orderdata_after.phtml +++ b/views/mods/mod_rechnungen/order_view_orderdata_after.phtml @@ -308,7 +308,7 @@ <label for="storno_state"><?php echo __('Neuer Status', 'wpsg'); ?></label> <select name="storno_state_new"> <?php foreach ($this->arStatus as $status_key => $status_label) { ?> - <option value="<?php echo $status_key; ?>"><?php echo $status_label; ?></option> + <option value="<?php echo $status_key; ?>" <?php echo (($oOrder !== null && strval($status_key) === strval($oOrder->status))?'selected="selected"':''); ?>><?php echo $status_label; ?></option> <?php } ?> </select> diff --git a/views/mods/mod_rechnungen/settings_edit.phtml b/views/mods/mod_rechnungen/settings_edit.phtml index 73aa609..346dc43 100644 --- a/views/mods/mod_rechnungen/settings_edit.phtml +++ b/views/mods/mod_rechnungen/settings_edit.phtml @@ -6,20 +6,26 @@ use horstoeko\zugferd\ZugferdProfiles;
- $ArrZugferdProfile = [
- 0 => __('Keine E-Rechnungsdaten erzeugen', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_MINIMUM => __('EN16931 Minimum', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_BASIC => __('EN16931 Basic', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_BASICWL => __('EN16931 Basic WL', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_EN16931 => __('EN16931 Comfort', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_EXTENDED => __('EN16931 Extended', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG => __('EN16931 XRechnung 1', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2 => __('EN16931 XRechnung 2', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_1 => __('EN16931 XRechnung 2.1', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_2 => __('EN16931 XRechnung 2.2', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_3 => __('EN16931 XRechnung 2.3', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG_3 => __('EN16931 XRechnung 3', 'wpsg'),
- ]
+ /*
+ * Profile in zwei Gruppen: oben die Profile, die der Validator als E-Rechnung
+ * anerkennt, unten MINIMUM und BASIC WL. Diese beiden sind keine gültigen
+ * E-Rechnungen - der KoSIT-Validator findet für sie kein Prüfszenario und weist
+ * das Dokument als "Dokumenttyp unbekannt" zurück.
+ */
+ $ArrZugferdProfile = [
+ 0 => __('Keine E-Rechnungsdaten erzeugen', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_EN16931 => __('EN16931 Comfort (empfohlen)', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_BASIC => __('EN16931 Basic', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_EXTENDED => __('EN16931 Extended', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG_3 => __('XRechnung 3 (für öffentliche Auftraggeber)', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_3 => __('XRechnung 2.3', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_2 => __('XRechnung 2.2', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_1 => __('XRechnung 2.1', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2 => __('XRechnung 2', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG => __('XRechnung 1', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_MINIMUM => __('ZUGFeRD Minimum (nur Buchungshilfe, keine gültige E-Rechnung)', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_BASICWL => __('ZUGFeRD Basic WL (ohne Positionen, keine gültige E-Rechnung)', 'wpsg'),
+ ]
?>
@@ -28,6 +34,7 @@ <li role="presentation" class="active"><a href="#tab1" aria-controls="home" role="tab" data-toggle="tab"><?php echo __('Vordefinierte Textfelder', 'wpsg'); ?></a></li>
<li role="presentation"><a href="#tab2" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Fußzeile', 'wpsg'); ?></a></li>
<li role="presentation"><a href="#tab3" aria-controls="messages" role="tab" data-toggle="tab"><?php echo __('Sonstiges', 'wpsg'); ?></a></li>
+ <li role="presentation"><a href="#tab4" aria-controls="archive" role="tab" data-toggle="tab"><?php echo __('Archiv', 'wpsg'); ?></a></li>
</ul>
<div class="tab-content">
<div id="tab1" role="tabpanel" class="tab-pane active" >
@@ -192,7 +199,7 @@ <br /><br />
<div class="info">
<p style="line-height:normal;">
- <?php echo __('Hier können Sie Texte vordefinieren, die sie unter die Rechnung setzen können.', 'wpsg'); ?>
+ <?php echo __('Hier können Sie Texte vordefinieren, die Sie unter die Rechnung setzen können.', 'wpsg'); ?>
</p>
</div>
@@ -201,7 +208,12 @@ <?php echo wpsg_drawForm_Select('wpsg_mod_rechnungen_einvoice', __('E-Rechnung', 'wpsg'), $ArrZugferdProfile, $this->get_option('wpsg_mod_rechnungen_einvoice'), ['help' => 'wpsg_mod_rechnungen_einvoice']); ?>
- <p style="line-height:normal; margin-bottom:1rem; margin-top:1rem; display:none; font-style:italic;" id="wpsg_mod_rechnungen_einvoice_description"><?php echo __('Die Platzhalter können bei den Formatfeldern und dem Dateinamen verwendet werden. Der Platzhalter %nr% sollte dabei immer Verwendung finden.', 'wpsg'); ?></p>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_cmyk_profile', __('CMYK-Farbprofil einbetten', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_cmyk_profile'), ['help' => 'wpsg_mod_rechnungen_cmyk_profile']); ?>
+
+ <p style="line-height:normal; margin-bottom:1rem; font-style:italic;">
+ <?php echo __('Nur nötig, wenn Ihr Logo oder ein als JPG hinterlegtes Briefpapier CMYK-Farben enthält. PDF/A-3 verlangt dafür ein Farbprofil in der Rechnung, sonst weisen Prüfprogramme die E-Rechnung zurück. Für ein Briefpapier im PDF-Format hilft die Option nicht, weil ein eingebundenes PDF seine Farben aus den eigenen Ressourcen auflöst; ein solches Briefpapier muss selbst in RGB vorliegen. Die Option vergrößert jede Rechnung um etwa 120 KB und bleibt deshalb standardmäßig aus.', 'wpsg'); ?>
+ </p>
<?php
array_walk($ArrZugferdProfile, function(&$v, $k) {
@@ -211,29 +223,6 @@ });
?>
- <script>
-
- const eInvoiceProfileDev = <?php echo json_encode($ArrZugferdProfile); ?>;
- const el_wpsg_mod_rechnungen_einvoice_description = document.getElementById('wpsg_mod_rechnungen_einvoice_description');
-
- document.getElementById('wpsg_mod_rechnungen_einvoice').addEventListener('change', ev => {
-
- if (eInvoiceProfileDev[ev.target.value] !== null) {
-
- el_wpsg_mod_rechnungen_einvoice_description.innerText = eInvoiceProfileDev[ev.target.value].description;
- el_wpsg_mod_rechnungen_einvoice_description.style.display = 'block';
-
- } else {
-
- el_wpsg_mod_rechnungen_einvoice_description.style.display = 'hidden';
-
- }
-
- });
-
- document.getElementById('wpsg_mod_rechnungen_einvoice').dispatchEvent(new Event('change'));
-
- </script>
<?php echo wpsg_drawForm_Input('wpsg_rechnungen_url', __('URL Benachrichtigung', 'wpsg'), $this->get_option('wpsg_rechnungen_url'), array('help' => 'wpsg_rechnung_url')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_rechnungen_auto', __('Rechnungserstellung', 'wpsg'), array(
@@ -260,7 +249,9 @@ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_hideCountry', __('Land auf Rechnung verbergen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_hideCountry'), array('help' => 'wpsg_mod_rechnungen_hideCountry')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_customermail', __('Rechnung/PDF an Bestellbestätigungsmail anhängen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_customermail'), ['help' => 'wpsg_mod_rechnungen_customermail']); ?>
<?php echo wpsg_drawForm_Input('wpsg_rechnungen_start', __('Startnummer (Rechnungen)', 'wpsg'), $this->get_option('wpsg_rechnungen_start'), array('help' => 'wpsg_rechnungen_start')); ?>
+ <input type="hidden" name="wpsg_rechnungen_start_loaded" value="<?php echo esc_attr($this->get_option('wpsg_rechnungen_start')); ?>" />
<?php echo wpsg_drawForm_Input('wpsg_gutschrift_start', __('Startnummer (Rechnungskorrektur)', 'wpsg'), $this->get_option('wpsg_gutschrift_start'), array('help' => 'wpsg_gutschrift_start')); ?>
+ <input type="hidden" name="wpsg_gutschrift_start_loaded" value="<?php echo esc_attr($this->get_option('wpsg_gutschrift_start')); ?>" />
<?php echo wpsg_drawForm_Select('wpsg_mod_rechnungen_gutschrifttax', __('Mehrwertsteuersatz für Bearbeitungsgebühr', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_rechnungen_gutschrifttax'), array('help' => 'wpsg_mod_rechnungen_gutschrifttax')); ?>
<?php echo wpsg_drawForm_Input('wpsg_rechnungen_format', __('Format (Rechnungen)', 'wpsg'), $this->get_option('wpsg_rechnungen_format'), array('help' => 'wpsg_rechnungen_format')); ?>
<?php echo wpsg_drawForm_Input('wpsg_gutschrift_format', __('Format (Rechnungskorrektur)', 'wpsg'), $this->get_option('wpsg_gutschrift_format'), array('help' => 'wpsg_gutschrift_format')); ?>
@@ -286,10 +277,19 @@ <?php echo wpsg_drawForm_TextEnd(__('Mögliche Platzhalter für Rechnungen und Rechnungskorrektur', 'wpsg'), array('noP' => true)); ?>
<?php echo wpsg_drawForm_TextStart(); ?>
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&do=rebuildInvoice&noheader=1" class="button primary" onclick="return confirm('Sind Sie sich sicher? Dies ist eine Admin Funktion und sollte nur mit bedacht ausgeführt werden. Vorher Backup machen!')">Fehlende Rechnungen mit Rechnunsdaten nachbauen.</a>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&do=rebuildInvoice&noheader=1" class="button primary" style="white-space:normal; height:auto;" onclick="return confirm('<?php echo esc_js(__('Sind Sie sich sicher? Dies ist eine Admin-Funktion und sollte nur mit Bedacht ausgeführt werden. Vorher Backup machen!', 'wpsg')); ?>')"><?php echo __('Fehlende Rechnungen mit Rechnungsdaten nachbauen', 'wpsg'); ?></a>
<?php echo wpsg_drawForm_TextEnd('Funktionen'); ?>
</div>
+ <div id="tab4" role="tabpanel" class="tab-pane" >
+
+ <div id="wpsg_archive_list" data-url="<?php echo esc_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&noheader=1&do=archiveList'); ?>"><p><span class="spinner is-active" style="float:none; margin:0 8px 0 0;"></span><?php echo __('Archiv wird geladen …', 'wpsg'); ?></p></div>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <p style="line-height:normal;"><?php echo __('Rechnungen und Rechnungskorrekturen sind acht Jahre ab Ende des Rechnungsjahres aufzubewahren (§ 147 AO). Gelöscht werden nur die Dateien; Rechnungsnummern und Einträge in den Bestellungen bleiben. „Fehlende Rechnungen nachbauen“ erzeugt gelöschte Zeiträume nicht neu.', 'wpsg'); ?></p>
+ <?php echo wpsg_drawForm_TextEnd(__('Hinweis', 'wpsg'), ['noP' => true]); ?>
+
+ </div>
</div>
</div>
@@ -297,6 +297,41 @@ <script>
jQuery(document).ready(function() {
+
+ jQuery('[href="#tab4"]').on('shown.bs.tab', function() {
+
+ var oList = jQuery('#wpsg_archive_list');
+
+ if (oList.data('loaded') === true) return;
+ oList.data('loaded', true);
+
+ jQuery.get(oList.data('url'), function(html) { oList.html(html); } );
+
+ } );
+
+ if (location.hash === '#tab4') jQuery('[href="#tab4"]').tab('show');
+
+ jQuery('#wpsg_archive_list').on('click', '.wpsg_archive_toggle', function() {
+
+ var year = jQuery(this).closest('tr').data('year');
+ var oTable = jQuery(this).closest('table');
+
+ oTable.find('.wpsg_archive_month[data-year="' + year + '"]').toggle();
+ jQuery(this).find('.dashicons').toggleClass('dashicons-arrow-right dashicons-arrow-down');
+
+ return false;
+
+ } );
+
+ jQuery('#wpsg_archive_list').on('click', '.wpsg_archive_views .button', function() {
+
+ jQuery('.wpsg_archive_views .button').removeClass('button-primary');
+ jQuery(this).addClass('button-primary');
+ jQuery('table.wpsg_mod_rechnungen_archive').hide().filter('[data-view="' + jQuery(this).data('view') + '"]').show();
+
+ return false;
+
+ } );
jQuery('#wpsg_mod_rechnungen_customermail').on('change', function() {
diff --git a/views/mods/mod_relatedproducts/settings_edit.phtml b/views/mods/mod_relatedproducts/settings_edit.phtml index 3c6a602..410f078 100644 --- a/views/mods/mod_relatedproducts/settings_edit.phtml +++ b/views/mods/mod_relatedproducts/settings_edit.phtml @@ -17,7 +17,7 @@ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_relatedproducts_showAjaxDialog', __('Zubehörprodukte im Warenkorb-Lightbox anpreisen', 'wpsg'), $this->get_option('wpsg_mod_relatedproducts_showAjaxDialog'), array('help' => 'wpsg_mod_relatedproducts_showAjaxDialog')); ?>
<div class="wpsg_mod_relatedproducts_showAjaxDialog_activ" style="display:none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_relatedproducts_showAjaxDialogLimit', __('Maximale Anzahl an angezeigten Produkten', 'wpsg'), $this->get_option('wpsg_mod_relatedproducts_showAjaxDialogLimit'), array('help' => 'wpsg_mod_relatedproducts_showAjaxDialogLimits')); ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_relatedproducts_showAjaxDialogTemplate', __('Tempalte für die Zubehörprodukte in der Lightbox', 'wpsg'), $this->view['wpsg_mod_relatedproducts']['arTemplates'], $this->get_option('wpsg_mod_relatedproducts_showAjaxDialogTemplate'), array('help' => 'wpsg_mod_relatedproducts_showAjaxDialogTemplate')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_relatedproducts_showAjaxDialogTemplate', __('Template für die Zubehörprodukte in der Lightbox', 'wpsg'), $this->view['wpsg_mod_relatedproducts']['arTemplates'], $this->get_option('wpsg_mod_relatedproducts_showAjaxDialogTemplate'), array('help' => 'wpsg_mod_relatedproducts_showAjaxDialogTemplate')); ?>
</div>
<script type="text/javascript">/* <![CDATA[ */
diff --git a/views/mods/mod_request/requestmail.phtml b/views/mods/mod_request/requestmail.phtml index 2d619ca..bbf6532 100644 --- a/views/mods/mod_request/requestmail.phtml +++ b/views/mods/mod_request/requestmail.phtml @@ -105,7 +105,7 @@ <?php echo wpsg_pad_right(__('UStIdNr.', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['ustidnr']), 46); ?>
<?php /* Automatische Einbindung der benutzerdefinierten Felder BEGIN */ ?>
<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_customerdata'))) { ?>
-<?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
+<?php foreach ((array)($this->view['pflicht']['custom']??[]) as $c_id => $c) { if ($c['show'] != '2') { ?>
<?php echo wpsg_pad_right(__($c['name'], 'wpsg').': ', 30); ?><?php if ($c['typ'] == '2') { ?>
<?php if (wpsg_isSizedInt($this->view['requestlist']['customer']['custom'][$c_id])) { ?><?php echo wpsg_pad_left(__('Ja', 'wpsg'), 46); ?><?php } else { ?><?php echo wpsg_pad_left(__('Nein', 'wpsg'), 46); ?><?php } ?>
<?php } else { ?>
diff --git a/views/mods/mod_request/requestmail_html.phtml b/views/mods/mod_request/requestmail_html.phtml index 3bd016e..5cdd0b7 100644 --- a/views/mods/mod_request/requestmail_html.phtml +++ b/views/mods/mod_request/requestmail_html.phtml @@ -185,7 +185,7 @@ <?php /* Automatische Einbindung der benutzerdefinierten Felder BEGIN */ ?>
<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_customerdata'))) { ?>
- <?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
+ <?php foreach ((array)($this->view['pflicht']['custom']??[]) as $c_id => $c) { if ($c['show'] != '2') { ?>
<tr>
<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __($c['name'], 'wpsg'); ?></td>
<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1">
diff --git a/views/mods/mod_request/requestpage.phtml b/views/mods/mod_request/requestpage.phtml index fa24449..7eb7fae 100644 --- a/views/mods/mod_request/requestpage.phtml +++ b/views/mods/mod_request/requestpage.phtml @@ -187,8 +187,7 @@ <tr class="wpsg_row_product_pv">
<td class="wpsg_cell_label">
<label class="wpsg_checkout" for="wpsg_request_pv_<?php echo $pv['id']; ?>_<?php echo $request_product['product_index']; ?>">
- <?php echo wpsg_hspc($pv['name']); ?>
- <?php if (wpsg_isSizedInt($pv['pflicht'])) { ?><span class="wpsg_required">*</span><?php } ?>:
+ <?php echo wpsg_hspc($pv['name']); ?><?php if (wpsg_isSizedInt($pv['pflicht'])) { ?> <span class="wpsg_required">*</span><?php } ?>:
</label>
</td>
<td class="wpsg_cell_value" colspan="<?php echo (2 + $this->view['addColspan']); ?>">
@@ -279,87 +278,91 @@ <h2><?php echo __('Kontaktdaten', 'wpsg'); ?></h2>
- <div class="wpsg_checkoutblock" id="wpsg_firma">
- <label for="wpsg_firma" class="wpsg_checkout"><?php echo __("Firma", "wpsg"); ?>
- <?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ <?php if ($this->view['pflicht']['firma'] != '2') { ?>
+ <div class="wpsg_checkoutblock" id="wpsg_firma_block">
+ <label for="wpsg_firma" class="wpsg_checkout"><?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[request][customer][firma]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['firma'])); ?>" />
</div>
+ <?php } ?>
+ <?php if ($this->view['pflicht']['anrede'] != '2') { ?>
<div class="wpsg_checkoutblock" id="wpsg_anrede">
- <label for="wpsg_title"><?php echo __('Anrede', 'wpsg'); ?>
- <?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label>
+ <label for="wpsg_title" class="wpsg_checkout"><?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[request][customer][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['requestlist']['customer']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
+ <option value="<?php echo $i; ?>" <?php echo ((strval($this->view['requestlist']['customer']['title'] ?? '-1') === strval($i))?'selected="selected"':''); $i++; ?>><?php echo $t; ?></option>
<?php } ?>
</select>
</div>
+ <?php } ?>
+ <?php if ($this->view['pflicht']['vname'] != '2') { ?>
<div class="wpsg_checkoutblock" id="wpsg_vorname">
- <label for="vname" class="wpsg_checkout"><?php echo __("Vorname", "wpsg"); ?>
- <?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ <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[request][customer][vname]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['vname'])); ?>" />
</div>
+ <?php } ?>
+ <?php if ($this->view['pflicht']['name'] != '2') { ?>
<div class="wpsg_checkoutblock" id="wpsg_name">
- <label for="name" class="wpsg_checkout"><?php echo __("Name", "wpsg"); ?>
- <?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ <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[request][customer][name]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['name'])); ?>" />
</div>
+ <?php } ?>
<div class="wpsg_checkoutblock" id="wpsg_email">
- <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 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="<?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="email" name="wpsg[request][customer][email]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['email'])); ?>" />
</div>
<?php if (wpsg_isSizedInt($this->view['pflicht']['emailconfirm'])) { ?>
<div class="wpsg_checkoutblock" id="wpsg_email2">
- <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 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="<?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="email2" name="wpsg[request][customer][email2]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['email2'])); ?>" />
</div>
<?php } ?>
+ <?php if ($this->view['pflicht']['geb'] != '2') { ?>
<div class="wpsg_checkoutblock" id="wpsg_geburtsdatum">
- <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 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="<?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[request][customer][geb]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['geb'])); ?>" />
</div>
+ <?php } ?>
+ <?php if ($this->view['pflicht']['fax'] != '2') { ?>
<div class="wpsg_checkoutblock" id="wpsg_fax">
- <label for="fax" class="wpsg_checkout"><?php echo __("Fax.", "wpsg"); ?>
- <?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ <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="<?php echo (($this->view['pflicht']['fax'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("fax", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="fax" name="wpsg[request][customer][fax]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['fax'])); ?>" />
</div>
+ <?php } ?>
+ <?php if ($this->view['pflicht']['tel'] != '2') { ?>
<div class="wpsg_checkoutblock" id="wpsg_telefon">
- <label for="tel" class="wpsg_checkout"><?php echo __("Tel.", "wpsg"); ?>
- <?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ <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="<?php echo (($this->view['pflicht']['tel'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("tel", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="tel" name="wpsg[request][customer][tel]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['tel'])); ?>" />
</div>
+ <?php } ?>
+ <?php if ($this->view['pflicht']['strasse'] != '2') { ?>
<div class="wpsg_checkoutblock" id="wpsg_strasse">
<?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 } ?>:
+ <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[request][customer][strasse]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['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 } ?>:
+ <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[request][customer][nr]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['requestlist']['customer']['nr'])); ?>" />
</label>
@@ -367,32 +370,34 @@ <?php } else { ?>
- <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 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[request][customer][strasse]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['strasse'])); ?>" />
<?php } ?>
</div>
+ <?php } ?>
+ <?php if ($this->view['pflicht']['plz'] != '2') { ?>
<div class="wpsg_checkoutblock" id="wpsg_postleitzahl">
- <label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl", "wpsg"); ?>
- <?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ <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="<?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[request][customer][plz]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['plz'])); ?>" />
</div>
+ <?php } ?>
+ <?php if ($this->view['pflicht']['ort'] != '2') { ?>
<div class="wpsg_checkoutblock" id="wpsg_ort">
- <label for="ort" class="wpsg_checkout"><?php echo __("Ort", "wpsg"); ?>
- <?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ <label for="ort" class="wpsg_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[request][customer][ort]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['ort'])); ?>" />
</div>
+ <?php } ?>
- <div class="wpsg_checkoutblock" id="wpsg_land">
- <label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land", "wpsg"); ?>
- <?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ <?php if ($this->view['pflicht']['land'] != '2') { ?>
+ <div class="wpsg_checkoutblock" id="wpsg_land_block">
+ <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[request][customer][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>
@@ -401,20 +406,22 @@ <?php } ?>
</select>
</div>
+ <?php } ?>
- <div class="wpsg_checkoutblock" id="wpsg_ustidnr">
- <label for="wpsg_ustidnr" class="wpshopgermany_checkout"><?php echo __("UStIdNr.", "wpsg"); ?>
- <?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ <?php if ($this->view['pflicht']['ustidnr'] != '2') { ?>
+ <div class="wpsg_checkoutblock" id="wpsg_ustidnr_block">
+ <label for="wpsg_ustidnr" class="wpsg_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[request][customer][ustidnr]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['ustidnr'])); ?>" />
</div>
+ <?php } ?>
<?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_customerdata'))) { ?>
<?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
<div class="wpsg_checkoutblock">
<label class="wpsg_cv wpsg_checkout" 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 echo wpsg_hspc(__($c['name'], 'wpsg')); ?>:<?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>
</label>
<?php if ($c['typ'] == '0') { // Textfeld ?>
<input id="wpsg_cv_<?php echo $c_id; ?>" class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[request][customer][custom][<?php echo $c_id; ?>]" type="text" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['custom'][$c_id])); ?>" />
diff --git a/views/mods/mod_request/settings_edit.phtml b/views/mods/mod_request/settings_edit.phtml index 174cbf1..431310b 100644 --- a/views/mods/mod_request/settings_edit.phtml +++ b/views/mods/mod_request/settings_edit.phtml @@ -6,7 +6,6 @@ ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_request_page', __('Anfrageseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_request_page'), array ('help' => 'wpsg_mod_request_page')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_request_redirect', __('Weiterleitung nach Anfrage', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_request_redirect'), array ('help' => 'wpsg_mod_request_redirect')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_request_afterinsert', __('Nach neuem Produkt auf Merkliste', 'wpsg'), array(
wpsg_mod_request::ACTION_STAYONPAGE => __('Auf Seite bleiben', 'wpsg'),
diff --git a/views/mods/mod_revocation/ajaxDialogContent.phtml b/views/mods/mod_revocation/ajaxDialogContent.phtml index 89a32c3..069cde6 100644 --- a/views/mods/mod_revocation/ajaxDialogContent.phtml +++ b/views/mods/mod_revocation/ajaxDialogContent.phtml @@ -71,7 +71,7 @@ $arReason = \wpsgRevocation\Revocation::getReasons(); <div class="form_field"> <div class="label"><?php echo __('Widerrufsgrund', 'wpsg'); ?></div> <div class="value"> - <select name="wpsg_revocation_reason[row][<?php echo $key; ?>][reason]" required> + <select name="wpsg_revocation_reason[row][<?php echo $key; ?>][reason]"> <option value=""><?php echo __("Keinen Grund angeben", 'wpsg') ?></option> <?php foreach ($arReason as $reason) { ?> <option value="<?php echo htmlspecialchars($reason['id']); ?>"><?php echo htmlspecialchars($reason['text']); ?></option> @@ -148,7 +148,7 @@ $arReason = \wpsgRevocation\Revocation::getReasons(); </div> <p> - Es gelten unsere <?php echo '<a href="' . $GLOBALS['wpsg_sc']->getURL(wpsg_ShopController::URL_DATENSCHUTZ) . '">Datenschutzbestimmungen</a>' ?> + Es gelten unsere <?php echo '<a href="' . \wpsg_ShopController::getShop()->getURL(wpsg_ShopController::URL_DATENSCHUTZ) . '">Datenschutzbestimmungen</a>' ?> </p> </form>
\ No newline at end of file diff --git a/views/mods/mod_revocation/mail_row.phtml b/views/mods/mod_revocation/mail_row.phtml index fc784e7..3a5361a 100755 --- a/views/mods/mod_revocation/mail_row.phtml +++ b/views/mods/mod_revocation/mail_row.phtml @@ -4,13 +4,13 @@ * Template für die Integration des Widerruflinks in die Kunden- und Adminmail */ - $order_id = intval($this->view['order_id']); + $order_id = intval($this->view['wpsg_mod_revocation']['order_id']); $order_nr = $this->view['wpsg_mod_revocation']['order_nr']; $product_nr = $this->view['wpsg_mod_revocation']['product_nr']; $amount = $this->view['wpsg_mod_revocation']['amount']; - $order_product_id = intval($this->view['order_product_id']); + $order_product_id = intval($this->view['wpsg_mod_revocation']['order_product_id']); - $revo_url = get_home_url('/', '', 'http').'?wpsg_revo_order='.urlencode($order_nr).'&wpsg_revo_product='.urlencode($product_nr).'&wpsg_revo_amount='.urlencode($amount); + $revo_url = home_url('/').'?wpsg_revo_order='.urlencode($order_nr).'&wpsg_revo_product='.urlencode($product_nr).'&wpsg_revo_amount='.urlencode($amount); ?><?php echo "\n"; ?> <?php echo wpsg_pad_left(__('Vertrag widerrufen:', 'wpsg').' ', 15); ?> <?php echo $revo_url; ?> diff --git a/views/mods/mod_revocation/mail_row_html.phtml b/views/mods/mod_revocation/mail_row_html.phtml index e58ae64..207e575 100755 --- a/views/mods/mod_revocation/mail_row_html.phtml +++ b/views/mods/mod_revocation/mail_row_html.phtml @@ -6,13 +6,13 @@ $i = intval($this->view['i']); - $order_id = intval($this->view['order_id']); + $order_id = intval($this->view['wpsg_mod_revocation']['order_id']); $order_nr = $this->view['wpsg_mod_revocation']['order_nr']; $product_nr = $this->view['wpsg_mod_revocation']['product_nr']; $amount = $this->view['wpsg_mod_revocation']['amount']; - $order_product_id = intval($this->view['order_product_id']); + $order_product_id = intval($this->view['wpsg_mod_revocation']['order_product_id']); - $revo_url = get_home_url('/', '', 'http').'?wpsg_revo_order='.urlencode($order_nr).'&wpsg_revo_product='.urlencode($product_nr).'&wpsg_revo_amount='.urlencode($amount); + $revo_url = home_url('/').'?wpsg_revo_order='.urlencode($order_nr).'&wpsg_revo_product='.urlencode($product_nr).'&wpsg_revo_amount='.urlencode($amount); ?> <tr class="productrow productrow2 <?php echo ((($i % 2) == 0)?'productrow_odd':'productrow_even'); ?>"> diff --git a/views/mods/mod_revocation/mails/mail_admin_html.phtml b/views/mods/mod_revocation/mails/mail_admin_html.phtml index f3c0a58..71e7d8e 100644 --- a/views/mods/mod_revocation/mails/mail_admin_html.phtml +++ b/views/mods/mod_revocation/mails/mail_admin_html.phtml @@ -35,7 +35,7 @@ function($item) use ($d) { return $item['id'] === $d['reason']; } - ))[0]['text'] ?? ''; + ))[0]['text'] ?? __('Kein Grund angegeben', 'wpsg'); ?> <div style="margin-bottom:15px; padding-bottom:10px; border-bottom:1px solid #ddd;"> diff --git a/views/mods/mod_revocation/mails/mail_admin_text.phtml b/views/mods/mod_revocation/mails/mail_admin_text.phtml index 6b00c4d..435e7ad 100644 --- a/views/mods/mod_revocation/mails/mail_admin_text.phtml +++ b/views/mods/mod_revocation/mails/mail_admin_text.phtml @@ -31,7 +31,7 @@ ?> <?php echo mb_str_pad(__('Bestellung', 'wpsg').':', 25); ?> <?php echo $oOrder->getNr(); ?> <?php echo mb_str_pad(__('Produkt', 'wpsg').':', 25); ?> <?php echo $d['amount']; ?> x <?php echo $oOrderProduct->getProduct()->getProductName(true); ?> / <?php echo __('Artikelnummer', 'wpsg'); ?>: <?php echo $oOrderProduct->getProduct()->getNr(); ?> -<?php echo mb_str_pad(__('Ausgewählter Grund', 'wpsg').':', 25); ?> <?php echo array_values(array_filter($arReason, function($item) use ($d) { return $item['id'] === $d['reason']; }))[0]['text'] ?? ''; ?> +<?php echo mb_str_pad(__('Ausgewählter Grund', 'wpsg').':', 25); ?> <?php echo array_values(array_filter($arReason, function($item) use ($d) { return $item['id'] === $d['reason']; }))[0]['text'] ?? __('Kein Grund angegeben', 'wpsg'); ?> <?php echo mb_str_pad(__('Bemerkung', 'wpsg').':', 25); ?> <?php echo $d['comment']; ?> <?php } ?> diff --git a/views/mods/mod_revocation/mails/mail_customer_html.phtml b/views/mods/mod_revocation/mails/mail_customer_html.phtml index cc7fac6..51b7b70 100644 --- a/views/mods/mod_revocation/mails/mail_customer_html.phtml +++ b/views/mods/mod_revocation/mails/mail_customer_html.phtml @@ -30,7 +30,7 @@ function($item) use ($d) { return $item['id'] === $d['reason']; } - ))[0]['text'] ?? ''; + ))[0]['text'] ?? __('Kein Grund angegeben', 'wpsg'); ?> <div style="margin-bottom:20px; padding:15px; background-color:#f9f9f9; border-radius:5px;"> diff --git a/views/mods/mod_revocation/mails/mail_customer_text.phtml b/views/mods/mod_revocation/mails/mail_customer_text.phtml index 5636d6b..4e79eda 100644 --- a/views/mods/mod_revocation/mails/mail_customer_text.phtml +++ b/views/mods/mod_revocation/mails/mail_customer_text.phtml @@ -29,7 +29,7 @@ function($item) use ($d) { return $item['id'] === $d['reason']; } - ))[0]['text'] ?? ''; + ))[0]['text'] ?? __('Kein Grund angegeben', 'wpsg'); ?> <?php echo mb_str_pad(__('Bestellnummer', 'wpsg').':', 20); ?> <?php echo $oOrder->getNr(); ?> diff --git a/views/mods/mod_revocation/page_form.phtml b/views/mods/mod_revocation/page_form.phtml index 5640420..1ccb886 100644 --- a/views/mods/mod_revocation/page_form.phtml +++ b/views/mods/mod_revocation/page_form.phtml @@ -65,7 +65,7 @@ <div class="form_field"> <div class="label"><?php echo \__('Widerrufsgrund', 'wpsg'); ?></div> <div class="value"> - <select name="wpsg_revocation_reason[row][<?php echo $key; ?>][reason]" required> + <select name="wpsg_revocation_reason[row][<?php echo $key; ?>][reason]"> <option value=""><?php echo __("Keinen Grund angeben", 'wpsg') ?></option> <?php foreach ($arReason as $reason) { ?> <option value="<?php echo \htmlspecialchars($reason['id']); ?>"><?php echo \htmlspecialchars($reason['text']); ?></option> @@ -94,7 +94,7 @@ <p class="wpsg_revocation_page_datenschutz"> <?php echo \__('Es gelten unsere', 'wpsg'); ?> - <a href="<?php echo $GLOBALS['wpsg_sc']->getURL(wpsg_ShopController::URL_DATENSCHUTZ); ?>"><?php echo \__('Datenschutzbestimmungen', 'wpsg'); ?></a>. + <a href="<?php echo \wpsg_ShopController::getShop()->getURL(wpsg_ShopController::URL_DATENSCHUTZ); ?>"><?php echo \__('Datenschutzbestimmungen', 'wpsg'); ?></a>. </p> <div class="form_field wpsg_revocation_page_submit_wrap"> 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_shippingadress/checkout_inner_prebutton.phtml b/views/mods/mod_shippingadress/checkout_inner_prebutton.phtml index 03adbe5..b7d591b 100644 --- a/views/mods/mod_shippingadress/checkout_inner_prebutton.phtml +++ b/views/mods/mod_shippingadress/checkout_inner_prebutton.phtml @@ -22,7 +22,7 @@ <label for="shipping_firma" class="wpsg_checkout"><?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("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_name" name="wpsg[checkout][shipping_firma]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['basket']['checkout']['shipping_firma'])); ?>" />
+ <input class="<?php echo (($this->view['pflicht']['firma'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_firma", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_firma" name="wpsg[checkout][shipping_firma]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['basket']['checkout']['shipping_firma'])); ?>" />
</div>
<?php } ?>
@@ -52,7 +52,7 @@ <?php if ($this->view['pflicht']['name'] != '2') { ?>
<div class="wpsg_checkoutblock">
<label for="shipping_name" class="wpsg_checkout"><?php echo __("Name:", "wpsg"); ?>
- <?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ <?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_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_name" name="wpsg[checkout][shipping_name]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['basket']['checkout']['shipping_name'])); ?>" />
</div>
@@ -62,7 +62,7 @@ <?php if ($this->view['pflicht']['wpsg_showNr'] === '1') { ?>
- <div class="wpsg_checkoutblock" id="wpsg_streetnr">
+ <div class="wpsg_checkoutblock" id="wpsg_shipping_streetnr">
<label for="shipping_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_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_strasse" name="wpsg[checkout][shipping_strasse]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['shipping_strasse'])); ?>" />
diff --git a/views/mods/mod_shs/settings_edit.phtml b/views/mods/mod_shs/settings_edit.phtml index e322433..df10ecb 100644 --- a/views/mods/mod_shs/settings_edit.phtml +++ b/views/mods/mod_shs/settings_edit.phtml @@ -34,11 +34,10 @@ <br />
<?php echo wpsg_drawForm_Input('wpsg_mod_shs_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_shs_gebuehr'), true), array('help' => 'wpsg_mod_shs_gebuehr','unit' => $this->get_option('wpsg_currency').' / %')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_shs_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_shs_mwst'), array('help' => 'wpsg_mod_shs_mwst')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_shs_mwstland'), array('help' => 'wpsg_mod_shs_mwstland')); ?>
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_mobileversion', __('Mobile Version nutzen', 'wpsg'), $this->get_option('wpsg_mod_shs_mobileversion')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_creditcard_cardholder', __('Kartenhinhaber ist Pflichtfeld (Nur Kreditkarte)', 'wpsg'), $this->get_option('wpsg_mod_shs_creditcard_cardholder')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_creditcard_cardholder', __('Karteninhaber ist Pflichtfeld (nur Kreditkarte)', 'wpsg'), $this->get_option('wpsg_mod_shs_creditcard_cardholder')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_creditcard_optionalcardholder', __('Karteninhaber ist Optional (Nur Kreditkarte)', 'wpsg'), $this->get_option('wpsg_mod_shs_creditcard_optionalcardholder')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_creditcard_sslifvisaenrolledu', __('Bei VISA ohne Autorisierung Zahlung erlauben (Nur Kreditkarte / VISA)', 'wpsg'), $this->get_option('wpsg_mod_shs_creditcard_sslifvisaenrolledu')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_directdebit_accountholder', __('Kontoinhaber ist Pflichtfeld (Nur Lastschrift)', 'wpsg'), $this->get_option('wpsg_mod_shs_directdebit_accountholder')); ?>
@@ -46,7 +45,7 @@ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_directdebit_checklist', __('Sperrlistenabfrage (Nur Lastschrift, muss freigeschaltet sein)', 'wpsg'), $this->get_option('wpsg_mod_shs_directdebit_checklist')); ?>
<br />
-<?php echo wpsg_drawForm_Select('wpsg_mod_shs_transactiontype', __('Autorisierung', 'wpsg'), array('preauthorization', 'authorization'), $this->get_option('wpsg_mod_shs_transactiontype'), array('help' => 'wpsg_mod_shs_transactiontype')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_shs_transactiontype', __('Autorisierung', 'wpsg'), array(__('Nur reservieren (Vorautorisierung)', 'wpsg'), __('Reservieren und buchen (Autorisierung)', 'wpsg')), (($this->get_option('wpsg_mod_shs_transactiontype') === '1')?'1':'0'), array('help' => 'wpsg_mod_shs_transactiontype')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_autostart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_shs_autostart'), array('help' => 'wpsg_mod_shs_autostart')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_autoend', __('Nach Abschluss direkt auf Fehler- bzw. Erfolgsseite leiten', 'wpsg'), $this->get_option('wpsg_mod_shs_autoend'), array('help' => 'wpsg_mod_shs_autoend')); ?>
<?php echo wpsg_drawForm_Select('wpsg_page_mod_shs_success', __('Erfolgsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_shs_success'), array('help' => 'wpsg_mod_shs_success')); ?>
diff --git a/views/mods/mod_si/cannotorder.phtml b/views/mods/mod_si/cannotorder.phtml deleted file mode 100644 index e8658e4..0000000 --- a/views/mods/mod_si/cannotorder.phtml +++ /dev/null @@ -1,45 +0,0 @@ -<?php
-
- /**
- * Integration in die Bestellzusammenfassung
- */
-
- $bic = wpsg_getStr($this->view['basket']['checkout']['mod_autodebit_bic'], '');
-
- $arParam = array(
- 'user_id' => $this->get_option('wpsg_mod_si_user_id'), // Ihre Kundennummer bei SOFORT, z.B. "12345"
- 'project_id' => $this->get_option('wpsg_mod_si_project_id'), // Ihre Projektnummer des SOFORT Ident Projekts, z.B. "54321"
- 'firstname' => $this->view['basket']['checkout']['vname'], // Vorname des Kunden, z.B. "Max"
- 'lastname' => $this->view['basket']['checkout']['name'], // Nachname des Kunden, z.B. "Mustermann"
- 'street' => $this->view['basket']['checkout']['strasse'].rtrim(' '.wpsg_getStr($this->view['basket']['checkout']['nr'])), // Straße und Hausnummer des Kunden, z.B. "Unter den Linden 77"
- 'city' => $this->view['basket']['checkout']['ort'], // Wohnort des Kunden, z.B. "Berlin"
- 'zipcode' => $this->view['basket']['checkout']['plz'], // PLZ des Kunden, z.B. "10117"
- 'birthday' => date('Y-m-d', strtotime($this->view['basket']['checkout']['plz'])), // Geburtsdatum des Kunden im Format YYYY-MM-DD, z.B. "1978-09-24"
- 'address_country_id' => $this->view['basket']['land']['kuerzel'], // 2-stellige Abkürzung des Landes des Kunden im ISO-3166-1 Format, z.B. "DE"
- 'bank_code' => $bic, // BIC (DEPRECATED: oder Bankleitzahl) der Bankfiliale des Kunden
- 'account_country_id' => $this->view['basket']['land']['kuerzel'], // 2-stellige Abkürzung des Landes der Bankfiliale des Kunden im ISO-3166-1 Format, z.B. "DE"
- 'user_variable_0' => $this->view['temp_order_id'], // Kundenvariable (optional), z.B. "123456"
- 'user_variable_1' => '', // Kundenvariable (optional)
- 'user_variable_2' => '', // Kundenvariable (optional)
- 'user_variable_3' => '', // Kundenvariable (optional)
- 'user_variable_4' => '', // Kundenvariable (optional)
- 'user_variable_5' => '' // Kundenvariable (optional)
- );
-
- $arParam['hash'] = $this->view['wpsg_mod_si']['modul']->getSendHash($arParam);
-
-?>
-
-</form>
-
-<form method="post" id="wpsg_mod_si_form" action="https://www.sofort.com/payment/agecheck">
-
- <?php foreach ($arParam as $key => $value) { ?>
- <input type="hidden" name="<?php echo $key; ?>" value="<?php echo $value; ?>" />
- <?php } ?>
-
- <input type="submit" value="<?php echo __('Altersverifizierung', 'wpsg'); ?>" />
-
-</form>
-
-<form method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>">
\ No newline at end of file diff --git a/views/mods/mod_si/produkt_edit_allgemein.phtml b/views/mods/mod_si/produkt_edit_allgemein.phtml deleted file mode 100644 index d602179..0000000 --- a/views/mods/mod_si/produkt_edit_allgemein.phtml +++ /dev/null @@ -1,27 +0,0 @@ -<?php
-
- /**
- * Integration des Moduls SOFORT Ident in die allgemeinen Einstellungen eines Produktes
- */
-
-?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_si[check]', __('SOFORT Ident Prüfung erforderlich', 'wpsg'), $this->view['wpsg_mod_si']['check'], array('id' => 'wpsg_mod_si_checkbox')); ?>
-
-<div id="wpsg_mod_si_age" style="display:none;">
- <?php echo wpsg_drawForm_Input('wpsg_mod_si[minAge]', __('Mindestalter', 'wpsg'), $this->view['wpsg_mod_si']['minAge']); ?><br />
-</div>
-
-<script type="application/javascript">/* <![CDATA[ */
-
- jQuery(document).ready(function() {
-
- jQuery('#wpsg_mod_si_checkbox').bind('change', function() {
-
- if (jQuery(this).prop('checked') == true) jQuery('#wpsg_mod_si_age').show();
- else jQuery('#wpsg_mod_si_age').hide();
-
- } ).change();
-
- } );
-
-/* ]]> */</script>
\ No newline at end of file diff --git a/views/mods/mod_si/settings_edit.phtml b/views/mods/mod_si/settings_edit.phtml deleted file mode 100644 index 0e45f6b..0000000 --- a/views/mods/mod_si/settings_edit.phtml +++ /dev/null @@ -1,32 +0,0 @@ -<?php
-
- /**
- * Template für die Einstellungen des Moduls "SOFORT Ident"
- */
-
-?>
-
-<?php echo wpsg_drawForm_Input('wpsg_mod_si_user_id', __('Kundennummer bei SOFORT Ident', 'wpsg'), $this->get_option('wpsg_mod_si_user_id'), array('help' => 'wpsg_mod_si_user_id')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_si_project_id', __('Projektnummer bei SOFORT Ident', 'wpsg'), $this->get_option('wpsg_mod_si_project_id'), array('help' => 'wpsg_mod_si_project_id')); ?>
-
-<br />
-
-<?php echo wpsg_drawForm_Input('wpsg_mod_si_project_pwd', __('Projektpasswort', 'wpsg'), $this->get_option('wpsg_mod_si_project_pwd'), array('help' => 'wpsg_mod_si_project_pwd')); ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_si_hashalgo', __('HASH Algorithmus', 'wpsg'), array(
- wpsg_mod_si::HASH_MD5 => __('MD5', 'wpsg'),
- wpsg_mod_si::HASH_SHA1 => __('SHA1', 'wpsg'),
- wpsg_mod_si::HASH_SHA256 => __('SHA256', 'wpsg'),
- wpsg_mod_si::HASH_SHA512 => __('SHA512', 'wpsg'),
-), $this->get_option('wpsg_mod_si_hashalgo'), array('help' => 'wpsg_mod_si_hashalgo')); ?>
-
-<br />
-
-<?php echo wpsg_drawForm_Input('wpsg_mod_si_minAge', __('Mindestalter (Produktvorgabe)', 'wpsg'), $this->get_option('wpsg_mod_si_minAge'), array('help' => 'wpsg_mod_si_minAge')); ?>
-
-<br />
-
-<?php echo wpsg_drawForm_Input('', __('Rücksprung-URL', 'wpsg'), $this->view['wpsg_mod_si']['returnURL'], array('readonly' => true, 'help' => 'wpsg_mod_si_returnURL')); ?>
-
-<br />
-
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_si_country', __('Prüfung für Ausland deaktivieren', 'wpsg'), $this->get_option('wpsg_mod_si_country'), array('help' => 'wpsg_mod_si_country')); ?>
\ No newline at end of file diff --git a/views/mods/mod_skrill/settings_edit.phtml b/views/mods/mod_skrill/settings_edit.phtml index 0db9ade..da85c01 100644 --- a/views/mods/mod_skrill/settings_edit.phtml +++ b/views/mods/mod_skrill/settings_edit.phtml @@ -12,7 +12,6 @@ <br />
<?php echo wpsg_drawForm_Input('wpsg_mod_skrill_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_skrill_gebuehr'), true), array('help' => 'wpsg_mod_skrill_gebuehr','unit' => $this->get_option('wpsg_currency'), ' / %')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_skrill_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_skrill_mwst'), array('help' => 'wpsg_mod_skrill_mwst')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_skrill_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_skrill_mwstland'), array('help' => 'wpsg_mod_skrill_mwstland')); ?>
<br />
<?php echo wpsg_drawForm_Input('wpsg_mod_skrill_currency', __('Währungscode (Standard: EUR)', 'wpsg'), $this->get_option('wpsg_mod_skrill_currency'), array('help' => 'wpsg_mod_skrill_curreny')); ?>
diff --git a/views/mods/mod_smartcheckout/checkout.phtml b/views/mods/mod_smartcheckout/checkout.phtml new file mode 100644 index 0000000..6bae4ca --- /dev/null +++ b/views/mods/mod_smartcheckout/checkout.phtml @@ -0,0 +1,495 @@ +<?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_garan" v-if="product.garan" v-html="product.garan"></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')); ?>'">−</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') }"> + + <?php /* Das label umfasst nur die Kopfzeile, Hinweise der Module können eigene Eingabefelder enthalten */ ?> + <div class="sc_choice" v-for="item in state.shipping.list" :key="item.id" :class="{ 'sc_choice_active': form.shipping === item.id }" @click="selectChoice('shipping', item.id, $event)"> + + <?php /* Radio, Logo und Bezeichnung auf einer Zeile, die Beschreibung darunter */ ?> + <label 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> + </label> + <div class="sc_choice_hint" v-if="item.hint" v-html="item.hint"></div> + + </div> + + </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') }"> + + <?php /* Das label umfasst nur die Kopfzeile, Hinweise der Module können eigene Eingabefelder enthalten (z.B. Kreditkarte) */ ?> + <div class="sc_choice" v-for="item in state.payment.list" :key="item.id" :class="{ 'sc_choice_active': form.payment === item.id }" @click="selectChoice('payment', item.id, $event)"> + + <?php /* Radio, Logo und Bezeichnung auf einer Zeile, Beschreibung und Zusatzangaben darunter */ ?> + <label 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> + </label> + <div class="sc_choice_hint" v-if="item.hint" v-html="item.hint"></div> + <div class="sc_choice_extra" v-if="item.extra" v-html="item.extra"></div> + + </div> + + </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/product_suggestions.phtml b/views/mods/mod_smartcheckout/product_suggestions.phtml new file mode 100644 index 0000000..78acea5 --- /dev/null +++ b/views/mods/mod_smartcheckout/product_suggestions.phtml @@ -0,0 +1,46 @@ +<?php + + /** + * Kompakte Liste vorgeschlagener Produkte unter den Warenkorbpositionen (Warenkorbteaser, Zubehör) + * + * Das Mengenfeld hat bewusst keinen Namen: es wird bei den Aktualisierungen des Checkouts nicht + * mitgeschickt. Erst der Button überträgt die Menge unter <send_name>[<ID>] (siehe onModuleClick in + * smartcheckout.js). Befüllt über \wpsgSmartcheckout\State::renderSuggestions(). + */ + + $view = $this->view['wpsg_smartcheckout_suggestions']; + +?> +<div class="sc_teaser"> + + <div class="sc_teaser_title"><?php echo esc_html($view['title']); ?></div> + + <?php foreach ($view['products'] as $p) { ?> + <div class="sc_teaser_item" data-sc-item> + + <?php if ($p['image'] !== '') { ?> + <div class="sc_teaser_image"> + <img src="<?php echo esc_url($p['image']); ?>" alt="<?php echo esc_attr($p['name']); ?>" loading="lazy" /> + </div> + <?php } ?> + + <div class="sc_teaser_body"> + <div class="sc_teaser_name"> + <?php if ($p['link'] !== '') { ?> + <a href="<?php echo esc_url($p['link']); ?>"><?php echo esc_html($p['name']); ?></a> + <?php } else { ?> + <?php echo esc_html($p['name']); ?> + <?php } ?> + </div> + <div class="sc_teaser_price"><?php echo esc_html($p['price']); ?></div> + </div> + + <div class="sc_teaser_action"> + <input type="text" inputmode="numeric" class="sc_teaser_amount" value="1" data-sc-amount aria-label="<?php echo esc_attr__('Menge', 'wpsg'); ?>" /> + <button type="button" class="sc_button sc_button_secondary" data-sc-send="<?php echo esc_attr($view['send_name'].'['.intval($p['id']).']'); ?>"><?php echo esc_html__('Hinzufügen', 'wpsg'); ?></button> + </div> + + </div> + <?php } ?> + +</div> diff --git a/views/mods/mod_smartcheckout/settings_edit.phtml b/views/mods/mod_smartcheckout/settings_edit.phtml new file mode 100644 index 0000000..06d00ac --- /dev/null +++ b/views/mods/mod_smartcheckout/settings_edit.phtml @@ -0,0 +1,25 @@ +<?php + + /** + * Einstellungen des modernen EinSeitenCheckouts + */ + + $arLayout = [ + '0' => __('Zweispaltig', 'wpsg'), + '1' => __('Einspaltig', 'wpsg') + ]; + +?> +<?php echo wpsg_drawForm_Select('wpsg_mod_smartcheckout_page', __('Seite für den SmartCheckout', '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'), ['hint' => __('Zweispaltig: Eingaben links, Zusammenfassung rechts mitlaufend. Einspaltig: Zusammenfassung unterhalb der Eingaben.', 'wpsg')]); ?> + +<?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 SmartCheckout umgeleitet — der klassische Ablauf (Warenkorb, Kasse, Versand/Zahlung, Zusammenfassung) wird nicht mehr angesteuert.', 'wpsg'); ?> +</p> + +<p class="wpsg_note"> + <?php echo __('Der SmartCheckout 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/mods/mod_statistics/settings_edit.phtml b/views/mods/mod_statistics/settings_edit.phtml index 514e4e4..2b1e23b 100644 --- a/views/mods/mod_statistics/settings_edit.phtml +++ b/views/mods/mod_statistics/settings_edit.phtml @@ -5,7 +5,6 @@ <li role="presentation" class="active"><a href="#tab1" aria-controls="home" role="tab" data-toggle="tab"><?php echo __('Auswertung Bestellstatus', 'wpsg'); ?></a></li>
<li role="presentation"><a href="#tab2" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Matomo', 'wpsg'); ?></a></li>
<li role="presentation"><a href="#tab3" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Google', 'wpsg'); ?></a></li>
- <!-- <li role="presentation"><a href="#tab4" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Social Media', 'wpsg'); ?></a></li> -->
<li role="presentation"><a href="#tab5" aria-controls="messages" role="tab" data-toggle="tab"><?php echo __('Sonstiges', 'wpsg'); ?></a></li>
</ul>
@@ -29,15 +28,7 @@ }
?>
- <?php /* Kartendarstelung START */ ?>
-
- <?php echo wpsg_drawForm_Input('wpsg_mod_statistics_googlekey', __('Google API-Key', 'wpsg'), $this->get_option('wpsg_mod_statistics_googlekey'), array('help' => 'wpsg_mod_statistics_googlekey')); ?>
-
- <a class="button-primary" id="button-google" target="popup" href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend&keyType=CLIENT_SIDE&reusekey=true" onclick="window.open('', 'popup', 'width=500;height=200,resizable=yes,menubar=yes')">
- <?php echo __('Schlüssel über Ihr Googlekonto anfordern', 'wpsg'); ?>
- </a>
-
- <?php /* Kartendarstellung ENDE */?>
+
<div class="wpsg_clearer"></div>
</div>
@@ -46,13 +37,13 @@ <br/>
- <?php echo __('Ermöglicht die Integration des Trackintools "Matomo".', 'wpsg'); ?>
+ <?php echo __('Ermöglicht die Integration des Trackingtools "Matomo".', 'wpsg'); ?>
<br/><br/>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_trackingcode', __('Trackingcode einbinden', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_trackingcode'), array('help' => 'wpsg_mod_statistics_piwik_trackingcode')); ?>
<div id="wpsg_mod_statistik_tracking_layer" style="display:none;">
- <?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_url', __('URL zur Matomo Installation', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_url'), array('help' => 'wpsg_mod_statistics_piwik_url'), array('hint' => __('Ohne Protokoll, Beispiel: matomo.domain.de', 'wpsg'))); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_url', __('URL zur Matomo Installation', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_url'), array('help' => 'wpsg_mod_statistics_piwik_url', 'hint' => __('Ohne Protokoll, Beispiel: matomo.domain.de', 'wpsg'))); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_SiteId', __('Matomo Seiten ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_SiteId'), array('help' => 'wpsg_mod_statistics_piwik_SiteId')); ?>
</div>
<br />
@@ -78,17 +69,17 @@ <?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_checkout_target', __('Matomo ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_checkout_target')); ?>
</div>
<br />
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_checkout2', __('Checkout2 tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_checkout2')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_checkout2', __('Checkout Schritt 2 tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_checkout2')); ?>
<div id="wpsg_mod_statistics_piwik_checkout2_layer" style="display: none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_checkout2_target', __('Matomo ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_checkout2_target')); ?>
</div>
<br />
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_overview', __('Overview tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_overview')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_overview', __('Bestellübersicht tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_overview')); ?>
<div id="wpsg_mod_statistics_piwik_overview_layer" style="display: none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_overview_target', __('Matomo ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_overview_target')); ?>
</div>
<br />
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_done', __('Done tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_done')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_done', __('Bestellabschluss tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_done')); ?>
<div id="wpsg_mod_statistics_piwik_done_layer" style="display: none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_done_target', __('Matomo ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_done_target')); ?>
</div>
@@ -180,6 +171,18 @@ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_google_ecommerce', __('Käufe (eCommerce) tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_google_ecommerce'), array('help' => 'wpsg_mod_statistics_google_ecommerce')); ?>
+ <br />
+
+ <?php /* Kartendarstellung START */ ?>
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_statistics_googlekey', __('Google API-Key', 'wpsg'), $this->get_option('wpsg_mod_statistics_googlekey'), array('help' => 'wpsg_mod_statistics_googlekey')); ?>
+
+ <a class="button-primary" id="button-google" target="popup" href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend&keyType=CLIENT_SIDE&reusekey=true" onclick="window.open('', 'popup', 'width=500;height=200,resizable=yes,menubar=yes')">
+ <?php echo __('Schlüssel über Ihr Googlekonto anfordern', 'wpsg'); ?>
+ </a>
+
+ <?php /* Kartendarstellung ENDE */?>
+
<div class="wpsg_clearer"></div>
</div>
@@ -211,14 +214,9 @@ </script>
- <!-- <div role="tabpanel" id="tab4" class="tab-pane">
- <?php // echo wpsg_drawForm_input('wpsg_mod_statistics_socialmedia_fb_px', __('Facebook Pixel', 'wpsg'), $this->get_option('wpsg_mod_statistics_socialmedia_fb_px'), array('help' => 'wpsg_mod_statistics_socialmedia_fb_px')); ?>
- <div class="wpsg_clearer"></div>
- </div> -->
-
<div role="tabpanel" class="tab-pane" id="tab5">
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_line_chart_width', __('Liniendiagramm (Breite in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_line_chart_width'), array('help' => 'wpsg_mod_statistics_line_chart_width')); ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_statistics_line_chart_height', __('Liniendiagramm (Hoehe in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_line_chart_height'), array('help' => 'wpsg_mod_statistics_line_chart_height')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_statistics_line_chart_height', __('Liniendiagramm (Höhe in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_line_chart_height'), array('help' => 'wpsg_mod_statistics_line_chart_height')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_pie_chart_width', __('Kuchendiagramm (Breite in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_pie_chart_width'), array('help' => 'wpsg_mod_statistics_pie_chart_width')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_pie_chart_height', __('Kuchendiagramm (Höhe in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_pie_chart_height'), array('help' => 'wpsg_mod_statistics_pie_chart_height')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_bar_chart_width', __('Balkendiagramm (Breite in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_bar_chart_width'), array('help' => 'wpsg_mod_statistics_bar_chart_width')); ?>
diff --git a/views/mods/mod_statistics/simplefilter.phtml b/views/mods/mod_statistics/simplefilter.phtml index 328bf34..9623431 100644 --- a/views/mods/mod_statistics/simplefilter.phtml +++ b/views/mods/mod_statistics/simplefilter.phtml @@ -22,7 +22,7 @@ }
<?php
- if ($this->view['filter']['related'] > 0)
+ if (($this->view['filter']['related'] ?? 0) > 0)
{
?>
jQuery("#filter-related").val("<?php echo $this->view['filter']['related']; ?>");
@@ -65,8 +65,8 @@ <div class="customfilter" style="display:none; width:100%;">
- <?php echo wpsg_drawForm_Date('filter[day][0]', __('von', 'wpsg'), $this->view['filter']['day'][0]['d'].'.'.$this->view['filter']['day'][0]['m'].'.'.$this->view['filter']['day'][0]['Y'], array('time' => false)); ?>
- <?php echo wpsg_drawForm_Date('filter[day][1]', __('bis', 'wpsg'), $this->view['filter']['day'][1]['d'].'.'.$this->view['filter']['day'][1]['m'].'.'.$this->view['filter']['day'][1]['Y'], array('time' => false)); ?>
+ <?php echo wpsg_drawForm_Date('filter[day][0]', __('von', 'wpsg'), (isset($this->view['filter']['day'][0]) ? $this->view['filter']['day'][0]['d'].'.'.$this->view['filter']['day'][0]['m'].'.'.$this->view['filter']['day'][0]['Y'] : ''), array('time' => false)); ?>
+ <?php echo wpsg_drawForm_Date('filter[day][1]', __('bis', 'wpsg'), (isset($this->view['filter']['day'][1]) ? $this->view['filter']['day'][1]['d'].'.'.$this->view['filter']['day'][1]['m'].'.'.$this->view['filter']['day'][1]['Y'] : ''), array('time' => false)); ?>
<?php /* if (isset($this->view['filter']['day'][0])) { ?>
diff --git a/views/mods/mod_stock/stockmail.phtml b/views/mods/mod_stock/stockmail.phtml index 36585e8..ff6863a 100644 --- a/views/mods/mod_stock/stockmail.phtml +++ b/views/mods/mod_stock/stockmail.phtml @@ -6,7 +6,7 @@ $this->htmlMail = false;
-?><?php echo __('Hallo ', 'wpsg').$GLOBALS['stockemail_prodvariant']['admin_name'].','; ?>
+?><?php echo __('Hallo ', 'wpsg').($GLOBALS['stockemail_prodvariant']['admin_name']??$this->view['wpsg_mod_stock']['stockmail']['admin_name']??'').','; ?>
<?php
if(isset($GLOBALS['stockemail_prodvariant']) && wpsg_isSizedArray($GLOBALS['stockemail_prodvariant']))
@@ -26,10 +26,9 @@ echo wpsg_translate(__('Ein Produkt hat das Erreichen des minimalen Lagerbestand am #1# um #2# Uhr gemeldet.', 'wpsg'), date('d.m.Y'), date('H:i'));
echo ('');
- foreach ((array)$this->basket->arProdukte as $p)
- $id = $p['id'];
- echo ('');
- echo __('Produkt', 'wpsg').': '.$p['id'].' '.$p['name'];
+ $p = $this->view['wpsg_mod_stock']['stockmail']['product']??[];
+ echo "\r\n";
+ echo __('Produkt', 'wpsg').': '.($p['id']??'').' '.($p['name']??'');
}
?>
diff --git a/views/mods/mod_stock/stockmail_html.phtml b/views/mods/mod_stock/stockmail_html.phtml index c56dab2..0a3c19d 100644 --- a/views/mods/mod_stock/stockmail_html.phtml +++ b/views/mods/mod_stock/stockmail_html.phtml @@ -10,7 +10,7 @@ ?>
-<p><?php echo __('Hallo ', 'wpsg').$GLOBALS['stockemail_prodvariant']['admin_name'].','; ?></p>
+<p><?php echo __('Hallo ', 'wpsg').($GLOBALS['stockemail_prodvariant']['admin_name']??$this->view['wpsg_mod_stock']['stockmail']['admin_name']??'').','; ?></p>
<?php
if(isset($GLOBALS['stockemail_prodvariant']) && wpsg_isSizedArray($GLOBALS['stockemail_prodvariant']))
@@ -28,10 +28,9 @@ echo wpsg_translate(__('Ein Produkt hat das Erreichen des minimalen Lagerbestand am #1# um #2# Uhr gemeldet.', 'wpsg'), date('d.m.Y'), date('H:i'));
echo ('<br />');
- foreach ((array)$this->basket->arProdukte as $p)
- $id = $p['id'];
- echo ('<br />');
- echo __('Produkt', 'wpsg').': '.$p['id'].' '.$p['name'];
+ $p = $this->view['wpsg_mod_stock']['stockmail']['product']??[];
+ echo '<br />';
+ echo __('Produkt', 'wpsg').': '.($p['id']??'').' '.($p['name']??'');
}
?>
diff --git a/views/mods/mod_su/settings_edit.phtml b/views/mods/mod_su/settings_edit.phtml index 5b36993..472cf73 100644 --- a/views/mods/mod_su/settings_edit.phtml +++ b/views/mods/mod_su/settings_edit.phtml @@ -45,7 +45,6 @@ <br />
<?php echo wpsg_drawForm_Input('wpsg_mod_su_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_su_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_mod_su_gebuehr')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_su_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_su_mwst'), array('help' => 'wpsg_mod_su_mwst')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_su_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_su_mwstland'), array('help' => 'wpsg_mod_su_mwstland')); ?>
<br />
<?php echo wpsg_drawForm_Select('wpsg_mod_su_currency', __('Verwendete Währung', 'wpsg'), array('EUR' => __('Euro', 'wpsg'), 'CHF' => __('Schweizer Franken', 'wpsg'), 'GBP' => __('Britische Pfund', 'wpsg')), $this->get_option('wpsg_mod_su_currency'), array('help' => 'wpsg_mod_su_currency')); ?>
diff --git a/views/mods/mod_targo/settings_edit.phtml b/views/mods/mod_targo/settings_edit.phtml index c1e915e..945fa57 100644 --- a/views/mods/mod_targo/settings_edit.phtml +++ b/views/mods/mod_targo/settings_edit.phtml @@ -38,5 +38,4 @@ <?php echo wpsg_drawForm_Input('wpsg_mod_targo_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_targo_gebuehr'), true), array('help' => 'wpsg_shippay_gebuehr', 'unit' => $this->get_option('wpsg_currency').' / %')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_targo_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_targo_mwst'), array('help' => 'wpsg_shippay_mwst')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_targo_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_targo_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
diff --git a/views/mods/mod_ticket/settings_edit.phtml b/views/mods/mod_ticket/settings_edit.phtml index 120fb89..ac1b57f 100644 --- a/views/mods/mod_ticket/settings_edit.phtml +++ b/views/mods/mod_ticket/settings_edit.phtml @@ -117,6 +117,7 @@ #wpsg_ticket_modul_template .head div { flex-grow:1; } #wpsg_ticket_modul_template .wpsg_field_wrap_template_name { display:flex; justify-content:space-between; align-items:center; padding-right:10px !important; } #wpsg_ticket_modul_template .wpsg_field_wrap_template_name > div { gap:1rem; display:flex; justify-content:flex-start; align-items:center; } + #wpsg_ticket_modul_template .wpsg_field_wrap_template_name > input[type="text"] { flex:1; min-width:0; margin-right:1rem; } #wpsg_ticket_modul_template .template td.col_bg, #wpsg_ticket_modul_template .template td.col_align { width:50px; text-align:center; } #wpsg_ticket_modul_template .template tr td { vertical-align:middle; } diff --git a/views/mods/mod_topseller/produkt_addedit_allgemein.phtml b/views/mods/mod_topseller/produkt_addedit_allgemein.phtml index febc614..ba2e3c4 100644 --- a/views/mods/mod_topseller/produkt_addedit_allgemein.phtml +++ b/views/mods/mod_topseller/produkt_addedit_allgemein.phtml @@ -12,17 +12,17 @@ </h3>
</div>
<div class="panel-body">
- <?php if ($this->get_option('wpsg_mod_topseller_auto') == '1') { ?>
+ <?php if ($this->callMod('wpsg_mod_topseller', 'isAuto')) { ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_topseller[status]', __('TopSeller Status', 'wpsg'), array(
- '0' => __('Einbeziehen', 'wpsg'),
- '1' => __('Ausschließen', 'wpsg')
- ), $this->view['wpsg_mod_topseller']['status']); ?>
+ '0' => __('Nach Verkäufen berücksichtigen', 'wpsg'),
+ '1' => __('Nie als Topseller anzeigen', 'wpsg')
+ ), $this->view['wpsg_mod_topseller']['status'], ['hint' => __('Achtung: Wird „Alle Produkte einbeziehen“ ausgeschaltet, gilt diese Auswahl umgekehrt.', 'wpsg')]); ?>
<?php } else { ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_topseller[status]', __('TopSeller Status', 'wpsg'), array(
- '0' => __('Nicht anzeigen', 'wpsg'),
- '1' => __('Anzeigen', 'wpsg')
+ '0' => __('Nicht als Topseller anzeigen', 'wpsg'),
+ '1' => __('Als Topseller anzeigen', 'wpsg')
), $this->view['wpsg_mod_topseller']['status']); ?>
<?php } ?>
diff --git a/views/mods/mod_topseller/settings_edit.phtml b/views/mods/mod_topseller/settings_edit.phtml index 0722195..56c82a1 100644 --- a/views/mods/mod_topseller/settings_edit.phtml +++ b/views/mods/mod_topseller/settings_edit.phtml @@ -7,6 +7,8 @@ ?>
<?php if ($this->hasMod('wpsg_mod_statistics')) { ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_topseller_auto', __('Alle Produkte einbeziehen', 'wpsg'), $this->get_option('wpsg_mod_topseller_auto'), array('help' => 'wpsg_mod_topseller_auto')); ?>
+<?php } else { ?>
+<p class="wpsg_hinweis"><?php echo __('Ohne das Modul „Statistik“ erscheinen nur Produkte, die in der Produktbearbeitung als Topseller markiert sind.', 'wpsg'); ?></p>
<?php } ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_topseller_limit', __('Maximale Anzahl (Standard)', 'wpsg'), $this->get_option('wpsg_mod_topseller_limit'), array('help' => 'wpsg_mod_topseller_limit')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_topseller_template', __('Template', 'wpsg'), $this->view['arTemplates'], $this->get_option('wpsg_mod_topseller_template'), array('noIndex' => true, 'help' => 'wpsg_mod_topseller_template')); ?>
\ No newline at end of file diff --git a/views/mods/mod_trustedshops/order_view_sidebar.phtml b/views/mods/mod_trustedshops/order_view_sidebar.phtml index 517305a..223eb5a 100644 --- a/views/mods/mod_trustedshops/order_view_sidebar.phtml +++ b/views/mods/mod_trustedshops/order_view_sidebar.phtml @@ -6,7 +6,7 @@ ?>
-<?php echo wpsg_drawForm_AdminboxStart(__('Trusted Shps', 'wpsg')); ?>
+<?php echo wpsg_drawForm_AdminboxStart(__('Trusted Shops', 'wpsg')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_set', __('Einwilligung', 'wpsg'), (($this->view['data']['wpsg_mod_trustedshops_set'] == '1')?__('Ja', 'wpsg'):__('Nein', 'wpsg')), array('text' => true, 'help' => 'wpsg_mod_trustedshops_set')); ?>
diff --git a/views/mods/mod_trustedshops/settings_edit.phtml b/views/mods/mod_trustedshops/settings_edit.phtml index 4509817..1b66130 100644 --- a/views/mods/mod_trustedshops/settings_edit.phtml +++ b/views/mods/mod_trustedshops/settings_edit.phtml @@ -84,7 +84,7 @@ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_reminder', __('Erinnerung', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_reminder'), array('help' => 'wpsg_mod_trustedshops_reminder')); ?>
<div id="wpsg_mod_trustedshops_reminder_layer" style="display:none;">
- <?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_reminderDays', __('Zeitspanne zum versenden der Erinnerunsmail in Tagen', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_reminderDays'), array('help' => 'wpsg_mod_trustedshops_reminderDays')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_reminderDays', __('Erinnerung an den Export nach Tagen', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_reminderDays'), array('help' => 'wpsg_mod_trustedshops_reminderDays')); ?>
</div>
<br />
diff --git a/views/mods/mod_userpayment/list.phtml b/views/mods/mod_userpayment/list.phtml index 4b3fa42..cd5aa82 100644 --- a/views/mods/mod_userpayment/list.phtml +++ b/views/mods/mod_userpayment/list.phtml @@ -99,27 +99,6 @@ });
/* ]]> */</script>
- <?php echo wpsg_drawForm_TextStart(); ?>
- <input type="checkbox" value="1" <?php echo (($zv['mwst_laender'] == '1')?'checked="checked"':''); ?> id="zv_mwst_laender_<?php echo $zv['id']; ?>" />
- <a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign form-control-feedback" data-wpsg-tip="wpsg_shippay_mwstland" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland"></a>
- <?php echo wpsg_drawForm_TextEnd(__('Keine MwSt. wenn Land steuerfrei', 'wpsg')); ?>
- <script type="text/javascript">/* <![CDATA[ */
- jQuery('#zv_mwst_laender_<?php echo $zv['id']; ?>').bind('change', function() {
-
- var value = 0;
- if (jQuery(this).prop("checked") === true) value = 1;
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1',
- data: {
- field: 'mwst_laender',
- zv_id: '<?php echo $zv['id']; ?>',
- value: value
- }
- } );
- } );
- /* ]]> */</script>
-
</div>
<?php if ($i == sizeof($this->view['wpsg_mod_userpayment']['data'])) { ?><hr /><?php } ?>
diff --git a/views/mods/mod_userpayment/settings_edit.phtml b/views/mods/mod_userpayment/settings_edit.phtml index d8e9e8e..c1ce75b 100644 --- a/views/mods/mod_userpayment/settings_edit.phtml +++ b/views/mods/mod_userpayment/settings_edit.phtml @@ -7,25 +7,6 @@ ?>
<script type="text/javascript">
- /**
- * Speichert die Änderung in der Checkbox der MwSt.
- */
- function wpsg_saveZVMwSt(oElement, zv_id)
- {
-
- if (jQuery(oElement).attr("checked")) value = '1'; else value = '0';
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1',
- data: {
- field: 'mwst_laender',
- zv_id: zv_id,
- value: value
- }
- } );
-
- } // function wpsg_saveZVMwSt(oElement, va_id)
-
function wpsg_addZV()
{
@@ -81,4 +62,4 @@ <p class="wpsg_hinweis"><?php echo __('Um eine Zahlvariante zu bearbeiten klicken Sie einfach auf den Namen oder den Rabattwert.', 'wpsg'); ?></p>
<br />
-<a href="#" onclick="return wpsg_addZV();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span>Neue Zahlvariante anlegen</a>
+<a href="#" onclick="return wpsg_addZV();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neue Zahlvariante anlegen', 'wpsg'); ?></a>
diff --git a/views/mods/mod_versandarten/list.phtml b/views/mods/mod_versandarten/list.phtml index 70c022b..e6f6257 100644 --- a/views/mods/mod_versandarten/list.phtml +++ b/views/mods/mod_versandarten/list.phtml @@ -164,27 +164,6 @@ }
});
/* ]]> */</script>
-
- <?php echo wpsg_drawForm_TextStart(); ?>
- <input type="checkbox" value="1" <?php echo (($va['mwst_laender'] == '1')?'checked="checked"':''); ?> id="va_mwst_laender_<?php echo $va['id']; ?>" />
- <a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" data-wpsg-tip="wpsg_shippay_mwstland" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland"></a>
- <?php echo wpsg_drawForm_TextEnd(__('Keine MwSt. wenn Land steuerfrei', 'wpsg')); ?>
- <script type="text/javascript">/* <![CDATA[ */
- jQuery('#va_mwst_laender_<?php echo $va['id']; ?>').bind('change', function() {
-
- var value = 0;
- if (jQuery(this).attr("checked") == "checked") value = 1;
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1',
- data: {
- field: 'mwst_laender',
- va_id: '<?php echo $va['id']; ?>',
- value: value
- }
- } );
- } );
- /* ]]> */</script>
<?php /* Paketverfolgung */ ?>
<?php if ($this->hasMod('wpsg_mod_packagetracking') == '1') { ?>
diff --git a/views/mods/mod_versandarten/settings_edit.phtml b/views/mods/mod_versandarten/settings_edit.phtml index adae7d5..34cfe1c 100644 --- a/views/mods/mod_versandarten/settings_edit.phtml +++ b/views/mods/mod_versandarten/settings_edit.phtml @@ -42,25 +42,6 @@ } // function wpsg_addVA()
/**
- * Speichert die Änderung in der Checkbox der MwSt.
- */
- function wpsg_saveVAMwSt(oElement, va_id)
- {
-
- if (jQuery(oElement).attr("checked")) value = '1'; else value = '0';
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1',
- data: {
- field: 'mwst_laender',
- va_id: va_id,
- value: value
- }
- } );
-
- } // function wpsg_saveVAMwSt(oElement, va_id)
-
- /**
* Wird aufgerufen wenn eine Versandart entfernt werden soll
*/
function wpsg_removeVA(va_id)
@@ -96,6 +77,6 @@ <?php echo $this->mod->va_list(); ?>
</div>
- <a href="#" onclick="return wpsg_addVA();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span>Neue Versandart anlegen</a>
+ <a href="#" onclick="return wpsg_addVA();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neue Versandart anlegen', 'wpsg'); ?></a>
</div>
diff --git a/views/mods/mod_voucherproduct/order_view_sidebar.phtml b/views/mods/mod_voucherproduct/order_view_sidebar.phtml index 82991b3..f4803d9 100644 --- a/views/mods/mod_voucherproduct/order_view_sidebar.phtml +++ b/views/mods/mod_voucherproduct/order_view_sidebar.phtml @@ -184,12 +184,10 @@ /* ]]> */
</script>
-<div class="postbox" id="wpsg_voucherproduct">
- <h3 class="wpsg_handlediv">
- <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
- <span><?php echo __('Gutscheine', 'wpsg'); ?></span>
- </h3>
- <div class="inside" id="wpsg_voucherproduct_target">
+<?php echo wpsg_drawForm_AdminboxStart(__('Gutscheine', 'wpsg')); ?>
+<div id="wpsg_voucherproduct">
+ <div id="wpsg_voucherproduct_target">
<?php echo $this->callMod('wpsg_mod_voucherproduct', 'order_view_sidebar_content', array($this->view['wpsg_mod_voucherproduct']['order_id'])); ?>
</div>
-</div>
\ No newline at end of file +</div>
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
\ No newline at end of file diff --git a/views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml b/views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml index 65ad306..f7364b5 100644 --- a/views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml +++ b/views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml @@ -13,21 +13,21 @@ </div>
<div class="panel-body">
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_voucherproduct_gs', __('Gutschein generieren', 'wpsg'), $this->view['data']['wpsg_mod_voucherproduct_gs']); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_voucherproduct_gs', __('Gutschein generieren', 'wpsg'), ($this->view['data']['wpsg_mod_voucherproduct_gs'] ?? '')); ?>
<div class="wpsg_mod_voucherproduct_gs wpsg_mod_voucherproduct_gs_1" style="display:none;">
<br />
- <?php echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_gslaenge', __('Länge des Gutscheincodes', 'wpsg'), (($this->view['data']['wpsg_mod_voucherproduct_gslaenge'] > 0)?$this->view['data']['wpsg_mod_voucherproduct_gslaenge']:10)); ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_available', __('Gültigkeit (Tage)', 'wpsg'), $this->view['data']['wpsg_mod_voucherproduct_available']); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_voucherproduct_coupon', __('Gutschein als Wertgutschein generieren', 'wpsg'), $this->view['data']['wpsg_mod_voucherproduct_coupon']); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_voucherproduct_flexprice', __('Flexibler Preis', 'wpsg'), $this->view['data']['wpsg_mod_voucherproduct_flexprice']); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_gslaenge', __('Länge des Gutscheincodes', 'wpsg'), ((($this->view['data']['wpsg_mod_voucherproduct_gslaenge'] ?? '') > 0)?($this->view['data']['wpsg_mod_voucherproduct_gslaenge'] ?? ''):10)); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_available', __('Gültigkeit (Tage)', 'wpsg'), ($this->view['data']['wpsg_mod_voucherproduct_available'] ?? '')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_voucherproduct_coupon', __('Gutschein als Wertgutschein generieren', 'wpsg'), ($this->view['data']['wpsg_mod_voucherproduct_coupon'] ?? '')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_voucherproduct_flexprice', __('Flexibler Preis', 'wpsg'), ($this->view['data']['wpsg_mod_voucherproduct_flexprice'] ?? '')); ?>
<div class="wpsg_mod_voucherproduct_flexprice_layer wpsg_mod_voucherproduct_flexprice_layer_1" style="display:none;">
- <?php echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_flexprice_min', __('Minimaler Preis', 'wpsg'), ((wpsg_tf($this->view['data']['wpsg_mod_voucherproduct_flexprice_min']) > 0)?wpsg_ff($this->view['data']['wpsg_mod_voucherproduct_flexprice_min']):'')); ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_flexprice_max', __('Maximaler Preis', 'wpsg'), ((wpsg_tf($this->view['data']['wpsg_mod_voucherproduct_flexprice_max']) > 0)?wpsg_ff($this->view['data']['wpsg_mod_voucherproduct_flexprice_max']):'')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_flexprice_min', __('Minimaler Preis', 'wpsg'), ((wpsg_tf(($this->view['data']['wpsg_mod_voucherproduct_flexprice_min'] ?? '')) > 0)?wpsg_ff(($this->view['data']['wpsg_mod_voucherproduct_flexprice_min'] ?? '')):'')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_flexprice_max', __('Maximaler Preis', 'wpsg'), ((wpsg_tf(($this->view['data']['wpsg_mod_voucherproduct_flexprice_max'] ?? '')) > 0)?wpsg_ff(($this->view['data']['wpsg_mod_voucherproduct_flexprice_max'] ?? '')):'')); ?>
</div>
diff --git a/views/mods/mod_voucherproduct/voucher_pdf.phtml b/views/mods/mod_voucherproduct/voucher_pdf.phtml index b8831d9..c66a960 100644 --- a/views/mods/mod_voucherproduct/voucher_pdf.phtml +++ b/views/mods/mod_voucherproduct/voucher_pdf.phtml @@ -25,12 +25,12 @@ foreach ($this->view['texte'] as $t)
{
- if ($t['bg'] == '1' && $t['aktiv'] == '1')
+ if (($t['bg'] ?? '0') == '1' && ($t['aktiv'] ?? '0') == '1')
{
$t['text'] = $this->replaceUniversalPlatzhalter($t['text'], $this->view['order_id'], false, false, $this->view['product_id'], $this->view['customReplace'], $this->view['product_index']);
- if ($t['alpha'] > 0) $pdf->setAlpha($t['alpha']);
+ $pdf->setAlpha((($t['alpha'] ?? '') === '') ? 1 : min(1, max(0, floatval(str_replace(',', '.', $t['alpha'])))));
$pdf->wpsg_SetTextColor($t['color']);
@@ -64,12 +64,13 @@ foreach ($this->view['texte'] as $t)
{
- if ($t['aktiv'] == '1')
+ // Hintergrundtexte sind oben schon gedruckt
+ if (($t['aktiv'] ?? '0') == '1' && ($t['bg'] ?? '0') != '1')
{
$t['text'] = $this->replaceUniversalPlatzhalter($t['text'], $this->view['order_id'], false, false, $this->view['product_id'], $this->view['customReplace'], $this->view['product_index']);
- if ($t['alpha'] > 0) $pdf->setAlpha($t['alpha']);
+ $pdf->setAlpha((($t['alpha'] ?? '') === '') ? 1 : min(1, max(0, floatval(str_replace(',', '.', $t['alpha'])))));
$pdf->SetFont('Arial', '', $t['fontsize']);
$pdf->wpsg_SetTextColor($t["color"]);
diff --git a/views/mods/mod_weight/basket_row.phtml b/views/mods/mod_weight/basket_row.phtml index e47000b..1f8b2aa 100644 --- a/views/mods/mod_weight/basket_row.phtml +++ b/views/mods/mod_weight/basket_row.phtml @@ -4,11 +4,14 @@ * Template für die Anzeige des Produktgewichts im Warenkorb
*/
//wpsg_debug($this->view);
+
+ if (!defined('ABSPATH')) exit;
+
?>
<div class="product_info">
<div class="title">
- <span class="fa fa-balance-scale"></span>
- <?php echo __("Gewicht", "wpsg"); ?>:
- <strong><?php echo wpsg_ff($this->view['weight'], $this->get_option('wpsg_mod_weight_unit')); ?></strong>
- </div>
+ <span class="fa fa-balance-scale"></span>
+ <?php echo esc_html__('Gewicht', 'wpsg'); ?>:
+ <strong><?php echo esc_html(wpsg_ff($this->view['weight'], $this->get_option('wpsg_mod_weight_unit'))); ?></strong>
+ </div>
</div>
\ No newline at end of file diff --git a/views/mods/mod_weight/basket_row_end.phtml b/views/mods/mod_weight/basket_row_end.phtml index 21d98b5..a58d2e0 100644 --- a/views/mods/mod_weight/basket_row_end.phtml +++ b/views/mods/mod_weight/basket_row_end.phtml @@ -4,15 +4,17 @@ * Template für die Anzeige des Gesamtgewichts innerhalb des Warenkorbs
*/
+ if (!defined('ABSPATH')) exit;
+
?>
<div class="basket_sum_row">
<div class="title">
- <?php echo __('Gesamtgewicht', 'wpsg'); ?>:
+ <?php echo esc_html__('Gesamtgewicht', 'wpsg'); ?>:
+ </div>
+ <div class="value">
+ <?php echo esc_html(wpsg_ff($this->view['wpsg_mod_weight']['weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
</div>
<div class="value">
- <?php echo wpsg_ff($this->view['wpsg_mod_weight']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?>
+
</div>
- <div class="value">
- <?php echo __(' ', 'wpsg'); ?>
- </div>
</div>
\ No newline at end of file diff --git a/views/mods/mod_weight/overview_row.phtml b/views/mods/mod_weight/overview_row.phtml index a1cd49e..beac1f1 100644 --- a/views/mods/mod_weight/overview_row.phtml +++ b/views/mods/mod_weight/overview_row.phtml @@ -4,12 +4,14 @@ * Template für die Integration des Produktgewichts in die Bestellzusammenfassung
*/
+ if (!defined('ABSPATH')) exit;
+
?>
<div class="product_info">
- <div
+ <div
<?php if ($this->view['$bPicture'] == true) { ?>class="titlep"><?php } else { ?>class="title"><?php } ?>
- <span class="fa fa-balance-scale"></span>
- <?php echo __("Gewicht", "wpsg"); ?>:
- <strong><?php echo wpsg_ff($this->view['weight'], $this->get_option('wpsg_mod_weight_unit')); ?></strong>
- </div>
+ <span class="fa fa-balance-scale"></span>
+ <?php echo esc_html__('Gewicht', 'wpsg'); ?>:
+ <strong><?php echo esc_html(wpsg_ff($this->view['weight'], $this->get_option('wpsg_mod_weight_unit'))); ?></strong>
+ </div>
</div>
\ No newline at end of file diff --git a/views/mods/mod_weight/overview_row_end.phtml b/views/mods/mod_weight/overview_row_end.phtml index 84a3d83..d9a7f3e 100644 --- a/views/mods/mod_weight/overview_row_end.phtml +++ b/views/mods/mod_weight/overview_row_end.phtml @@ -4,15 +4,17 @@ * Template für die Integration des Produktgewichts in die Bestellzusammenfassung
*/
+ if (!defined('ABSPATH')) exit;
+
?>
<div class="overview_sum_row">
<div class="title">
- <?php echo __('Gesamtgewicht', 'wpsg'); ?>:
+ <?php echo esc_html__('Gesamtgewicht', 'wpsg'); ?>:
+ </div>
+ <div class="value">
+ <?php echo esc_html(wpsg_ff($this->view['wpsg_mod_weight']['weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
</div>
<div class="value">
- <?php echo wpsg_ff($this->view['wpsg_mod_weight']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?>
+
</div>
- <div class="value">
- <?php echo __(' ', 'wpsg'); ?>
- </div>
</div>
\ No newline at end of file diff --git a/views/mods/mod_weight/product_addedit_content.phtml b/views/mods/mod_weight/product_addedit_content.phtml index 3f9be4e..34bd8ff 100644 --- a/views/mods/mod_weight/product_addedit_content.phtml +++ b/views/mods/mod_weight/product_addedit_content.phtml @@ -1,17 +1,19 @@ <?php
-
+
/**
* Template für die Integration des Produktgewichts in die Produktverwaltung
*/
+ if (!defined('ABSPATH')) exit;
+
?>
<?php echo wpsg_drawForm_AdminboxStart(__('Produktgewicht', 'wpsg')); ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_weight[weight]', __('Produktgewicht', 'wpsg'), wpsg_ff($this->view['wpsg_mod_weight']['weight']), array('unit' => $this->get_option('wpsg_mod_weight_unit'))); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_weight[weight]', __('Produktgewicht', 'wpsg'), wpsg_ff($this->view['wpsg_mod_weight']['weight']), ['unit' => $this->get_option('wpsg_mod_weight_unit')]); ?>
- <br />
+ <br />
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_weight"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Konfiguration des Gewichtsmoduls', 'wpsg'); ?></a>
+ <a href="<?php echo esc_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_weight'); ?>"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo esc_html__('Zur Konfiguration des Gewichtsmoduls', 'wpsg'); ?></a>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
diff --git a/views/mods/mod_weight/settings_edit.phtml b/views/mods/mod_weight/settings_edit.phtml index 324cbbd..e05ea1c 100644 --- a/views/mods/mod_weight/settings_edit.phtml +++ b/views/mods/mod_weight/settings_edit.phtml @@ -9,7 +9,7 @@ <br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showProduct', __('Im Produkt anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showProduct'), array('help' => 'wpsg_mod_weight_showProduct')); ?>
<br />
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showBasket', __('Gesamtgewicht im Warenkorbs anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showBasket'), array('help' => 'wpsg_mod_weight_showBasket')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showBasket', __('Gesamtgewicht im Warenkorb anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showBasket'), array('help' => 'wpsg_mod_weight_showBasket')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showAjaxDialog', __('In der Warenkorb-Lightbox anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showAjaxDialog'), array('help' => 'wpsg_mod_weight_showAjaxDialog')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showBasketProduct', __('Im Warenkorb im Produkt anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showBasketProduct'), array('help' => 'wpsg_mod_weight_showBasketProduct')); ?>
<br />
diff --git a/views/mods/mod_willcollect/settings_edit.phtml b/views/mods/mod_willcollect/settings_edit.phtml index 2b55965..a1abbf8 100644 --- a/views/mods/mod_willcollect/settings_edit.phtml +++ b/views/mods/mod_willcollect/settings_edit.phtml @@ -16,10 +16,9 @@ <?php echo wpsg_drawForm_Input('wpsg_mod_willcollect_plzort', __('PLZ/Ort', 'wpsg'), $this->get_option('wpsg_mod_willcollect_plzort'), array('help' => 'wpsg_mod_willcollect_plzort')); ?>
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_willcollect_payment', __('Zahlungsart "Barzahlung" aktivieren', 'wpsg'), $this->get_option('wpsg_mod_willcollect_payment'), array('help' => 'wpsg_mod_willcollect_payment')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_willcollect_payment_bezeichnung', __('Bezeichung der Zahlungsart', 'wpsg'), $this->get_option('wpsg_mod_willcollect_payment_bezeichnung'), array('help' => 'wpsg_mod_willcollect_payment_bezeichnung')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_willcollect_payment_bezeichnung', __('Bezeichnung der Zahlungsart', 'wpsg'), $this->get_option('wpsg_mod_willcollect_payment_bezeichnung'), array('help' => 'wpsg_mod_willcollect_payment_bezeichnung')); ?>
<?php echo wpsg_drawForm_Textarea('wpsg_mod_willcollect_payment_hint', __('Hinweistext der Zahlungsart', 'wpsg'), $this->get_option('wpsg_mod_willcollect_payment_hint'), array('help' => 'wpsg_mod_willcollect_payment_hint')); ?>
<br />
<?php echo wpsg_drawForm_Input('wpsg_mod_willcollect_gebuehr', __('Gebühr/Rabatt (Versandart)', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_willcollect_gebuehr'), true), array('help' => 'wpsg_mod_willcollect_gebuehr','unit' => $this->get_option('wpsg_currency').' / %')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_willcollect_payment_gebuehr', __('Gebühr/Rabatt (Zahlungsart)', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_willcollect_payment_gebuehr'), true), array('help' => 'wpsg_mod_willcollect_payment_gebuehr','unit' => $this->get_option('wpsg_currency').' / %')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_willcollect_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_willcollect_mwst'), array('help' => 'wpsg_mod_willcollect_mwst')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_willcollect_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_willcollect_mwstland'), array('help' => 'wpsg_mod_willcollect_mwstland')); ?>
\ No newline at end of file diff --git a/views/order/backendEdit/addProduct_product_selected.phtml b/views/order/backendEdit/addProduct_product_selected.phtml index b423119..c15c305 100644 --- a/views/order/backendEdit/addProduct_product_selected.phtml +++ b/views/order/backendEdit/addProduct_product_selected.phtml @@ -31,7 +31,7 @@ <?php
- $attachment_id = $GLOBALS['wpsg_sc']->imagehandler->getAttachmentID($oProduct->id);
+ $attachment_id = wpsg_ShopController::getShop()->imagehandler->getAttachmentID($oProduct->id);
?>
diff --git a/views/order/index.phtml b/views/order/index.phtml index 398a04f..749fa7d 100644 --- a/views/order/index.phtml +++ b/views/order/index.phtml @@ -103,7 +103,7 @@ <select name="filter[invoicedate_m]" class="form-control input-sm">
<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
<?php for ($i = 1; $i <= 12; $i ++) { ?>
- <option <?php echo ((wpsg_getStr($this->view['arFilter']['invoicedate_m']) == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); ?></option>
+ <option <?php echo ((wpsg_getStr($this->view['arFilter']['invoicedate_m']) == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo esc_html(wp_date('F', mktime(0, 0, 0, $i, 1, 2000))); ?></option>
<?php } ?>
</select>
</div>
@@ -414,9 +414,9 @@ <?php if ($this->get_option('wpsg_showvalueofgoods')) { ?>
<td class="col_productsum">
- <?php $oOrderProducts = $oOrder->getOrderProducts(); ?>
+ <?php $product_sum = 0; $oOrderProducts = $oOrder->getOrderProducts(); ?>
<?php foreach ($oOrderProducts as $oOrderProduct) { ?>
- <?php $product_sum += $oOrderProduct->getPriceSum($this->getBackendTaxview()); ?>
+ <?php $product_sum = ($product_sum ?? 0) + $oOrderProduct->getPriceSum($this->getBackendTaxview()); ?>
<?php } ?>
<?php echo wpsg_ff($product_sum, $this->get_option('wpsg_currency')); ?>
<?php $product_sum = 0; ?>
@@ -530,7 +530,7 @@ <div class="row">
<input type="checkbox" name="wpsg_Multirechnung_sendmail" value="1" id="invoice_sendmail" />
<label for="invoice_sendmail"><?php echo __('E-Mail an Kunden senden', 'wpsg'); ?></label>
- <input type="email" name="wpsg_Multirechnung_email" value="<?php echo $oCustomer->getEMailEInvoice(); ?>" />
+ <input type="email" name="wpsg_Multirechnung_email" value="<?php echo esc_attr($oCustomer->getEMailEInvoice() ?? $oCustomer->email); ?>" />
</div>
<div class="row">
@@ -553,18 +553,19 @@ <span class="row" style="margin-top:0.5rem">
<input type="hidden" name="preview" id="wpsg_mod_rechnungen_preview" />
- <input type="submit" name="wpsg_order_doaction" value="<?php echo __('Vorschau', 'wpsg'); ?>" id="wpsg_mod_rechnungen_button_preview" />
- <input type="submit" name="wpsg_order_doaction" value="<?php echo __('Erstellen', 'wpsg'); ?>" id="wpsg_mod_rechnungen_button_submit" />
+ <input type="submit" name="wpsg_order_doaction" value="<?php echo __('Vorschau', 'wpsg'); ?>" id="wpsg_mod_rechnungen_button_preview" class="button" />
+ <input type="submit" name="wpsg_order_doaction" value="<?php echo __('Erstellen', 'wpsg'); ?>" id="wpsg_mod_rechnungen_button_submit" class="button button-primary" />
</span>
</div>
<style>
- .multiinvoice_form { border:1px solid black; padding:1rem 0.5rem; display:flex; flex-direction:column; gap:1rem; width:500px; user-select:none;
+ .multiinvoice_form { border:1px solid #c3c4c7; border-radius:4px; background:#fff; padding:1rem; display:flex; flex-direction:column; gap:1rem; width:500px; user-select:none;
.row { margin:0; display:flex; justify-content:flex-start; gap:0.5rem; align-items:center; min-height:26px;
& > * { margin:0; }
& > *:first-child { width:16px; min-width:16px; flex-shrink:0; }
input[type="text"], input[type="date"], input[type="email"] { height:26px; min-height:26px; }
+ input[type="email"] { flex:1; }
}
}
diff --git a/views/order/product_table.phtml b/views/order/product_table.phtml index 37533bb..2cbcb13 100644 --- a/views/order/product_table.phtml +++ b/views/order/product_table.phtml @@ -178,12 +178,13 @@ <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') { ?>
- <td><?php echo (($arCalculation['shipping'][0]['brutto'] === $arCalculation['shipping'][0]['netto'])?wpsg_ff(0, '%'):$arTaxShort[$arCalculation['shipping'][0]['tax_key']]); ?></td>
+ <td><?php echo ((floatval($arCalculation['shipping'][0]['brutto']) != 0 && abs($arCalculation['shipping'][0]['brutto'] - $arCalculation['shipping'][0]['netto']) < 0.00001)?wpsg_ff(0, '%'):($arTaxShort[$arCalculation['shipping'][0]['tax_key']]??'')); ?></td>
<?php } ?>
<td class="wpsg_cell_shipping_value wpsg_cell_gesamtpreis" colspan="2">
@@ -206,12 +207,21 @@ <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') { ?>
- <td><?php echo (($arCalculation['payment'][0]['brutto'] === $arCalculation['payment'][0]['netto'])?wpsg_ff(0, '%'):$arTaxShort[$arCalculation['payment'][0]['tax_key']]); ?></td>
+ <td><?php echo ((floatval($arCalculation['payment'][0]['brutto']) != 0 && abs($arCalculation['payment'][0]['brutto'] - $arCalculation['payment'][0]['netto']) < 0.00001)?wpsg_ff(0, '%'):($arTaxShort[$arCalculation['payment'][0]['tax_key']]??'')); ?></td>
<?php } ?>
<td class="wpsg_cell_payment_value wpsg_cell_gesamtpreis" colspan="2">
diff --git a/views/order/view.phtml b/views/order/view.phtml index ca08416..30681d1 100644 --- a/views/order/view.phtml +++ b/views/order/view.phtml @@ -112,7 +112,7 @@ <?php if ($this->view['oCalculation']->restored) { ?>
<div id="restored_notice">
- <strong>Die Berechnung dieser Bestellung wurde rekonstruiert, da zum Bestellzeitpunkt nicht alle Shop Einstellungen erfasst wurden. Bitte überprüfen sie die Berechnung und vergleichen diese ggf. mit dem Bestellprotokoll. </strong>
+ <strong><?php echo __('Die Berechnung dieser Bestellung wurde rekonstruiert, da zum Bestellzeitpunkt nicht alle Shop-Einstellungen erfasst wurden. Bitte überprüfen Sie die Berechnung und vergleichen diese ggf. mit dem Bestellprotokoll.', 'wpsg'); ?></strong>
</div>
<?php } ?>
diff --git a/views/order/view_customerdata.phtml b/views/order/view_customerdata.phtml index 974b508..2a101f4 100644 --- a/views/order/view_customerdata.phtml +++ b/views/order/view_customerdata.phtml @@ -37,7 +37,7 @@ <?php } ?>
<br />
<?php if ($this->view['pflicht']['geb'] != '2') { ?>
- <?php echo wpsg_drawForm_Input('dialog_geb', __('Geburtsdatum', 'wpsg'), $this->view['data']['geb']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_geb', __('Geburtsdatum', 'wpsg'), wpsg_fromDate($this->view['data']['geb'])); ?>
<?php } ?>
<br />
<?php if ($this->view['pflicht']['tel'] != '2') { ?>
diff --git a/views/produkt/addedit_general.phtml b/views/produkt/addedit_general.phtml index 0a5bcc2..1cd072e 100644 --- a/views/produkt/addedit_general.phtml +++ b/views/produkt/addedit_general.phtml @@ -55,7 +55,7 @@ <?php } ?>
<?php } ?>
<?php if (!$this->hasMod('wpsg_mod_produktartikel')) { ?>
- <?php echo wpsg_drawForm_Select('partikel', __('Zugeordneter Wordpress Artikel', 'wpsg'), $this->view['partikel_select'], wpsg_getStr($this->view['data']['partikel']), array('optgroup' => true)); ?>
+ <?php echo wpsg_drawForm_Select('partikel', __('Zugeordneter WordPress-Artikel', 'wpsg'), $this->view['partikel_select'], wpsg_getStr($this->view['data']['partikel']), array('optgroup' => true)); ?>
<?php } ?>
<?php if (!isset($_REQUEST['wpsg_lang'])) { ?>
<?php echo wpsg_drawForm_Select('basket_multiple', __('Verhalten im Warenkorb', 'wpsg'), array(
@@ -84,8 +84,39 @@ <?php if (defined('STO_PATH')) $arSelect['-1'] = __('Aus Kommentarbewertung', 'wpsg'); ?>
<?php echo wpsg_drawForm_Select('rating', __('Bewertungspunkte', 'wpsg'), $arSelect, wpsg_getInt($this->view['data']['rating'])); ?>
<?php } ?>
-
+
<?php $this->callMods('produkt_edit_allgemein', array(&$this->view['data'])); ?>
+
+ <?php echo wpsg_drawForm_Checkbox('garan', __('GARAN-Gewährleistungslabel', 'wpsg'), intval($this->view['data']['garan']??0) === 1, ['id' => 'wpsg_garan_checkbox']); ?>
+ <div id="wpsg_garan_layer" style="display:none;">
+ <?php echo wpsg_drawForm_Input('garan_years', __('GARAN-Gewährleistungsjahre', 'wpsg'), ((intval($this->view['data']['garan_years']??0) > 0)?intval($this->view['data']['garan_years']):''), ['type' => 'number', 'min' => 2]); ?>
+ <?php echo wpsg_drawForm_Input('garan_brand', __('GARAN-Marke/Markenzeichen', 'wpsg'), $this->view['data']['garan_brand']??'', []); ?>
+ <?php echo wpsg_drawForm_Input('garan_model', __('GARAN-Modellnummer', 'wpsg'), $this->view['data']['garan_model']??'', []); ?>
+ </div>
+ <script>
+
+ const el_checkbox = document.getElementById('wpsg_garan_checkbox');
+ const el_layer = document.getElementById('wpsg_garan_layer');
+ const el_years = el_layer.querySelector('input[name="garan_years"]');
+
+ el_checkbox.addEventListener('change', () => {
+
+ if (el_checkbox.checked) el_layer.style.display = 'block';
+ else el_layer.style.display = 'none';
+
+ // Versteckte Felder dürfen die Browser-Validierung nicht blockieren
+ if (el_years) {
+
+ if (el_checkbox.checked) el_years.setAttribute('min', '2');
+ else el_years.removeAttribute('min');
+
+ }
+
+ });
+
+ el_checkbox.dispatchEvent(new Event('change'));
+
+ </script>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
</div>
diff --git a/views/produkt/addedit_price.phtml b/views/produkt/addedit_price.phtml index 76733ff..7e495a9 100644 --- a/views/produkt/addedit_price.phtml +++ b/views/produkt/addedit_price.phtml @@ -4,10 +4,14 @@ * Template für die Integration der Preiseinstellungen in die Produktverwaltung
*/
+ // Neues Produkt: Regelsatz des Standardlands
+ $mwst_key = strval($this->view['data']['mwst_key']??'');
+ if ($mwst_key === '') $mwst_key = $this->getDefaultTaxGroup();
+
?>
<?php echo wpsg_drawForm_AdminboxStart(__('Preis / Steuer', 'wpsg')); ?>
- <?php echo wpsg_drawForm_Select('mwst_key', __('Steuergruppe', 'wpsg'), wpsg_tax_groups(true), @$this->view['data']['mwst_key']); ?>
+ <?php echo wpsg_drawForm_Select('mwst_key', __('Steuergruppe', 'wpsg'), wpsg_tax_groups(true), $mwst_key); ?>
<?php echo wpsg_drawForm_Input('preis', wpsg_translate(__('Preis (#1#)', 'wpsg'), (($this->getBackendTaxview() === WPSG_NETTO)?'NETTO':'BRUTTO')), wpsg_ff($this->view['data']['preis'])); ?>
<?php echo wpsg_drawForm_Input('oldprice', wpsg_translate(__('Alter Preis (#1#)', 'wpsg'), (($this->getBackendTaxview() === WPSG_NETTO)?'NETTO':'BRUTTO')), wpsg_ff($this->view['data']['oldprice'])); ?>
<?php echo wpsg_drawForm_Text(__('Steueranteil', 'wpsg'), wpsg_ff(@$this->view['data']['tax_sum_value'], $this->get_option('wpsg_currency')).' / '.$this->getDefaultCountry()->kuerzel, array('text' => true)); ?>
diff --git a/views/produkt/addedit_productcodes.phtml b/views/produkt/addedit_productcodes.phtml index b60ce58..93707bd 100644 --- a/views/produkt/addedit_productcodes.phtml +++ b/views/produkt/addedit_productcodes.phtml @@ -15,7 +15,7 @@ <div class="general-panel-block"> <div class="general-panel-general"> - <?php echo wpsg_drawForm_AdminboxStart(__('Productcodes', 'wpsg')); ?> + <?php echo wpsg_drawForm_AdminboxStart(__('Produktcodes', 'wpsg')); ?> <?php if (intval($this->view['data']['id']) > 0) { diff --git a/views/produkt/select.phtml b/views/produkt/select.phtml index f0a95cf..d9a2fe1 100644 --- a/views/produkt/select.phtml +++ b/views/produkt/select.phtml @@ -14,10 +14,10 @@ <?php } ?>
<script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl'); ?>/wp-admin/load-scripts.php?c=1&load[]=jquery-core"></script>
- <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl'); ?>/<?php echo WPSG_CONTENTDIR_WP; ?>/plugins/".WPSG_FOLDERNAME."/views/js/bootstrap-3.4.1-dist/js/bootstrap.min.js"></script>
+ <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl'); ?>/<?php echo WPSG_CONTENTDIR_WP; ?>/plugins/<?php echo WPSG_FOLDERNAME; ?>/views/js/bootstrap-3.4.1-dist/js/bootstrap.min.js"></script>
- <link rel='stylesheet' id='wpsg-bscss-css' href='<?php echo get_option('siteurl'); ?>/<?php echo WPSG_CONTENTDIR_WP; ?>/plugins/'.WPSG_FOLDERNAME.'/views/js/bootstrap-3.4.1-dist/css/bootstrap.css?ver=4.7.5' type='text/css' media='all' />
- <link rel='stylesheet' id='wpsg-bs-theme-css-css' href='<?php echo get_option('siteurl'); ?>/<?php echo WPSG_CONTENTDIR_WP; ?>/plugins/'.WPSG_FOLDERNAME.'/views/js/bootstrap-3.4.1-dist/css/bootstrap-theme.css?ver=4.7.5' type='text/css' media='all' />
+ <link rel='stylesheet' id='wpsg-bscss-css' href='<?php echo get_option('siteurl'); ?>/<?php echo WPSG_CONTENTDIR_WP; ?>/plugins/<?php echo WPSG_FOLDERNAME; ?>/views/js/bootstrap-3.4.1-dist/css/bootstrap.css?ver=4.7.5' type='text/css' media='all' />
+ <link rel='stylesheet' id='wpsg-bs-theme-css-css' href='<?php echo get_option('siteurl'); ?>/<?php echo WPSG_CONTENTDIR_WP; ?>/plugins/<?php echo WPSG_FOLDERNAME; ?>/views/js/bootstrap-3.4.1-dist/css/bootstrap-theme.css?ver=4.7.5' type='text/css' media='all' />
<link rel="stylesheet" href="<?php echo $this->getRessourceURL('css/admin.css'); ?>" type="text/css" media="all" />
diff --git a/views/produkttemplates/standard.phtml b/views/produkttemplates/standard.phtml index bf8a4d3..ea1087a 100644 --- a/views/produkttemplates/standard.phtml +++ b/views/produkttemplates/standard.phtml @@ -127,7 +127,7 @@ <?php if ($this->get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?>
<div class="wpsg_produkt_preishinweis">
- <?php echo wpsg_translate(__('#2# zzgl. #1#', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>', '<a href="#kkhint" title="'.wpsg_hspc($this->get_option('wpsg_kleinunternehmer_text')).'">Endpreis</a>'); ?>
+ <?php echo wpsg_translate(__('#2# zzgl. #1#', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>', '<a href="#kkhint" title="'.wpsg_hspc($this->get_option('wpsg_kleinunternehmer_text')).'">'.__('Endpreis', 'wpsg').'</a>'); ?>
</div>
<?php } else { /* Kleinunternehmerregelung aktiviert ENDE */ ?>
@@ -312,9 +312,20 @@ <?php /* Varianten ENDE */ ?>
<?php $this->callMods('product_bottom', array(&$this->view['data']['product_key'], $this->getTemplateIndex())); ?>
+
+ <?php if ($oProduct->isGARAN()) { ?>
+
+ <?php echo \wpsg\WarrantyLabel::getProductHTML($oProduct); ?>
+
+ <?php } ?>
<div class="wpsg_product_buttonarea">
<div class="wpsg_product_buttons_add_basket">
+ <?php /* Urlaubsgruß im Urlaubszeitraum */ ?>
+ <?php if ($this->hasMod('wpsg_mod_deliverytime') && $this->callMod('wpsg_mod_deliverytime', 'holiday', array($this->view['data']['product_key']))) { ?>
+ <div class="wpsg_product_deliverytime_holiday" style="padding:10px; border:1px solid #ff0000;"><?php echo wpsg_hspc($this->callMod('wpsg_mod_deliverytime', 'displayHolidaytext', array($this->view['data']['product_key']))); ?></div>
+ <?php } ?>
+
<?php if ($this->view['oProduct']->canOrder()) { ?>
<div class="wpsg_produkt_add_basket_wrapper">
@@ -322,24 +333,7 @@ <input type="text" value="<?php echo ((wpsg_isSizedInt($this->view['data']['menge']))?$this->view['data']['menge']:'1'); ?>" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" <?php echo (($this->view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?> />
- <?php /* Urlaubsmodus aktiv */ ?>
- <?php if ($this->hasMod('wpsg_mod_deliverytime') && ($this->get_option('wpsg_mod_deliverytime_holiday') == '1')) { ?>
-
- <?php if ($this->callMod('wpsg_mod_deliverytime', 'holiday', array($this->view['data']['product_key']))) { ?>
-
- <div class="wpsg_product_deliverytime_holiday" style="height:50px; padding:10px; width:50%; float:right; border:1px solid #ff0000;">
-
- <?php echo __($this->callMod('wpsg_mod_deliverytime', 'displayHolidaytext', array($this->view['data']['product_key']))); ?>
-
- </div>
-
- <?php } ?>
-
- <?php } else {?>
-
- <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
-
- <?php } ?>
+ <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
<?php echo do_action('wpsg_producttemplate_afterButton'); ?>
diff --git a/views/produkttemplates/standard2.phtml b/views/produkttemplates/standard2.phtml index dd6576f..f61e688 100644 --- a/views/produkttemplates/standard2.phtml +++ b/views/produkttemplates/standard2.phtml @@ -308,6 +308,11 @@ <div class="wpsg_product_buttonarea">
<div class="wpsg_product_buttons_add_basket">
+ <?php /* Urlaubsgruß im Urlaubszeitraum */ ?>
+ <?php if ($this->hasMod('wpsg_mod_deliverytime') && $this->callMod('wpsg_mod_deliverytime', 'holiday', array($this->view['data']['product_key']))) { ?>
+ <div class="wpsg_product_deliverytime_holiday" style="padding:10px; border:1px solid #ff0000;"><?php echo wpsg_hspc($this->callMod('wpsg_mod_deliverytime', 'displayHolidaytext', array($this->view['data']['product_key']))); ?></div>
+ <?php } ?>
+
<?php if ($this->view['oProduct']->canOrder()) { ?>
<div class="wpsg_produkt_add_basket_wrapper">
@@ -315,24 +320,7 @@ <input type="text" value="<?php echo ((wpsg_isSizedInt($this->view['data']['menge']))?$this->view['data']['menge']:'1'); ?>" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" <?php echo (($this->view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?> />
- <?php /* Urlaubsmodus aktiv */ ?>
- <?php if ($this->hasMod('wpsg_mod_deliverytime') && ($this->get_option('wpsg_mod_deliverytime_holiday') == '1')) { ?>
-
- <?php if ($this->callMod('wpsg_mod_deliverytime', 'holiday', array($this->view['data']['product_key']))) { ?>
-
- <div class="wpsg_product_deliverytime_holiday" style="height:50px; padding:10px; width:50%; float:right; border:1px solid #ff0000;">
-
- <?php echo __($this->callMod('wpsg_mod_deliverytime', 'displayHolidaytext', array($this->view['data']['product_key']))); ?>
-
- </div>
-
- <?php } ?>
-
- <?php } else {?>
-
- <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
-
- <?php } ?>
+ <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
<?php if (in_array($this->get_option('wpsg_afterinsert'), array('2', '3'))) { ?>
<script type="text/javascript">
diff --git a/views/produkttemplates/standard3.phtml b/views/produkttemplates/standard3.phtml index 92f4998..788b21c 100644 --- a/views/produkttemplates/standard3.phtml +++ b/views/produkttemplates/standard3.phtml @@ -278,6 +278,11 @@ <div class="wpsg_product_buttonarea">
<div class="wpsg_product_buttons_add_basket">
+ <?php /* Urlaubsgruß im Urlaubszeitraum */ ?>
+ <?php if ($this->hasMod('wpsg_mod_deliverytime') && $this->callMod('wpsg_mod_deliverytime', 'holiday', array($this->view['data']['product_key']))) { ?>
+ <div class="wpsg_product_deliverytime_holiday" style="padding:10px; border:1px solid #ff0000;"><?php echo wpsg_hspc($this->callMod('wpsg_mod_deliverytime', 'displayHolidaytext', array($this->view['data']['product_key']))); ?></div>
+ <?php } ?>
+
<?php if ($this->view['oProduct']->canOrder()) { ?>
<div class="wpsg_produkt_add_basket_wrapper">
@@ -285,24 +290,7 @@ <input type="text" value="<?php echo ((wpsg_isSizedInt($this->view['data']['menge']))?$this->view['data']['menge']:'1'); ?>" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" <?php echo (($this->view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?> />
- <?php /* Urlaubsmodus aktiv */ ?>
- <?php if ($this->hasMod('wpsg_mod_deliverytime') && ($this->get_option('wpsg_mod_deliverytime_holiday') == '1')) { ?>
-
- <?php if ($this->callMod('wpsg_mod_deliverytime', 'holiday', array($this->view['data']['product_key']))) { ?>
-
- <div class="wpsg_product_deliverytime_holiday" style="height:50px; padding:10px; width:50%; float:right; border:1px solid #ff0000;">
-
- <?php echo __($this->callMod('wpsg_mod_deliverytime', 'displayHolidaytext', array($this->view['data']['product_key']))); ?>
-
- </div>
-
- <?php } ?>
-
- <?php } else {?>
-
- <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
-
- <?php } ?>
+ <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
<?php if (in_array($this->get_option('wpsg_afterinsert'), array('2', '3'))) { ?>
<script type="text/javascript">
diff --git a/views/warenkorb/ajaxDialog.phtml b/views/warenkorb/ajaxDialog.phtml index fcb07e4..60043d6 100644 --- a/views/warenkorb/ajaxDialog.phtml +++ b/views/warenkorb/ajaxDialog.phtml @@ -78,6 +78,8 @@ <?php /* Zubehörprodukte START */?>
<?php if ($this->hasMod('wpsg_mod_relatedproducts') && $this->get_option('wpsg_mod_relatedproducts_showAjaxDialog') === '1') { ?>
<?php $arRelatedProducts = $this->callMod('wpsg_mod_relatedproducts', 'getRelatedProducts', array($this->getProduktID($this->view['product_key']))); ?>
+ <?php $limit = intval($this->get_option('wpsg_mod_relatedproducts_showAjaxDialogLimit')); if ($limit > 0 && is_array($arRelatedProducts)) $arRelatedProducts = array_slice($arRelatedProducts, 0, $limit); ?>
+ <?php $ajax_template = strval($this->get_option('wpsg_mod_relatedproducts_showAjaxDialogTemplate')); ?>
<?php if (wpsg_isSizedArray($arRelatedProducts)) { ?>
<div class="wpsg_ajaxdialog_relatedproducts">
<h3><?php echo __('Das könnte Ihnen auch gefallen:', 'wpsg'); ?></h3>
@@ -85,6 +87,9 @@ <div class="wpsg_clear"></div>
<?php foreach ($arRelatedProducts as $rp_data) { $product_data = $this->loadProduktArray($rp_data['product_id']); ?>
+ <?php if (($ajax_template !== '' && $ajax_template !== '0') || !in_array(strval($rp_data['template']??''), ['', '0'], true)) { ?>
+ <?php echo $this->callMod('wpsg_mod_relatedproducts', 'renderRelatedProduct', array(&$rp_data, $ajax_template)); ?>
+ <?php continue; } ?>
<div class="wpsg_ajaxdialog_productrow">
<h4><?php echo $this->getProductName($rp_data['product_id']); ?></h4>
diff --git a/views/warenkorb/basket.phtml b/views/warenkorb/basket.phtml index 63f46ec..d2fef29 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">
@@ -89,7 +83,7 @@ </div>
<div class="amount">
- <input class="wpsg_form_submit_return" type="text" name="wpsg[menge][<?php echo $product_data['product_index']; ?>]" <?php echo ((wpsg_isTrue($product_data['oneOnly']) || wpsg_isSizedInt($product_data['basket_multiple'], 4))?'readonly="readonly"':''); ?> value="<?php echo wpsg_hspc($product_data['menge']); ?>" size="3" />
+ <input class="wpsg_form_submit_return amount" type="text" name="wpsg[menge][<?php echo $product_data['product_index']; ?>]" <?php echo ((wpsg_isTrue($product_data['oneOnly']) || wpsg_isSizedInt($product_data['basket_multiple'], 4))?'readonly="readonly"':''); ?> value="<?php echo wpsg_hspc($product_data['menge']); ?>" size="3" />
<a class="wpsg_basket_removelink" href="<?php echo $this->getRemoveLinkURL($product_data['product_index']); ?>" title="<?php echo __('Produkt aus dem Warenkorb entfernen', 'wpsg'); ?>" onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass Sie das Produkt aus dem Warenkorb entfernen möchten?', 'wpsg'); ?>');">
<img src="<?php echo WPSG_URL; ?>views/gfx/bin_x.png" alt="<?php echo __('Löschen', 'wpsg'); ?>" />
@@ -188,22 +182,6 @@ <?php } ?>
- <div class="basket_sum_row">
- <?php if (isset($this->view['basket']['sum']['preis_rabatt']) && wpsg_tf($this->view['basket']['sum']['preis_rabatt']) > 0) { ?>
- <div class="title">
- <?php echo __("Rabatt", "wpsg"); $bLine = true; ?>:
- </div>
- <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
- <div class="value">
- <?php echo __('anteilig', 'wpsg'); ?>
- </div>
- <?php } ?>
- <div class="value">
- <?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?>
- </div>
- <?php } ?>
- </div>
-
<?php if ($bLine == true) { ?>
<div class="wpsg_spacer"></div>
<?php } ?>
@@ -226,11 +204,24 @@ </div>
<div class="basket_sum_row">
+ <?php if (isset($this->view['basket']['sum']['preis_rabatt']) && wpsg_tf($this->view['basket']['sum']['preis_rabatt']) > 0) { ?>
+ <div class="title">
+ <?php echo __("Rabatt", "wpsg"); $bLine = true; ?>:
+ </div>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <div class="value">
+ <?php echo __('anteilig', 'wpsg'); ?>
+ </div>
+ <?php } ?>
+ <div class="value">
+ <?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?>
+ </div>
+ <?php } ?>
+ </div>
+
+ <div class="basket_sum_row">
<div class="title">
- <?php echo wpsg_translate(__('<a href="#1#">Versandkosten</a>:', 'wpsg'),
- $this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN)
- ); ?>
- <br />
+ <span><?php echo wpsg_translate(__('<a href="#1#">Versandkosten</a>:', 'wpsg'), $this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN)); ?></span>
<?php if (sizeof($this->arShipping) > 1) { ?>
<select name="set_shipping" class="wpsg_form_submit set_shipping">
<option><?php echo __('Bitte wählen', 'wpsg')?></option>
@@ -410,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/checkout.phtml b/views/warenkorb/checkout.phtml index 0e62dd7..1d30a1c 100644 --- a/views/warenkorb/checkout.phtml +++ b/views/warenkorb/checkout.phtml @@ -118,7 +118,7 @@ <div class="wpsg_inner">
<?php if ($this->view['pflicht']['firma'] != '2') { ?>
- <div class="wpsg_checkoutblock" id="wpsg_firma">
+ <div class="wpsg_checkoutblock" id="wpsg_firma_block">
<label for="wpsg_firma"><?php echo __("Firma:", "wpsg"); ?>
<?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
</label>
@@ -133,7 +133,7 @@ <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);*/ ?>" <?php echo (($this->view['basket']['checkout']['title'] == $i)?'selected="selected"':''); ?>><?php echo $t; $i++; ?></option>
+ <option value="<?php echo $i; /*wpsg_hspc($t);*/ ?>" <?php echo ((strval($this->view['basket']['checkout']['title'] ?? '-1') === strval($i))?'selected="selected"':''); ?>><?php echo $t; $i++; ?></option>
<?php } ?>
</select>
</div>
@@ -190,11 +190,11 @@ <?php if ($this->view['pflicht']['email'] != '2') { ?>
<?php if (isset($this->view['pflicht']['emailconfirm']) && $this->view['pflicht']['emailconfirm'] == '1') { ?>
<div class="wpsg_checkoutblock" id="wpsg_email2">
- <label for="email" class="wpsg_checkout"><?php echo __("E-Mail (Wiederholung:)", "wpsg"); ?>
+ <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':''); ?>"
+ class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email2", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="email"
id="email2"
name="wpsg[checkout][email2]"
@@ -307,7 +307,7 @@ <?php } ?>
<?php if ($this->view['pflicht']['land'] != '2') { ?>
- <div class="wpsg_checkoutblock" id="wpsg_land">
+ <div class="wpsg_checkoutblock" id="wpsg_land_block">
<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>
@@ -321,7 +321,7 @@ <?php } ?>
<?php if ($this->view['pflicht']['ustidnr'] != '2') { ?>
- <div class="wpsg_checkoutblock" id="wpsg_ustidnr">
+ <div class="wpsg_checkoutblock" id="wpsg_ustidnr_block">
<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>
diff --git a/views/warenkorb/checkout2.phtml b/views/warenkorb/checkout2.phtml index 1f47bcb..5137a4b 100644 --- a/views/warenkorb/checkout2.phtml +++ b/views/warenkorb/checkout2.phtml @@ -33,10 +33,11 @@ <?php } else { ?>
<div class="wpsg_payship_name"><?php echo __($s['name'], 'wpsg'); ?></div>
<?php } ?>
- <?php if ((isset($s['hint']) && trim($s['hint']) != '') || wpsg_getFloat($s['price']) > 0) { ?>
+ <?php $shipping_price = $this->getShippingPriceFrontend(strval($s['id'])); ?>
+ <?php if ((isset($s['hint']) && trim($s['hint']) != '') || $shipping_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($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?><br />
+ <?php if ($shipping_price > 0) { ?>
+ <?php echo __('Gebühr', 'wpsg'); ?>: <?php echo wpsg_ff($shipping_price, $this->get_option('wpsg_currency')); ?><br />
<?php } ?>
<?php echo $this->replaceUniversalPlatzhalter(__($s['hint'], 'wpsg')); ?>
</div>
@@ -64,13 +65,13 @@ <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']) != '') || wpsg_getFloat($p['price']) > 0) { ?>
<div id="payment_<?php echo $p['id']; ?>_hint" class="shippay_hint">
<?php if ($p['price'] > 0) { ?>
@@ -79,9 +80,11 @@ <?php echo $this->replaceUniversalPlatzhalter(__($p['hint'], 'wpsg')); ?>
</div>
<?php } ?>
-
+
+ <?php if ($this->hasMod('wpsg_mod_customerbudget')) $this->callMod('wpsg_mod_customerbudget', 'renderPaymentBudget', [$p]); ?>
+
<div class="shippay_checkmark"></div>
-
+
</div>
<?php } ?>
</div>
diff --git a/views/warenkorb/index.phtml b/views/warenkorb/index.phtml index 0385572..c654fdd 100644 --- a/views/warenkorb/index.phtml +++ b/views/warenkorb/index.phtml @@ -115,9 +115,6 @@ <?php if ($this->view['widget_settings']['wpsg_vkpage'] == 1) { ?>
<li class="page_item"><a href="<?php echo $this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN); ?>"><?php echo get_the_title($this->get_option('wpsg_page_versand')); ?></a></li>
<?php } ?>
- <?php if ($this->view['widget_settings']['wpsg_odrpage'] == 1) { ?>
- <li class="page_item"><a href="http://ec.europa.eu/consumers/odr/"><?php echo __('Online Streitbeilegung', 'wpsg'); ?></a></li>
- <?php } ?>
<?php if ($this->view['widget_settings']['wpsg_imppage'] == 1) { ?>
<li class="page_item"><a href="<?php echo $this->getURL(wpsg_ShopController::URL_IMPRESSUM); ?>"><?php echo get_the_title($this->get_option('wpsg_page_impressum')); ?></a></li>
<?php } ?>
diff --git a/views/warenkorb/kundendaten_renderfield.phtml b/views/warenkorb/kundendaten_renderfield.phtml index d3cddf3..ef3ec09 100644 --- a/views/warenkorb/kundendaten_renderfield.phtml +++ b/views/warenkorb/kundendaten_renderfield.phtml @@ -7,7 +7,7 @@ ?>
<div class="wpsg_checkoutblock">
<label class="wpsg_cv" for="wpsg_cv_<?php echo $this->view['field']['id']; ?>">
- <?php echo wpsg_hspc(__($this->view['field']['name'], 'wpsg')); ?><?php if ($this->view['field']['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
+ <?php echo wpsg_hspc(__($this->view['field']['name'], 'wpsg')); ?>:<?php if ($this->view['field']['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>
<?php if ($this->view['field']['typ'] == '0') { // Textfeld ?>
<input class="<?php echo (($this->view['field']['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$this->view['field']['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[checkout][custom][<?php echo $this->view['field']['id']; ?>]" type="text" value="<?php echo $this->view['basket']['checkout']['custom'][$this->view['field']['id']]; ?>" />
<?php } else if ($this->view['field']['typ'] == '1') { $arAuswahl = explode("|", $this->view['field']['auswahl']); // Auswahlfeld ?>
diff --git a/views/warenkorb/overview.phtml b/views/warenkorb/overview.phtml index edc0e3d..a128dd2 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'); ?>
- <?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']) != '') { ?>
@@ -303,22 +296,6 @@ <?php } ?>
- <div class="overview_sum_row">
- <?php if (isset($this->view['basket']['sum']['preis_rabatt']) && wpsg_tf($this->view['basket']['sum']['preis_rabatt']) > 0) { ?>
- <div class="title">
- <?php echo __("Rabatt", "wpsg"); $bLine = true; ?>:
- </div>
- <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
- <div class="value">
- <?php echo __('anteilig', 'wpsg'); ?>
- </div>
- <?php } ?>
- <div class="value">
- <?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?>
- </div>
- <?php } ?>
- </div>
-
<?php if ($bLine == true) { ?>
<div class="wpsg_spacer"></div>
<?php } ?>
@@ -340,6 +317,22 @@ </div>
</div>
+ <div class="overview_sum_row">
+ <?php if (isset($this->view['basket']['sum']['preis_rabatt']) && wpsg_tf($this->view['basket']['sum']['preis_rabatt']) > 0) { ?>
+ <div class="title">
+ <?php echo __("Rabatt", "wpsg"); $bLine = true; ?>:
+ </div>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <div class="value">
+ <?php echo __('anteilig', 'wpsg'); ?>
+ </div>
+ <?php } ?>
+ <div class="value">
+ <?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?>
+ </div>
+ <?php } ?>
+ </div>
+
<?php if ($this->view['basket']['sum']['preis_shipping'] != 0 || $this->get_option('wpsg_hideemptyshipping') != '1') { ?>
<div class="overview_sum_row">
<div class="title">
@@ -508,6 +501,38 @@ <div class="wpsg_spacer"></div>
<div class="wpsg_clear"></div>
+ <?php if (\wpsg\WarrantyLabel::isNeed()) { ?>
+ <?php if (\wpsg\WarrantyLabel::getLayout() === wpsg_ShopController::WARRANTYLABEL_INLINE) { ?>
+ <div class="garan_label_wrap">
+ <img src="<?php echo wpsg_ShopController::getShop()->getRessourceURL('gfx/garan/legal_guarantee_notice_den.jpg'); ?>" alt="<?php echo __('GARAN Gewährleistungslabel', 'wpsg'); ?>" />
+ </div>
+ <?php } else { ?>
+ <div class="garan_label_popup" id="wpsg_garan_label_popup">
+ <div class="garan_label_popup_inner">
+ <div class="garan_label_popup_image">
+ <img src="<?php echo esc_url(wpsg_ShopController::getShop()->getRessourceURL('gfx/garan/legal_guarantee_notice_den.jpg')); ?>" alt="<?php echo esc_attr(__('GARAN Gewährleistungslabel', 'wpsg')); ?>" />
+ </div>
+ <button type="button" class="garan_label_popup_confirm" id="wpsg_garan_label_popup_confirm"><?php echo __('Zur Kenntnis genommen', 'wpsg'); ?></button>
+ </div>
+ </div>
+ <noscript>
+ <style>.wpsg_overview .garan_label_popup { position:static; background-color:transparent; }</style>
+ </noscript>
+ <script>
+
+ const el_wpsg_garan_label_popup = document.getElementById('wpsg_garan_label_popup');
+ const el_wpsg_garan_label_popup_confirm = document.getElementById('wpsg_garan_label_popup_confirm');
+
+ el_wpsg_garan_label_popup_confirm.addEventListener('click', () => {
+
+ el_wpsg_garan_label_popup.style.display = 'none';
+
+ });
+
+ </script>
+ <?php } ?>
+ <?php } ?>
+
<input type="submit" class="wpsg_checkoutbutton" value="<?php echo __('zurück', 'wpsg'); ?>" name="wpsg_redirect_checkout" />
<?php if ($this->callMods('handle_order')) { ?>
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>
|
