Add CSS hook, URL ref prefill, order prefill, and Widerrufsfrist display
- Fix CSS loading: register stylesheet via actionFrontControllerSetMedia hook instead of initContent() — guaranteed to fire before page render - Upgrade script registers new hook on existing installations - Feature 1: pre-fill order_reference from ?ref= URL parameter - Feature 2: pre-fill customer name/email from logged-in account when navigating with ?ref= (already worked; now order ref is also pre-filled) - Feature 4: compute Widerrufsfrist (order date +14 days) from DB and display on form (when ref in URL), confirm, and success pages - Feature 3: EN mail templates were already present Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,17 @@
|
||||
<div class="cyp-summary-val">{$form_data.message|escape:'html':'UTF-8'|nl2br nofilter}</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if isset($withdrawal_deadline) && $withdrawal_deadline != ''}
|
||||
<div class="cyp-summary-row">
|
||||
<div class="cyp-summary-key">{l s='Frist' mod='simple_withdrawalbutton'}</div>
|
||||
<div class="cyp-summary-val" style="color:var(--cyw-accent);font-weight:600;">
|
||||
{l s='bis' mod='simple_withdrawalbutton'} {$withdrawal_deadline|escape:'html':'UTF-8'}
|
||||
<span style="font-size:12px;font-weight:400;color:var(--cyw-text-muted);">
|
||||
({l s='14 Tage ab Bestelldatum' mod='simple_withdrawalbutton'})
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<form method="post" action="{$action_url|escape:'html':'UTF-8'}">
|
||||
|
||||
@@ -28,6 +28,19 @@
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{if isset($withdrawal_deadline) && $withdrawal_deadline != ''}
|
||||
<div class="cyp-deadline-notice" style="
|
||||
display:flex; align-items:center; gap:10px; background:#eef2f8;
|
||||
border:1px solid #c5d4eb; border-radius:6px; padding:11px 14px;
|
||||
font-size:13px; color:var(--cyw-accent); margin-bottom:24px;">
|
||||
<span style="font-size:16px;">📅</span>
|
||||
<span>
|
||||
{l s='Widerrufsfrist (14 Tage ab Bestelldatum): bis' mod='simple_withdrawalbutton'}
|
||||
<strong>{$withdrawal_deadline|escape:'html':'UTF-8'}</strong>
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $errors_list|@count > 0}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<ul>
|
||||
|
||||
@@ -77,6 +77,17 @@
|
||||
<div class="cyp-summary-val">{$success_data.message|escape:'html':'UTF-8'|nl2br nofilter}</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if isset($withdrawal_deadline) && $withdrawal_deadline != ''}
|
||||
<div class="cyp-summary-row">
|
||||
<div class="cyp-summary-key">{l s='Frist' mod='simple_withdrawalbutton'}</div>
|
||||
<div class="cyp-summary-val" style="color:var(--cyw-accent);font-weight:600;">
|
||||
{l s='bis' mod='simple_withdrawalbutton'} {$withdrawal_deadline|escape:'html':'UTF-8'}
|
||||
<span style="font-size:12px;font-weight:400;color:var(--cyw-text-muted);">
|
||||
({l s='14 Tage ab Bestelldatum' mod='simple_withdrawalbutton'})
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="cyp-legal">
|
||||
|
||||
Reference in New Issue
Block a user