diff --git a/frontend/src/pages/shop/index.astro b/frontend/src/pages/shop/index.astro
index 74acb1a..4b7400f 100644
--- a/frontend/src/pages/shop/index.astro
+++ b/frontend/src/pages/shop/index.astro
@@ -3,7 +3,7 @@ export const prerender = false;
import Layout from "../../layouts/Layout.astro";
import { listProducts, getDefaultRegion } from "../../lib/medusa";
-import { formatEUR, formatGrundpreis } from "../../lib/format";
+import { formatEUR, grundpreisAus } from "../../lib/format";
import { CLAIM } from "../../lib/sections";
import {
findVariety,
@@ -42,9 +42,9 @@ function priceLabel(product: (typeof products)[number]) {
}
function grundpreisLabel(product: (typeof products)[number]) {
- const variant = product.variants.find((v) => v.metadata?.net_weight_grams);
- if (!variant?.calculated_price || !variant.metadata?.net_weight_grams) return null;
- return formatGrundpreis(variant.calculated_price.calculated_amount, variant.metadata.net_weight_grams);
+ const variant = product.variants.find((v) => v.metadata?.net_weight_grams || v.metadata?.net_volume_ml);
+ if (!variant?.calculated_price) return null;
+ return grundpreisAus(variant.calculated_price.calculated_amount, variant.metadata);
}
/**
@@ -239,7 +239,11 @@ const groups = [
{/* Der kurze Sortenname aus dem Briefing statt des vollen
Katalogtitels — der beschreibende Teil steht darunter. */}
{varietyName(product.title)}
- {variety?.subline &&
{variety.subline}
}
+ {/* Ohne Sorte der Untertitel aus Medusa — so steht z. B. bei der
+ eigenen Seife „handgemacht" direkt neben der Fertigware. */}
+ {(variety?.subline ?? product.subtitle) && (
+
{variety?.subline ?? product.subtitle}
+ )}
{price &&
{price}
}
{grundpreis &&
{grundpreis}
}