Stack low-stock badge with discount badge instead of hiding it, update READMEs

Ausverkauft/discount/low-stock badges used a single either/or slot, so a
product with an active discount silently never showed its low-stock pill
(caught live: todo-karten had both at once). Badges now stack in a flex
column across ProductGrid/ProductSpotlight/RelatedProducts/Pricing, with
Ausverkauft still winning outright. READMEs updated for this and the
recent discount-field gating, shipping-address, and money-rounding changes.
This commit is contained in:
Marco
2026-07-22 23:42:33 +00:00
parent b2bffd13a3
commit 44029cdaad
5 changed files with 106 additions and 53 deletions
+13 -8
View File
@@ -48,15 +48,20 @@ export async function Pricing() {
<span className="absolute top-3 left-3 rounded-full bg-text-muted px-2.5 py-1 text-label font-bold text-bg-base">
Ausverkauft
</span>
) : discount !== null ? (
<span className="absolute top-3 left-3 rounded-full bg-brand px-2.5 py-1 text-label font-bold text-text-primary">
-{discount}%
</span>
) : (
anyLowStock && (
<span className="absolute top-3 left-3 rounded-full bg-warning px-2.5 py-1 text-label font-bold text-text-on-dark">
Nur noch wenige verfügbar
</span>
(discount !== null || anyLowStock) && (
<div className="absolute top-3 left-3 flex flex-col items-start gap-1">
{discount !== null && (
<span className="rounded-full bg-brand px-2.5 py-1 text-label font-bold text-text-primary">
-{discount}%
</span>
)}
{anyLowStock && (
<span className="rounded-full bg-warning px-2.5 py-1 text-label font-bold text-text-on-dark">
Nur noch wenige verfügbar
</span>
)}
</div>
)
)}
</div>