summaryrefslogtreecommitdiff
path: root/views/mods/mod_revocation/mails
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2026-05-28 04:16:42 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2026-05-28 04:16:42 +0000
commitfe1b43a2645ee78032acffc581d52609a6d1698a (patch)
tree3d7b0bb74c67a9bac23ea2fb513b8012f4e13dbc /views/mods/mod_revocation/mails
parentfd9122e4359db02258da7f6a0460c0fc962e5420 (diff)
- Widerrufsformular
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8520 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_revocation/mails')
-rw-r--r--views/mods/mod_revocation/mails/mail_admin_html.phtml80
-rw-r--r--views/mods/mod_revocation/mails/mail_admin_text.phtml44
-rw-r--r--views/mods/mod_revocation/mails/mail_customer_html.phtml75
-rw-r--r--views/mods/mod_revocation/mails/mail_customer_text.phtml53
4 files changed, 252 insertions, 0 deletions
diff --git a/views/mods/mod_revocation/mails/mail_admin_html.phtml b/views/mods/mod_revocation/mails/mail_admin_html.phtml
new file mode 100644
index 0000000..57920b5
--- /dev/null
+++ b/views/mods/mod_revocation/mails/mail_admin_html.phtml
@@ -0,0 +1,80 @@
+<?php
+
+ declare(strict_types=1);
+
+ /**
+ * @author: Daniel Schmitzer
+ * @date: 14.04.26
+ * @time: 09:21
+ */
+
+ namespace wpsgRevocation;
+
+ $arSubmitData = \wpsg_ShopController::getShop()->view['arSubmitData'] ?? [];
+ $arReason = Revocation::getReasons();
+
+?>
+<p><?php echo __('Hallo,', 'wpsgRevocation'); ?></p>
+
+<p><?php echo __('ein Kunde hat einen Widerruf für ein Produkt durchgeführt.', 'wpsgRevocation'); ?></p>
+
+<p>
+ <strong><?php echo __('Name', 'wpsgRevocation'); ?>:</strong> %kunde_anrede% %kunde_vname% %kunde_name%<br>
+ <strong><?php echo __('E-Mail', 'wpsgRevocation'); ?>:</strong> %kunde_email%
+</p>
+
+<hr>
+
+<?php foreach ($arSubmitData as $key => $d):
+
+ $oOrder = $d['oOrder'];
+ $oOrderProduct = $d['oOrderProduct'];
+
+ $reasonText = array_values(array_filter(
+ $arReason,
+ function($item) use ($d) {
+ return $item['id'] === $d['reason'];
+ }
+ ))[0]['text'] ?? '';
+?>
+
+ <div style="margin-bottom:15px; padding-bottom:10px; border-bottom:1px solid #ddd;">
+ <p>
+ <strong><?php echo __('Bestellung', 'wpsgRevocation'); ?>:</strong>
+ <?php echo $oOrder->getNr(); ?>
+ </p>
+
+ <p>
+ <strong><?php echo __('Produkt', 'wpsgRevocation'); ?>:</strong>
+ <?php echo $d['amount']; ?> x <?php echo $oOrderProduct->getProduct()->getProductName(true); ?>
+ / <?php echo __('Artikelnummer', 'wpsgRevocation'); ?>:
+ <?php echo $oOrderProduct->getProduct()->getNr(); ?>
+ </p>
+
+ <p>
+ <strong><?php echo __('Ausgewählter Grund', 'wpsgRevocation'); ?>:</strong>
+ <?php echo $reasonText; ?>
+ </p>
+
+ <p>
+ <strong><?php echo __('Bemerkung', 'wpsgRevocation'); ?>:</strong>
+ <?php echo nl2br(htmlspecialchars($d['comment'] ?? '')); ?>
+ </p>
+ </div>
+
+<?php endforeach; ?>
+
+<p>
+ <strong><?php echo __('Datum des Widerrufs', 'wpsgRevocation'); ?>:</strong>
+ <?php echo date('d.m.Y H:i:s'); ?>
+</p>
+
+<p>
+ <?php echo __('Bitte prüft den Vorgang und führt die Rückabwicklung (Storno / Rückerstattung) durch.', 'wpsgRevocation'); ?>
+</p>
+
+<p>
+ <?php echo __('Viele Grüße', 'wpsgRevocation'); ?><br>
+ <?php echo __(\wpsg_ShopController::getShop()->get_option('wpsg_shopdata_name'), 'wpsgRevocation'); ?>
+ - <?php echo __('Team', 'wpsgRevocation'); ?>
+</p> \ No newline at end of file
diff --git a/views/mods/mod_revocation/mails/mail_admin_text.phtml b/views/mods/mod_revocation/mails/mail_admin_text.phtml
new file mode 100644
index 0000000..8ce601a
--- /dev/null
+++ b/views/mods/mod_revocation/mails/mail_admin_text.phtml
@@ -0,0 +1,44 @@
+<?php
+
+ declare(strict_types=1);
+
+ /**
+ * @author: Daniel Schmitzer
+ * @date: 14.04.26
+ * @time: 09:21
+ */
+
+ namespace wpsgRevocation;
+
+ $arSubmitData = \wpsg_ShopController::getShop()->view['arSubmitData'] ?? [];
+ $arReason = Revocation::getReasons();
+
+?><?php echo __('Hallo,', 'wpsgRevocation'); ?>
+
+<?php echo __('ein Kunde hat einen Widerruf für ein Produkt durchgeführt.', 'wpsgRevocation'); ?>
+
+<?php echo mb_str_pad(__('Name', 'wpsgRevocation').':', 25); ?> %kunde_anrede% %kunde_vname% %kunde_name%
+<?php echo mb_str_pad(__('E-Mail', 'wpsgRevocation').':', 25); ?> %kunde_email%
+
+<?php foreach ($arSubmitData as $key => $d) {
+
+ /** @var \wpsg_order $oOrder */
+ $oOrder = $d['oOrder'];
+
+ /** @var \wpsg_order_product $oOrderProduct */
+ $oOrderProduct = $d['oOrderProduct'];
+
+?>
+<?php echo mb_str_pad(__('Bestellung', 'wpsgRevocation').':', 25); ?> <?php echo $oOrder->getNr(); ?>
+<?php echo mb_str_pad(__('Produkt', 'wpsgRevocation').':', 25); ?> <?php echo $d['amount']; ?> x <?php echo $oOrderProduct->getProduct()->getProductName(true); ?> / <?php echo __('Artikelnummer', 'wpsgRevocation'); ?>: <?php echo $oOrderProduct->getProduct()->getNr(); ?>
+<?php echo mb_str_pad(__('Ausgewählter Grund', 'wpsgRevocation').':', 25); ?> <?php echo array_values(array_filter($arReason, function($item) use ($d) { return $item['id'] === $d['reason']; }))[0]['text'] ?? ''; ?>
+<?php echo mb_str_pad(__('Bemerkung', 'wpsgRevocation').':', 25); ?> <?php echo $d['comment']; ?>
+
+<?php } ?>
+
+<?php echo mb_str_pad(__('Datum des Widerrufs', 'wpsgRevocation').':', 25); ?> <?php echo date('d.m.Y H:i:s'); ?>
+
+<?php echo __('Bitte prüft den Vorgang und führt die Rückabwicklung (Storno / Rückerstattung) durch.', 'wpsgRevocation'); ?>
+
+<?php echo __('Viele Grüße', 'wpsgRevocation'); ?>
+<?php echo __(\wpsg_ShopController::getShop()->get_option('wpsg_shopdata_name'), 'wpsgRevocation'); ?> - <?php echo __('Team', 'wpsgRevocation'); ?> \ No newline at end of file
diff --git a/views/mods/mod_revocation/mails/mail_customer_html.phtml b/views/mods/mod_revocation/mails/mail_customer_html.phtml
new file mode 100644
index 0000000..f946efa
--- /dev/null
+++ b/views/mods/mod_revocation/mails/mail_customer_html.phtml
@@ -0,0 +1,75 @@
+<?php
+
+ declare(strict_types=1);
+
+ /**
+ * @author: Daniel Schmitzer
+ * @date: 14.04.26
+ * @time: 09:21
+ */
+
+ namespace wpsgRevocation;
+
+ $arSubmitData = \wpsg_ShopController::getShop()->view['arSubmitData'] ?? [];
+ $arReason = Revocation::getReasons();
+
+?>
+<p><?php echo __('Hallo', 'wpsgRevocation'); ?> %kunde_anrede% %kunde_name%,</p>
+
+<p><?php echo __('wir haben Ihren Widerruf erhalten und bedanken uns für Ihre Mitteilung.', 'wpsgRevocation'); ?></p>
+
+<h3><?php echo __('Ihre Widerrufsanmeldung:', 'wpsgRevocation'); ?></h3>
+
+<?php foreach ($arSubmitData as $key => $d):
+
+ $oOrder = $d['oOrder'];
+ $oOrderProduct = $d['oOrderProduct'];
+
+ $reasonText = array_values(array_filter(
+ $arReason,
+ function($item) use ($d) {
+ return $item['id'] === $d['reason'];
+ }
+ ))[0]['text'] ?? '';
+?>
+
+ <div style="margin-bottom:20px; padding:15px; background-color:#f9f9f9; border-radius:5px;">
+ <p style="margin:0 0 10px 0;">
+ <strong><?php echo __('Bestellnummer', 'wpsgRevocation'); ?>:</strong>
+ <?php echo $oOrder->getNr(); ?>
+ </p>
+
+ <p style="margin:0 0 10px 0;">
+ <strong><?php echo __('Produkt', 'wpsgRevocation'); ?>:</strong>
+ <?php echo $d['amount']; ?> x <?php echo $oOrderProduct->getProduct()->getProductName(true); ?>
+ / <?php echo __('Artikelnr.', 'wpsgRevocation'); ?>:
+ <?php echo $oOrderProduct->getProduct()->getNr(); ?>
+ </p>
+
+ <p style="margin:0 0 10px 0;">
+ <strong><?php echo __('Grund', 'wpsgRevocation'); ?>:</strong>
+ <?php echo $reasonText; ?>
+ </p>
+
+ <?php if (!empty($d['comment'])): ?>
+ <p style="margin:0 0 10px 0;">
+ <strong><?php echo __('Bemerkung', 'wpsgRevocation'); ?>:</strong>
+ <?php echo nl2br(htmlspecialchars($d['comment'])); ?>
+ </p>
+ <?php endif; ?>
+ </div>
+
+<?php endforeach; ?>
+
+<p>
+ <strong><?php echo __('Widerrufdatum', 'wpsgRevocation'); ?>:</strong>
+ <?php echo date('d.m.Y H:i:s'); ?>
+</p>
+
+<p><?php echo __('Wir werden Ihren Widerruf nun schnellstmöglich bearbeiten und uns bei Fragen mit Ihnen in Verbindung setzen.', 'wpsgRevocation'); ?></p>
+
+<p>
+ <?php echo __('Mit freundlichen Grüßen', 'wpsgRevocation'); ?><br>
+ <?php echo \wpsg_ShopController::getShop()->get_option('wpsg_shopdata_name'); ?>
+ - <?php echo __('Team', 'wpsgRevocation'); ?>
+</p> \ No newline at end of file
diff --git a/views/mods/mod_revocation/mails/mail_customer_text.phtml b/views/mods/mod_revocation/mails/mail_customer_text.phtml
new file mode 100644
index 0000000..0608fc5
--- /dev/null
+++ b/views/mods/mod_revocation/mails/mail_customer_text.phtml
@@ -0,0 +1,53 @@
+<?php
+
+ declare(strict_types=1);
+
+ /**
+ * @author: Daniel Schmitzer
+ * @date: 14.04.26
+ * @time: 09:21
+ */
+
+ namespace wpsgRevocation;
+
+ $arSubmitData = \wpsg_ShopController::getShop()->view['arSubmitData'] ?? [];
+ $arReason = Revocation::getReasons();
+
+?><?php echo __('Hallo', 'wpsgRevocation'); ?> %kunde_anrede% %kunde_name%,
+
+<?php echo __('wir haben Ihren Widerruf erhalten und bedanken uns für Ihre Mitteilung.', 'wpsgRevocation'); ?>
+
+<?php echo __('Ihre Widerrufsanmeldung:', 'wpsgRevocation'); ?>
+
+<?php foreach ($arSubmitData as $key => $d):
+
+ $oOrder = $d['oOrder'];
+ $oOrderProduct = $d['oOrderProduct'];
+
+ $reasonText = array_values(array_filter(
+ $arReason,
+ function($item) use ($d) {
+ return $item['id'] === $d['reason'];
+ }
+ ))[0]['text'] ?? '';
+?>
+
+<?php echo mb_str_pad(__('Bestellnummer', 'wpsgRevocation').':', 20); ?> <?php echo $oOrder->getNr(); ?>
+
+<?php echo mb_str_pad(__('Produkt', 'wpsgRevocation').':', 20); ?> <?php echo $d['amount']; ?> x <?php echo $oOrderProduct->getProduct()->getProductName(true); ?> / <?php echo __('Artikelnr.', 'wpsgRevocation'); ?>: <?php echo $oOrderProduct->getProduct()->getNr(); ?>
+
+<?php echo mb_str_pad(__('Grund', 'wpsgRevocation').':', 20); ?> <?php echo $reasonText; ?>
+
+<?php if (!empty($d['comment'])): ?>
+<?php echo mb_str_pad(__('Bemerkung', 'wpsgRevocation').':', 20); ?> <?php echo $d['comment']; ?>
+<?php endif; ?>
+
+<?php endforeach; ?>
+
+<?php echo mb_str_pad(__('Widerrufdatum', 'wpsgRevocation').':', 20); ?> <?php echo date('d.m.Y H:i:s'); ?>
+
+<?php echo __('Wir werden Ihren Widerruf nun schnellstmöglich bearbeiten und uns bei Fragen mit Ihnen in Verbindung setzen.', 'wpsgRevocation'); ?>
+
+<?php echo __('Mit freundlichen Grüßen', 'wpsgRevocation'); ?>
+
+<?php echo \wpsg_ShopController::getShop()->get_option('wpsg_shopdata_name'); ?> - <?php echo __('Team', 'wpsgRevocation'); ?> \ No newline at end of file