feat(cms): Platzhalter [#zahlarten] in Textboxen -- Liste der aktiven Zahlarten der Kundengruppe aus der Kassen-Logik (Seite Bezahlarten nicht mehr von Hand); Mollie-Aktivschalter in shipping_area auf gruppenspezifisch (2), sonst saehen Haendler Mollie

This commit is contained in:
Thomas Bartelt
2026-09-27 22:43:55 +02:00
parent 21977b8f41
commit 91d90b6714
3 changed files with 113 additions and 5 deletions
@@ -0,0 +1,62 @@
{* =====================================================================================
content_box_zahlarten.tpl -- Liste der aktiven Zahlarten fuer die Kundengruppe des
Besuchers. Wird ueber den Platzhalter [#zahlarten] in einer CMS-Textbox eingefuegt
(website_dyncontent.php::zahlarten_liste, 27.09.2026). Quelle: payment_methods +
customer_group_payment_method_configuration + shipping_area (dieselbe Logik wie die
Kasse) -- was im Backend aktiv ist, steht hier; nichts mehr von Hand pflegen.
Variablen: zahlarten (Liste), zahlarten_gruppe (Gruppen-id), zahlarten_mwst (show_tax)
===================================================================================== *}
<div class="zl">
{if $zahlarten}
{foreach from=$zahlarten item=pm}
<div class="zl-row zl-{$pm->module|default:'std'}{if $pm->module == 'mollie'} zl-{$pm->argument|escape}{/if}">
<div class="zl-logo">
{if $pm->module == 'mollie' && $pm->argument}
<img src="https://www.mollie.com/external/icons/payment-methods/{$pm->argument|escape:'url'}.svg" alt="{$pm->name|escape}" />
{elseif $pm->module == 'paypal_v2' || $pm->module == 'paypal'}
<img src="https://www.paypalobjects.com/webstatic/de_DE/i/de-pp-logo-100px.png" alt="PayPal" />
{elseif $pm->module == 'prepayment'}
<span class="zl-icon">&#8644;</span>
{elseif $pm->module == 'collect_on_delivery'}
<span class="zl-icon">&#128230;</span>
{elseif $pm->module == 'direct_debit'}
<span class="zl-icon">&#8645;</span>
{else}
<span class="zl-icon">&#8226;</span>
{/if}
</div>
<div class="zl-body">
<div class="zl-name">{$pm->name|escape}
{if $pm->module == 'mollie' && $pm->argument == 'applepay'}<span class="zl-muted">(auf Apple-Ger&auml;ten)</span>{/if}
{if $pm->module == 'mollie' && $pm->argument == 'creditcard'}<span class="zl-muted">Visa, Mastercard, American Express</span>{/if}
</div>
{if $pm->order_text}<div class="zl-text">{$pm->order_text}</div>{/if}
{if isset($pm->paymentAddShown) && $pm->paymentAddShown != 0}
<div class="zl-fee">
{if $pm->accountType == '1' || $pm->accountType == '3'}Abzug{else}Aufschlag{/if}:
{if $pm->accountType == '2' || $pm->accountType == '3'}{$pm->rawAdd|number_format:"2":",":"."} %{else}{$pm->paymentAddShown|abs|number_format:"2":",":"."} &euro;{/if}
{if $pm->freePayment > 0} (entf&auml;llt ab {$pm->freePayment|number_format:"2":",":"."} &euro; Warenwert){/if}
</div>
{/if}
</div>
</div>
{/foreach}
{else}
<p>Derzeit sind keine Zahlarten hinterlegt.</p>
{/if}
</div>
{literal}
<style>
.zl { margin: 10px 0 18px; }
.zl *, .zl *:before, .zl *:after { box-sizing: border-box; }
.zl-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; margin-bottom: 8px; background: #fff; border: 1px solid #e3e3e3; border-radius: 8px; }
.zl-logo { flex: 0 0 56px; display: flex; align-items: center; justify-content: center; height: 32px; }
.zl-logo img { max-width: 56px; max-height: 32px; width: auto; height: auto; }
.zl-icon { font-size: 22px; color: #FF6700; line-height: 32px; }
.zl-body { flex: 1 1 auto; min-width: 0; }
.zl-name { font-weight: 700; font-size: 15px; }
.zl-muted { font-weight: 400; color: #777; font-size: 13px; margin-left: 6px; }
.zl-text { color: #444; font-size: 13px; margin-top: 3px; }
.zl-fee { color: #a44a00; font-size: 12px; margin-top: 4px; }
</style>
{/literal}