diff options
| author | Roger Rehnelt <noreply@maennchen1.de> | 2026-10-02 15:36:13 +0200 |
|---|---|---|
| committer | Roger Rehnelt <noreply@maennchen1.de> | 2026-10-02 15:36:13 +0200 |
| commit | 4c322420f5630313157839416bc7ae7235cbbf00 (patch) | |
| tree | 3be2ba0bab5f82d035acf42a60a340125a3b6816 /views/warenkorb/progress.phtml | |
| parent | 7c694d8499f58080992aadfc6b297b46ee98fe4f (diff) | |
Kasse: Schrittleiste als nummerierte Liste im Modus „neu“
Der aktuelle Schritt trägt aria-current, nur erledigte Schritte sind verlinkt (Punkt 8.9).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'views/warenkorb/progress.phtml')
| -rw-r--r-- | views/warenkorb/progress.phtml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/views/warenkorb/progress.phtml b/views/warenkorb/progress.phtml index 92128d9..2a94a55 100644 --- a/views/warenkorb/progress.phtml +++ b/views/warenkorb/progress.phtml @@ -6,6 +6,31 @@ */
?>
+<?php if (\wpsg\ThemeStyle::isThemeMode()) {
+
+ // Modus „neu“: nummerierte Liste, der aktuelle Schritt mit aria-current (Punkt 8.9)
+ $arSteps = [
+ 1 => [__('Warenkorb', 'wpsg'), $this->getUrl(wpsg_ShopController::URL_BASKET)],
+ 2 => [__('Kundendaten', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT)],
+ 3 => [__('Versand/Zahlung', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT2)],
+ 4 => [__('Abschluss', 'wpsg'), $this->getURL(wpsg_ShopController::URL_OVERVIEW)]
+ ];
+ $current = intval($GLOBALS['step']);
+
+?>
+<nav class="wpsg-steps" aria-label="<?php echo esc_attr__('Schritte der Bestellung', 'wpsg'); ?>">
+ <ol class="wpsg-steps__list">
+ <?php foreach ($arSteps as $nr => $arStep) { $class = (($nr === $current)?'is-current':(($nr < $current)?'is-done':'')); ?>
+ <li class="wpsg-steps__step <?php echo esc_attr($class); ?>"<?php echo (($nr === $current)?' aria-current="step"':''); ?>>
+ <?php if ($nr < $current) { ?><a href="<?php echo esc_url($arStep[1]); ?>"><?php } ?>
+ <span class="wpsg-steps__number"><?php echo esc_html((string)$nr); ?></span>
+ <span class="wpsg-steps__label"><?php echo str_replace('/', '/<wbr>', esc_html($arStep[0])); ?></span>
+ <?php if ($nr < $current) { ?></a><?php } ?>
+ </li>
+ <?php } ?>
+ </ol>
+</nav>
+<?php return; } ?>
<div class="wpsg_progress">
|
