diff --git a/src/app/warenkorb/warenkorb-content.tsx b/src/app/warenkorb/warenkorb-content.tsx index 8c4fc99..2ab8804 100644 --- a/src/app/warenkorb/warenkorb-content.tsx +++ b/src/app/warenkorb/warenkorb-content.tsx @@ -56,6 +56,9 @@ export function WarenkorbContent({ const crossSellProducts = availableProducts .filter((product) => !cartProductIds.has(product.id)) .slice(0, CROSS_SELL_LIMIT); + // Fuer den leeren Warenkorb: Honig zuerst, sonst was gerade verfuegbar ist. + const honeyFirst = availableProducts.filter((product) => product.category === "HONIG"); + const emptyCartSuggestions = (honeyFirst.length > 0 ? honeyFirst : availableProducts).slice(0, 2); // Siehe checkout-form.tsx: ohne diese Weiche flackert kurz die // "leer"-Meldung auf, bevor der Cart-Store aus localStorage nachliest. @@ -69,11 +72,22 @@ export function WarenkorbContent({ {items.length === 0 ? ( -
-

{t.cart.empty}

- - {t.cartPage.goToShop} - + // Leerer Warenkorb ist kein Endpunkt: daneben stehen die aktuell + // verfuegbaren Honige, statt nur eines Satzes und eines Knopfs. +
+
+

{t.cart.empty}

+ + {t.cartPage.goToShop} + +
+ {emptyCartSuggestions.length > 0 ? ( +
+ {emptyCartSuggestions.map((product, index) => ( + + ))} +
+ ) : null}
) : (