summaryrefslogtreecommitdiff
path: root/views/mods/mod_revocation/page_form.phtml
diff options
context:
space:
mode:
authorRoger Rehnelt <noreply@maennchen1.de>2026-10-03 15:38:49 +0200
committerRoger Rehnelt <noreply@maennchen1.de>2026-10-03 15:38:49 +0200
commitf786f0c59d9a95d6829aaf58d99c882a609355ed (patch)
tree3b6e97793ed5c1eaffcc06dbecd94f62f55f8287 /views/mods/mod_revocation/page_form.phtml
parent6b03b7e7a5b47b52ea5d5b6aae2efb945f4dd686 (diff)
Widerrufsformular: Bestätigung ohne Bestelldaten, Name und Schlüssel
Jeder Widerruf wird angenommen; die Eingangsbestätigung an die eingetragene Adresse enthält nur die eigenen Angaben, der Betreiber bekommt die Bestelldaten mit Vermerken. Neues Pflichtfeld Name; der Link aus der Bestellmail bestätigt den Widerruf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'views/mods/mod_revocation/page_form.phtml')
-rw-r--r--views/mods/mod_revocation/page_form.phtml14
1 files changed, 13 insertions, 1 deletions
diff --git a/views/mods/mod_revocation/page_form.phtml b/views/mods/mod_revocation/page_form.phtml
index c444916..f76b2b8 100644
--- a/views/mods/mod_revocation/page_form.phtml
+++ b/views/mods/mod_revocation/page_form.phtml
@@ -19,12 +19,14 @@
// Vorbelegung des Kontaktfeldes für eingeloggte Kunden
$contact_email = '';
+ $contact_name = '';
$customer_login_id = intval(\wpsg_ShopController::getShop()->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn'));
if ($customer_login_id > 0) {
$oCustomer = \wpsg_customer::getInstance($customer_login_id);
$contact_email = $oCustomer->getEmail();
+ $contact_name = trim($oCustomer->getFirstname().' '.$oCustomer->getName());
}
@@ -33,6 +35,7 @@
$get_product = isset($_GET['wpsg_revo_product']) ? \sanitize_text_field($_GET['wpsg_revo_product']) : '';
$get_amount = isset($_GET['wpsg_revo_amount']) ? max(1, intval($_GET['wpsg_revo_amount'])) : 1;
$get_contact = isset($_GET['wpsg_revo_contact']) ? \sanitize_email($_GET['wpsg_revo_contact']) : '';
+ $get_key = isset($_GET['wpsg_revo_key']) ? \sanitize_key($_GET['wpsg_revo_key']) : ''; // Schlüssel aus der Bestellmail (S18)
if ($contact_email === '' && $get_contact !== '' && \is_email($get_contact)) $contact_email = $get_contact;
@@ -85,6 +88,15 @@
</fieldset>
<div class="form_field">
+ <label class="label" for="wpsg_rvp_name"><?php echo \__('Name', 'wpsg'); ?></label>
+ <div class="value">
+ <input type="text" required id="wpsg_rvp_name" autocomplete="name" name="wpsg_revocation_reason[name]" value="<?php echo \esc_attr($contact_name); ?>" />
+ </div>
+ </div>
+
+ <input type="hidden" name="wpsg_revocation_reason[key]" value="<?php echo \esc_attr($get_key); ?>" />
+
+ <div class="form_field">
<label class="label" for="wpsg_rvp_contact"><?php echo \__('Kontakt - E-Mail', 'wpsg'); ?></label>
<div class="value">
<input type="email" required id="wpsg_rvp_contact" autocomplete="email" name="wpsg_revocation_reason[contact]" value="<?php echo \esc_attr($contact_email); ?>"
@@ -194,7 +206,7 @@
} else {
form.style.display = 'none';
- msg.innerHTML = '<div class="wpsg_revocation_page_success"><?php echo \esc_js(\__('Ihr Widerruf ist bei uns eingegangen und wird nun bearbeitet.', 'wpsg')); ?></div>';
+ msg.innerHTML = '<div class="wpsg_revocation_page_success"><?php echo \esc_js(\__('Ihre Widerrufserklärung ist eingegangen. Die Eingangsbestätigung geht an die angegebene E-Mail-Adresse.', 'wpsg')); ?></div>';
msg.scrollIntoView({ behavior: 'smooth', block: 'center' });
}