Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Show a laddered variant as a ladder on the agreement page

Damian Legawiec508b1d4d1b59
diff --git a/packages/dashboard/src/components/spree/catalog-price-columns.tsx b/packages/dashboard/src/components/spree/catalog-price-columns.tsx
index 92add2e079..e3caaeec08 100644
--- a/packages/dashboard/src/components/spree/catalog-price-columns.tsx
+++ b/packages/dashboard/src/components/spree/catalog-price-columns.tsx
@@ -53,7 +53,18 @@ export function catalogPriceColumns({
<>
<TableCell className="text-right tabular-nums">
{price ? (
- price.display_amount
+ <span className="inline-flex items-center justify-end gap-1.5">
+ {price.display_amount}
+ {/* What the agreement charges for one unit, with the tiers
+ above it counted rather than hidden — a single figure on a
+ laddered variant reads as the only price there is
+ (docs/plans/6.0-volume-pricing.md). */}
+ {price.break_count > 0 && (
+ <Badge variant="outline" className="font-normal">
+ {i18n.t('admin.catalogs.prices.tier_count', { count: price.break_count })}
+ </Badge>
+ )}
+ </span>
) : (
<span className="text-muted-foreground">
{row.pending === 'added'
diff --git a/packages/dashboard/src/locales/ar.json b/packages/dashboard/src/locales/ar.json
index 1f65561aae..709887951e 100644
--- a/packages/dashboard/src/locales/ar.json
+++ b/packages/dashboard/src/locales/ar.json
@@ -147,10 +147,9 @@
"updated": "تم تحديث الكتالوج"
},
"prices": {
+ "after_save": "بعد الحفظ",
"column_price": "السعر",
"column_source": "المصدر",
- "unpriced": "لا يوجد سعر",
- "after_save": "بعد الحفظ",
"source": {
"explicit": "مُدخَل",
"automatic": "مُعدَّل",
@@ -160,7 +159,10 @@
"explicit": "مبلغ مُدخَل في قائمة أسعار هذا الكتالوج.",
"automatic": "سعر المتجر مع تطبيق نسبة هذا الكتالوج.",
"base": "سعر المتجر العادي — هذا الكتالوج لا يحدد سعرًا لهذا المنتج."
- }
+ },
+ "tier_count_one": "+{{count}} مستوى",
+ "tier_count_other": "+{{count}} مستويات",
+ "unpriced": "لا يوجد سعر"
},
"products": {
"add_cta": "إضافة منتجات",
diff --git a/packages/dashboard/src/locales/de.json b/packages/dashboard/src/locales/de.json
index 28ec2cbf1a..bb649568e6 100644
--- a/packages/dashboard/src/locales/de.json
+++ b/packages/dashboard/src/locales/de.json
@@ -147,10 +147,9 @@
"updated": "Katalog aktualisiert"
},
"prices": {
+ "after_save": "Nach dem Speichern",
"column_price": "Preis",
"column_source": "Von",
- "unpriced": "Kein Preis",
- "after_save": "Nach dem Speichern",
"source": {
"explicit": "Eingegeben",
"automatic": "Angepasst",
@@ -160,7 +159,10 @@
"explicit": "Ein Betrag, der in der eigenen Preisliste dieses Katalogs eingegeben wurde.",
"automatic": "Der Ladenpreis mit dem Prozentsatz dieses Katalogs.",
"base": "Der normale Ladenpreis — dieser Katalog setzt für dieses Produkt keinen Preis."
- }
+ },
+ "tier_count_one": "+{{count}} Stufe",
+ "tier_count_other": "+{{count}} Stufen",
+ "unpriced": "Kein Preis"
},
"products": {
"add_cta": "Produkte hinzufügen",
diff --git a/packages/dashboard/src/locales/en.json b/packages/dashboard/src/locales/en.json
index e6bc3aa8c2..ef659259e6 100644
--- a/packages/dashboard/src/locales/en.json
+++ b/packages/dashboard/src/locales/en.json
@@ -147,10 +147,9 @@
"updated": "Catalog updated"
},
"prices": {
+ "after_save": "After save",
"column_price": "Price",
"column_source": "From",
- "unpriced": "No price",
- "after_save": "After save",
"source": {
"explicit": "Entered",
"automatic": "Adjusted",
@@ -160,7 +159,10 @@
"explicit": "An amount entered on this catalog’s own price list.",
"automatic": "The shop price with this catalog’s percentage applied.",
"base": "The normal shop price — this catalog does not price this product."
- }
+ },
+ "tier_count_one": "+{{count}} tier",
+ "tier_count_other": "+{{count}} tiers",
+ "unpriced": "No price"
},
"products": {
"add_cta": "Add products",
diff --git a/packages/dashboard/src/locales/fr.json b/packages/dashboard/src/locales/fr.json
index 6cec13e139..d9343c1bf5 100644
--- a/packages/dashboard/src/locales/fr.json
+++ b/packages/dashboard/src/locales/fr.json
@@ -147,10 +147,9 @@
"updated": "Catalogue mis à jour"
},
"prices": {
+ "after_save": "Après enregistrement",
"column_price": "Prix",
"column_source": "Source",
- "unpriced": "Aucun prix",
- "after_save": "Après enregistrement",
"source": {
"explicit": "Saisi",
"automatic": "Ajusté",
@@ -160,7 +159,10 @@
"explicit": "Un montant saisi dans la liste de prix propre à ce catalogue.",
"automatic": "Le prix boutique avec le pourcentage de ce catalogue.",
"base": "Le prix boutique normal — ce catalogue ne fixe pas de prix pour ce produit."
- }
+ },
+ "tier_count_one": "+{{count}} palier",
+ "tier_count_other": "+{{count}} paliers",
+ "unpriced": "Aucun prix"
},
"products": {
"add_cta": "Ajouter des produits",
diff --git a/packages/dashboard/src/locales/pl.json b/packages/dashboard/src/locales/pl.json
index e4c95c3d6e..6a596bd837 100644
--- a/packages/dashboard/src/locales/pl.json
+++ b/packages/dashboard/src/locales/pl.json
@@ -149,10 +149,9 @@
"updated": "Katalog zaktualizowany"
},
"prices": {
+ "after_save": "Po zapisaniu",
"column_price": "Cena",
"column_source": "Źródło",
- "unpriced": "Brak ceny",
- "after_save": "Po zapisaniu",
"source": {
"explicit": "Wprowadzona",
"automatic": "Skorygowana",
@@ -162,7 +161,10 @@
"explicit": "Kwota wprowadzona na własnej liście cen tego katalogu.",
"automatic": "Cena sklepowa z zastosowanym procentem tego katalogu.",
"base": "Zwykła cena sklepowa — ten katalog nie ustala ceny tego produktu."
- }
+ },
+ "tier_count_one": "+{{count}} próg",
+ "tier_count_other": "+{{count}} progi",
+ "unpriced": "Brak ceny"
},
"products": {
"add_cta": "Dodaj produkty",
diff --git a/packages/dashboard/src/locales/zh-CN.json b/packages/dashboard/src/locales/zh-CN.json
index 85583fa812..027a05069d 100644
--- a/packages/dashboard/src/locales/zh-CN.json
+++ b/packages/dashboard/src/locales/zh-CN.json
@@ -147,10 +147,9 @@
"updated": "目录已更新"
},
"prices": {
+ "after_save": "保存后",
"column_price": "价格",
"column_source": "来源",
- "unpriced": "无价格",
- "after_save": "保存后",
"source": {
"explicit": "已录入",
"automatic": "已调整",
@@ -160,7 +159,10 @@
"explicit": "在本目录自有价格表中录入的金额。",
"automatic": "店铺价应用本目录百分比后的结果。",
"base": "普通店铺价 — 本目录未为该商品定价。"
- }
+ },
+ "tier_count_one": "+{{count}} 档",
+ "tier_count_other": "+{{count}} 档",
+ "unpriced": "无价格"
},
"products": {
"add_cta": "添加产品",