From e75392c75b3e685e3d220ca4611aa30e7c93b640 Mon Sep 17 00:00:00 2001 From: Nick Szaunig Date: Fri, 25 Sep 2026 13:06:53 +0200 Subject: [PATCH] feat(ui): Warenkorb-Seite mit Fortschritt zum Mengenrabatt - Weg zum Mengenrabatt als sich fuellender Balken (gleiche Schwelle wie bisher der Texthinweis), erreichter Rabatt als Bestaetigung mit Wabe - Positionen gleiten herein und beim Entfernen hinaus, Entfernen-Knopf als gezeichnetes Symbol statt Textzeichen - Artikelnamen und Preise in Serifenschrift, Gesamtsumme tickt bei jeder Aenderung, Zusammenfassung laeuft beim Scrollen mit Co-Authored-By: Claude Opus 5.5 (1M context) --- src/app/warenkorb/warenkorb-content.tsx | 84 ++++++++++++++++++------- 1 file changed, 62 insertions(+), 22 deletions(-) diff --git a/src/app/warenkorb/warenkorb-content.tsx b/src/app/warenkorb/warenkorb-content.tsx index 894fca1..603afcc 100644 --- a/src/app/warenkorb/warenkorb-content.tsx +++ b/src/app/warenkorb/warenkorb-content.tsx @@ -1,6 +1,8 @@ "use client"; +import { AnimatePresence, motion } from "motion/react"; import Link from "next/link"; +import { HexCheck } from "@/components/honeycomb"; import { Container, SectionHeading, LinkButton } from "@/components/ui"; import { TrustBadges } from "@/components/trust-badges"; import { CartItemThumbnail } from "@/components/cart-item-thumbnail"; @@ -76,13 +78,21 @@ export function WarenkorbContent({ ) : (
+ {items.map((item) => { const itemStock = stock?.[item.productId]; return ( -
+
- + {item.name}

{item.weightGrams} g

@@ -103,31 +113,34 @@ export function WarenkorbContent({ onChange={(quantity) => setQuantity(item.productId, quantity)} max={itemStock ?? 10} /> - + {formatPrice(item.priceCents * item.quantity, "EUR", locale)}
-
+ ); })} +
-
+
{t.cart.subtotal} - {formatPrice(subtotal, "EUR", locale)} + {formatPrice(subtotal, "EUR", locale)}
{t.cartPage.shippingLabel(totalQuantity)} - {shipping === 0 ? t.cartPage.free : formatPrice(shipping, "EUR", locale)} + {shipping === 0 ? t.cartPage.free : formatPrice(shipping, "EUR", locale)}
{nextTier && nextTier.unitsUntilNext <= 2 ? (

@@ -135,20 +148,47 @@ export function WarenkorbContent({

) : null} {activeBulkDiscount ? ( -
- + + + {t.cartPage.discountLabel} ({activeBulkDiscount.percent}%) - -{formatPrice(bulkDiscountCents, "EUR", locale)} -
+ -{formatPrice(bulkDiscountCents, "EUR", locale)} + ) : nextBulkDiscount && nextBulkDiscount.unitsUntilNext <= 2 ? ( -

- {t.cartPage.bulkDiscountProgress(nextBulkDiscount.unitsUntilNext, nextBulkDiscount.percent)} -

+ // Der Weg zum Mengenrabatt als Glas, das sich mit jedem + // weiteren Stueck fuellt — nicht nur als Kleingedrucktes. +
+

+ {t.cartPage.bulkDiscountProgress(nextBulkDiscount.unitsUntilNext, nextBulkDiscount.percent)} +

+ +
) : null} -
- {t.cartPage.total} - {formatPrice(subtotal - bulkDiscountCents + shipping, "EUR", locale)} +
+ {t.cartPage.total} + + {formatPrice(subtotal - bulkDiscountCents + shipping, "EUR", locale)} +
@@ -164,10 +204,10 @@ export function WarenkorbContent({ {items.length > 0 && crossSellProducts.length > 0 ? (
-

{t.productPage.relatedProductsHeading}

+

{t.productPage.relatedProductsHeading}

- {crossSellProducts.map((product) => ( - + {crossSellProducts.map((product, index) => ( + ))}