From 489ae35046ddfbeb0120f49a2ece9a05c92577c9 Mon Sep 17 00:00:00 2001
From: Daniel Schmitzer
Date: Wed, 15 Jan 2025 13:47:02 +0000
Subject: - GiroCode
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8477 0d5edaf7-2b12-4e95-93f4-047927463d4b
---
views/css/frontend.css | 4 +-
views/mailtemplates/html/customer.phtml | 34 +---
views/mods/mod_prepayment/mail_html.phtml | 72 -------
.../mod_prepayment/mail_html_payment_after.phtml | 67 +++++++
views/mods/mod_prepayment/order_done.phtml | 206 ++++++---------------
views/mods/mod_prepayment/settings_edit.phtml | 8 +
6 files changed, 131 insertions(+), 260 deletions(-)
create mode 100644 views/mods/mod_prepayment/mail_html_payment_after.phtml
diff --git a/views/css/frontend.css b/views/css/frontend.css
index 47d1870..9562a7a 100644
--- a/views/css/frontend.css
+++ b/views/css/frontend.css
@@ -254,7 +254,7 @@ input.wpsg_error { border-color:red !important; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_produkt_shortdescription { margin-top:0.75em; margin-bottom:0.75em; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_only_store { margin-top:0.75em; margin-bottom:0.75em; }
.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; }
+.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; }
.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; }
@@ -575,7 +575,7 @@ input.wpsg_error { border-color:red !important; }
.wpsg_mod_prepayment_info_left_currency { display:flex; flex-direction:column; }
.wpsg_mod_prepayment_info_left_amount { display:flex; flex-direction:column; }
-.wpsg_mod_prepayment_girocode { display: flex; gap: 20px; border: 1px solid #000000; padding: 20px;}
+.wpsg_mod_prepayment_girocode { display: flex; gap: 20px; border: 1px solid #000000; padding: 20px; font-size:16px; }
.wpsg_mod_prepayment_girocode h4{ margin: 0; }
.wpsg_mod_prepayment_girocode_left { display: flex; flex-direction: column; }
.wpsg_mod_prepayment_girocode_left_qrcodeimg { width:240px; height:240px; }
diff --git a/views/mailtemplates/html/customer.phtml b/views/mailtemplates/html/customer.phtml
index dd1ffbb..f352a62 100644
--- a/views/mailtemplates/html/customer.phtml
+++ b/views/mailtemplates/html/customer.phtml
@@ -181,38 +181,7 @@
:
-
-view['mod_prepayment']['subject']) && ($this->get_option('wpsg_mod_prepayment_qrcode') == true)) {
-
- if (in_array('kundenmail.phtml', $this->arTemplateStack)) {
-
-
- if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '0') {
-
- $qrcodes = array();
- $qrcodes = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 3, PhpGirocode::OUTPUT_FILE, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
-
- foreach ($qrcodes as $qr) echo $qr;
-
- } else if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '1') {
-
- echo $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 3, PhpGirocode::OUTPUT_FILE, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
-
- } else if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '2') {
-
- echo $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 3, PhpGirocode::OUTPUT_FILE, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
-
- }
-
- }
-
- }
-
-?>
+
|
@@ -221,4 +190,5 @@
callMods('mail_payment'); ?>
+ callMods('mail_payment_after'); ?>
\ No newline at end of file
diff --git a/views/mods/mod_prepayment/mail_html.phtml b/views/mods/mod_prepayment/mail_html.phtml
index 272041f..0da2f01 100644
--- a/views/mods/mod_prepayment/mail_html.phtml
+++ b/views/mods/mod_prepayment/mail_html.phtml
@@ -9,75 +9,3 @@
#2# an.', 'wpsg'), wpsg_ff($this->view['basket']['arCalculation']['sum']['topay_brutto'], $this->get_option('wpsg_currency')), $this->view['mod_prepayment']['subject']); ?>
-
-
- | : |
- replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?> |
-
-
- | : |
- replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?> |
-
-
- | : |
- replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_bank')); ?> |
-
-
- | : |
- replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_swift')); ?> |
-
-
- | : |
- view['mod_prepayment']['subject']); ?> |
-
- view['mod_prepayment']['subject']) && ($this->get_option('wpsg_mod_prepayment_qrcode') == true)) {
-
- require_once WPSG_PATH_LIB.'phpgirocode.class.php';
-
- echo '| '.__('Zahlen via QR Code', 'wpsg').': |
';
-
- if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '0') {
-
- $qrcodes = array();
- $qrcodes = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 3, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
-
- foreach ($qrcodes as $qr) {
-
- if ($qr['title'] == 'QR-Rechnung') echo '';
- else echo '
';
- echo '| '.__($qr['title'], 'wpsg').' | ';
- echo ' | ';
- echo '
';
-
- }
-
- } else if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '1') {
-
- $qrcode = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 3, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
-
- echo '
-
- | '.__($qrcode['title'], 'wpsg').': |
- '.$qrcode['hash'].' |
-
- ';
-
- } else if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '2') {
-
- $qrcode = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 3, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
-
- echo '
-
- | '.__($qrcode['title'], 'wpsg').': |
- '.$qrcode['hash'].' |
-
- ';
-
- }
-
- }
-
- ?>
-
\ No newline at end of file
diff --git a/views/mods/mod_prepayment/mail_html_payment_after.phtml b/views/mods/mod_prepayment/mail_html_payment_after.phtml
new file mode 100644
index 0000000..42417af
--- /dev/null
+++ b/views/mods/mod_prepayment/mail_html_payment_after.phtml
@@ -0,0 +1,67 @@
+
+
+view['mod_prepayment']['subject'])) {
+
+?>
+
+
+
+ get_option('wpsg_mod_prepayment_qrcode') == true) {
+
+ require_once WPSG_PATH_LIB.'phpgirocode.class.php';
+
+ $qrcode = $this->callMod('wpsg_mod_prepayment', 'genQRCode', [
+ $this->view['o_id'],
+ $this->view['mod_prepayment']['subject'],
+ $this->view['basket']['sum']['preis_gesamt_brutto'],
+ 5,
+ PhpGirocode::OUTPUT_BASE64
+ ]);
+
+ ?>
+
+
+
+ |
+
+
+
+
+ | : |
+ replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?> |
+
+
+ | : |
+ replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?> |
+
+
+ | : |
+ replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_bank')); ?> |
+
+
+ | : |
+ replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_swift')); ?> |
+
+
+ | : |
+ view['mod_prepayment']['subject']); ?> |
+
+
+ |
+
+
+view['wpsg_mod_prepayment']['subject']);
-
+ $formatIBAN = function($iban) {
+
+ $iban = preg_replace('/\040/', '', $iban);
+ $iban_formated = '';
+
+ for ($i = 0; $i < ceil(strlen($iban) / 4); $i ++) $iban_formated .= substr($iban, $i * 4, 4).' ';
+
+ return trim($iban_formated);
+
+ }
+
?>
view['basket']['arCalculation']['sum']['topay_brutto'], $this->get_option('wpsg_currency'))); ?>
replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber'))); ?>
-replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban'))); ?>
+replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')))); ?>
replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_bank'))); ?>
replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_swift'))); ?>
view['wpsg_mod_prepayment']['subject']); ?>
-view['wpsg_mod_prepayment']['subject']) && ($this->get_option('wpsg_mod_prepayment_qrcode') == true) ) { ?>
+view['wpsg_mod_prepayment']['subject']) && $this->get_option('wpsg_mod_prepayment_qrcode') == true) { ?>
-
- get_option('wpsg_mod_prepayment_qrcode_country') == '0') { ?>
-
-
-
- callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 10, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
-
- ?>
-
-
-
-
-
-
-
- '; ?>
-
-
-
-
- get_option('wpsg_currency'); ?>
-
-
-
-
-
-
-
-
-
- replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?>
- replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?>
- replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_street')); ?>
- replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_zip')).' '.$this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_city')); ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
- get_option('wpsg_mod_prepayment_qrcode_country') == '1') { ?>
+
+
+
-
-
-
-
-
-
- __('Girocode', 'wpsg'),
+ 'invoiceAmount' => $this->view['basket']['sum']['preis_gesamt_brutto'],
+ 'referenceNumber' => $this->view['wpsg_mod_prepayment']['subject'],
+ 'hash' => $this->callMod('wpsg_mod_prepayment', 'genQRCode', [
+ $this->view['o_id'],
+ $this->view['wpsg_mod_prepayment']['subject'],
+ $this->view['basket']['sum']['preis_gesamt_brutto'],
+ 10,
+ PhpGirocode::OUTPUT_BASE64
+ ])
+ ];
- $img = array();
- $img = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 10, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
-
- ?>
-
-
-
-
-
- '; ?>
-
-
-
-
- get_option('wpsg_currency'); ?>
-
-
-
-
-
+ ?>
+
+
+
+
+ '; ?>
+
+
+
+
+ get_option('wpsg_currency'); ?>
-
-
-
- replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?>
- replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?>
- replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_street')); ?>
- replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_zip')).' '.$this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_city')); ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
- get_option('wpsg_mod_prepayment_qrcode_country') == '2') { ?>
-
-
-
- callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 10, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
-
- ?>
-
-
-
-
-
- '; ?>
-
-
-
-
- get_option('wpsg_currency'); ?>
-
-
-
-
-
+
+
+
-
-
- replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?>
- replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?>
- replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_street')); ?>
- replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_zip')).' '.$this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_city')); ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ IBAN: replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban'))); ?>
+ Kontoinhaber: replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?>
+ Betreff:
+
+
\ No newline at end of file
diff --git a/views/mods/mod_prepayment/settings_edit.phtml b/views/mods/mod_prepayment/settings_edit.phtml
index 53fa95f..7d99ebe 100644
--- a/views/mods/mod_prepayment/settings_edit.phtml
+++ b/views/mods/mod_prepayment/settings_edit.phtml
@@ -9,6 +9,14 @@
get_option('wpsg_mod_prepayment_bezeichnung'), array('help' => 'wpsg_mod_prepayment_bezeichnung')); ?>
get_option('wpsg_mod_prepayment_aktiv'), array('help' => 'wpsg_mod_prepayment_aktiv')); ?>
+
+
+get_option('wpsg_mod_prepayment_qrcode'), array('help' => 'wpsg_mod_prepayment_qrcode')); ?>
+get_option('wpsg_mod_prepayment_qrcode_invoice'), array('help' => 'wpsg_mod_prepayment_qrcode_invoice')); ?>
+get_option('wpsg_mod_prepayment_qrcode_mail'), array('help' => 'wpsg_mod_prepayment_qrcode_mail')); ?>
+
+
+
get_option('wpsg_mod_prepayment_hint'), array('help' => 'wpsg_mod_prepayment_hint')); ?>
get_option('wpsg_mod_prepayment_subject'), array('help' => 'mod_prepayment_subject')); ?>
--
cgit v1.2.3