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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Give each variant a quantity ladder in the price spreadsheet
Damian Legawieccf551820f1c5
diff --git a/packages/dashboard-ui/src/spree/bulk-price-table.tsx b/packages/dashboard-ui/src/spree/bulk-price-table.tsxindex 89ab01d31b..9207874a60 100644--- a/packages/dashboard-ui/src/spree/bulk-price-table.tsx+++ b/packages/dashboard-ui/src/spree/bulk-price-table.tsx@@ -18,6 +18,10 @@ export interface BulkPriceRow {// user input or the API's canonical decimal. The table passes them through.amount?: string | nullcompareAt?: string | null+ // How many quantity breaks sit above this row's price. Renders the tier+ // button when the caller opted into the column+ // (docs/plans/6.0-volume-pricing.md).+ breakCount?: number}export interface BulkPriceTableLabels {@@ -55,6 +59,12 @@ export interface BulkPriceTableLabels {priceAriaTemplate?: string/** Aria-label template for the compare-at input. `{label}` is replaced with the variant label. */compareAtAriaTemplate?: string+ /** Column header over the quantity-break buttons. Omit to hide the column. */+ tiers?: string+ /** Label on a row's tier button. `{count}` is replaced with the break count. */+ tiersWithCount?: string+ /** Label on a row's tier button when the row carries no breaks yet. */+ tiersEmpty?: string}export interface BulkPriceTableProps {@@ -67,6 +77,12 @@ export interface BulkPriceTableProps {labels: BulkPriceTableLabels/** Called when the user commits a value to a cell. The id is the row id. */onChange: (rowId: string, field: 'amount' | 'compareAt', value: string | null) => void+ /**+ * Opens the row's quantity ladder. Supplying it (with `labels.tiers`) adds+ * the tier column; the panel itself is the caller's — the table only says+ * which row was asked for.+ */+ onOpenTiers?: (rowId: string) => void// Optional state for the toolbar + pagination footer. Omitting all of these// hides the toolbar/pagination entirely (use for in-memory single-page lists).@@ -91,6 +107,7 @@ export function BulkPriceTable({decimal,labels,onChange,+ onOpenTiers,search,onSearchChange,page,@@ -166,8 +183,37 @@ export function BulkPriceTable({)},},+ ...(onOpenTiers && labels.tiers+ ? [+ {+ id: 'tiers',+ header: () => <span className="block text-right">{labels.tiers}</span>,+ cell: ({ row }) => {+ const r = row.original+ if (r.kind !== 'item') return null+ const count = r.breakCount ?? 0+ return (+ <div className="flex justify-end pr-1">+ <Button+ type="button"+ size="sm"+ variant={count > 0 ? 'outline' : 'ghost'}+ className="h-7 px-2 text-xs"+ onClick={() => onOpenTiers(r.id)}+ >+ {count > 0+ ? (labels.tiersWithCount?.replace('{count}', String(count)) ??+ String(count))+ : (labels.tiersEmpty ?? '+')}+ </Button>+ </div>+ )+ },+ } satisfies ColumnDef<BulkPriceRow>,+ ]+ : []),],- [symbol, decimal, onChange, labels],+ [symbol, decimal, onChange, onOpenTiers, labels],)const showToolbar =diff --git a/packages/dashboard/src/components/spree/bulk-price-editor/bulk-price-editor.tsx b/packages/dashboard/src/components/spree/bulk-price-editor/bulk-price-editor.tsxindex e7b52eac2e..ed3728a300 100644--- a/packages/dashboard/src/components/spree/bulk-price-editor/bulk-price-editor.tsx+++ b/packages/dashboard/src/components/spree/bulk-price-editor/bulk-price-editor.tsx@@ -11,12 +11,15 @@ import { useCallback, useDeferredValue, useEffect, useMemo, useState } from 'reaimport { useTranslation } from 'react-i18next'import { useCurrencyLocale } from '../../../hooks/use-currency-locale'import { useBulkUpsertPrices } from '../../../hooks/use-prices'+import { MAXIMUM_QUANTITY_TIERS } from '../../../schemas/price-list'+import { VariantTierDialog } from './variant-tier-dialog'const PAGE_SIZE = 50interface PriceListRowFromServer {id: stringvariant_id: string+ min_quantity: numberamount: string | nullcompare_at_amount: string | nullvariant?: {@@ -42,6 +45,8 @@ interface CellEdit {interface BaselineRow extends BulkPriceRow {priceId?: stringvariantId?: string+ /** Shown in the tier dialog's title, so the merchant knows which row. */+ tierLabel?: string}type FilterShape = Record<string, string | number | boolean | string[] | null | undefined>@@ -148,6 +153,10 @@ export function BulkPriceEditor({...sanitizedFilter,...(priceListId ? { price_list_id_eq: priceListId } : { price_list_id_null: true }),currency_eq: currency,+ // One row per variant: the deeper rungs of a ladder are edited in+ // the tier dialog, not as extra lines that read like duplicates+ // (docs/plans/6.0-volume-pricing.md).+ min_quantity_eq: 1,// `search` is a Ransack-whitelisted scope on Price that ORs// across the variant's SKU, parent product name, and option-value// presentations ("Red", "XL", …). 3-char floor lives in the scope.@@ -163,6 +172,42 @@ export function BulkPriceEditor({const totalPages = data?.meta?.pages ?? 1const totalCount = data?.meta?.count ?? 0+ const pageVariantIds = useMemo(+ () =>+ ((data?.data ?? []) as unknown as PriceListRowFromServer[])+ .map((row) => row.variant_id)+ .filter(Boolean),+ [data],+ )++ // The rungs above the bottom one, for this page's variants only — one query+ // rather than one per row, and none at all when this editor has no list to+ // hold a ladder (docs/plans/6.0-volume-pricing.md).+ const { data: breakData } = useQuery({+ queryKey: useResourceKey('prices', {+ breaks: priceListId ?? null,+ currency,+ variants: pageVariantIds.join(','),+ }),+ queryFn: () =>+ adminClient.prices.list({+ variant_id_in: pageVariantIds,+ price_list_id_eq: priceListId,+ currency_eq: currency,+ min_quantity_gt: 1,+ limit: pageVariantIds.length * MAXIMUM_QUANTITY_TIERS,+ } as never),+ enabled: !!priceListId && pageVariantIds.length > 0,+ })++ const breakCounts = useMemo(() => {+ const counts = new Map<string, number>()+ for (const row of (breakData?.data ?? []) as unknown as PriceListRowFromServer[]) {+ counts.set(row.variant_id, (counts.get(row.variant_id) ?? 0) + 1)+ }+ return counts+ }, [breakData])+const baselineRows = useMemo<BaselineRow[]>(() => {if (!data) return []const out: BaselineRow[] = []@@ -183,15 +228,20 @@ export function BulkPriceEditor({priceId: row.id,variantId: row.variant_id,variantLabel: variant.options_text ?? null,+ tierLabel: [variant.product_name, variant.options_text].filter(Boolean).join(' — '),sku: variant.sku ?? null,amount: row.amount,compareAt: row.compare_at_amount,+ breakCount: breakCounts.get(row.variant_id) ?? 0,})}return out- }, [data])+ }, [data, breakCounts])const [edits, setEdits] = useState<Map<string, CellEdit>>(() => new Map())+ // Which row's ladder is open. Held by row id rather than variant id so the+ // dialog can name the product the merchant clicked.+ const [tierRowId, setTierRowId] = useState<string | null>(null)// Reset page + edits whenever the upstream filters change — a different// list, currency, or product scope is a different working set; carrying@@ -330,43 +380,77 @@ export function BulkPriceEditor({{ search },)+ const tierRow = tierRowId+ ? baselineRows.find((row) => row.kind === 'item' && row.id === tierRowId)+ : undefined+return (- <BulkPriceTable- rows={rows}- symbol={symbol}- decimal={decimal}- onChange={handleChange}- search={search}- onSearchChange={(next) => {- setSearch(next)- setPage(1)- }}- page={page}- totalPages={totalPages}- onPageChange={setPage}- isLoading={isLoading}- labels={{- variant: t('admin.pages.products.price_lists.edit_prices.columns.variant'),- sku: t('admin.pages.products.price_lists.edit_prices.columns.sku'),- price: t('admin.pages.products.price_lists.edit_prices.columns.price'),- compareAt: t('admin.pages.products.price_lists.edit_prices.columns.compare_at_price'),- variantDefault: t('admin.pages.products.price_lists.edit_prices.variant_default'),- searchPlaceholder: t('admin.pages.products.price_lists.edit_prices.search_placeholder'),- countSummary,- loading: t('admin.common.loading'),- pageOf: t('admin.common.page_of', { page: '{page}', total: '{total}' }),- prev: t('admin.common.prev'),- next: t('admin.common.next'),- emptyMessage,- emptySearchMessage,- gridAriaLabel: t('admin.pages.products.price_lists.edit_prices.grid_aria'),- priceAriaTemplate: t('admin.pages.products.price_lists.edit_prices.price_aria', {- label: '{label}',- }),- compareAtAriaTemplate: t('admin.pages.products.price_lists.edit_prices.compare_at_aria', {- label: '{label}',- }),- }}- />+ <>+ <BulkPriceTable+ rows={rows}+ symbol={symbol}+ decimal={decimal}+ onChange={handleChange}+ // Ladders live on a price list; base prices carry no breaks in v1, so+ // the column simply does not appear there.+ onOpenTiers={priceListId ? setTierRowId : undefined}+ search={search}+ onSearchChange={(next) => {+ setSearch(next)+ setPage(1)+ }}+ page={page}+ totalPages={totalPages}+ onPageChange={setPage}+ isLoading={isLoading}+ labels={{+ variant: t('admin.pages.products.price_lists.edit_prices.columns.variant'),+ sku: t('admin.pages.products.price_lists.edit_prices.columns.sku'),+ price: t('admin.pages.products.price_lists.edit_prices.columns.price'),+ compareAt: t('admin.pages.products.price_lists.edit_prices.columns.compare_at_price'),+ variantDefault: t('admin.pages.products.price_lists.edit_prices.variant_default'),+ searchPlaceholder: t('admin.pages.products.price_lists.edit_prices.search_placeholder'),+ countSummary,+ loading: t('admin.common.loading'),+ pageOf: t('admin.common.page_of', { page: '{page}', total: '{total}' }),+ prev: t('admin.common.prev'),+ next: t('admin.common.next'),+ emptyMessage,+ emptySearchMessage,+ gridAriaLabel: t('admin.pages.products.price_lists.edit_prices.grid_aria'),+ priceAriaTemplate: t('admin.pages.products.price_lists.edit_prices.price_aria', {+ label: '{label}',+ }),+ compareAtAriaTemplate: t('admin.pages.products.price_lists.edit_prices.compare_at_aria', {+ label: '{label}',+ }),+ tiers: priceListId+ ? t('admin.pages.products.price_lists.edit_prices.columns.tiers')+ : undefined,+ tiersWithCount: t('admin.pages.products.price_lists.tiers.count_badge', {+ count: '{count}' as never,+ }),+ tiersEmpty: t('admin.pages.products.price_lists.tiers.add_short'),+ }}+ />++ {priceListId && tierRow?.variantId && (+ <VariantTierDialog+ open+ onOpenChange={(next) => {+ if (!next) setTierRowId(null)+ }}+ variantId={tierRow.variantId}+ variantLabel={+ tierRow.tierLabel || t('admin.pages.products.price_lists.edit_prices.variant_default')+ }+ priceListId={priceListId}+ currency={currency}+ decimal={decimal}+ marketLocale={marketLocale}+ symbol={symbol}+ />+ )}+ </>)}diff --git a/packages/dashboard/src/components/spree/bulk-price-editor/variant-tier-dialog.tsx b/packages/dashboard/src/components/spree/bulk-price-editor/variant-tier-dialog.tsxnew file mode 100644index 0000000000..7b6d5ba82c--- /dev/null+++ b/packages/dashboard/src/components/spree/bulk-price-editor/variant-tier-dialog.tsx@@ -0,0 +1,230 @@+import type { PriceBulkUpsertRow } from '@spree/admin-sdk'+import { adminClient, normalizeMoneyInput, useResourceKey } from '@spree/dashboard-core'+import {+ Button,+ Dialog,+ DialogBody,+ DialogContent,+ DialogFooter,+ DialogHeader,+ DialogTitle,+ QuantityTierEditor,+ type QuantityTierRow,+ toastManager,+} from '@spree/dashboard-ui'+import { useQuery, useQueryClient } from '@tanstack/react-query'+import { useEffect, useId, useMemo, useState } from 'react'+import { useTranslation } from 'react-i18next'+import { useBulkUpsertPrices } from '../../../hooks/use-prices'+import { MAXIMUM_QUANTITY_TIERS } from '../../../schemas/price-list'++interface StoredRung {+ id: string+ min_quantity: number+ amount: string | null+}++interface DraftRung extends QuantityTierRow {+ /** The stored row this rung came from, absent for one the merchant added. */+ priceId?: string+}++export interface VariantTierDialogProps {+ open: boolean+ onOpenChange: (next: boolean) => void+ /** The variant whose ladder this is, as a prefixed id. */+ variantId: string+ /** Shown in the title so the merchant knows which row they opened. */+ variantLabel: string+ priceListId: string+ currency: string+ /** Decimal separator of the currency's market locale, for display. */+ decimal: string+ /** The locale amounts are normalized back through on save. */+ marketLocale: string+ symbol: string+}++/**+ * One variant's quantity ladder on one price list: the rungs it is charged at+ * as an order grows (docs/plans/6.0-volume-pricing.md).+ *+ * Opened from the price spreadsheet's tier column, and saved on its own+ * rather than with the grid — a ladder is a shape, not a cell, and half of+ * one is not a state worth persisting.+ */+export function VariantTierDialog({+ open,+ onOpenChange,+ variantId,+ variantLabel,+ priceListId,+ currency,+ decimal,+ marketLocale,+ symbol,+}: VariantTierDialogProps) {+ const { t } = useTranslation()+ const queryClient = useQueryClient()+ const rowIdPrefix = useId()+ const { mutateAsync: bulkUpsertAsync, isPending: isSaving } = useBulkUpsertPrices()+ const [draft, setDraft] = useState<DraftRung[]>([])+ const [nextLocalId, setNextLocalId] = useState(0)++ const queryKey = useResourceKey('prices', { ladder: variantId, priceListId, currency })+ const { data, isLoading } = useQuery({+ queryKey,+ queryFn: () =>+ adminClient.prices.list({+ variant_id_eq: variantId,+ price_list_id_eq: priceListId,+ currency_eq: currency,+ sort: 'min_quantity',+ limit: MAXIMUM_QUANTITY_TIERS + 1,+ } as never),+ enabled: open,+ })++ const stored = useMemo<StoredRung[]>(() => (data?.data ?? []) as unknown as StoredRung[], [data])++ // Seed from the server every time the dialog opens, so a ladder edited,+ // abandoned and reopened shows what is stored rather than the abandoned+ // draft.+ useEffect(() => {+ if (!open || isLoading) return++ setDraft(+ stored.map((rung) => ({+ id: `${rowIdPrefix}-stored-${rung.id}`,+ priceId: rung.id,+ minQuantity: String(rung.min_quantity),+ value: rung.amount ? rung.amount.replace('.', decimal) : '',+ // The bottom rung is the list's ordinary price for this variant. It+ // is edited in the grid behind this dialog; here it is only context+ // for the rungs above it.+ locked: rung.min_quantity === 1,+ })),+ )+ }, [open, isLoading, stored, decimal, rowIdPrefix])++ const toCanonical = (value: string) => {+ const normalized = normalizeMoneyInput(value, marketLocale || 'en')+ return normalized === '' ? null : normalized+ }++ const invalidRung = draft.find((rung) => {+ if (rung.locked) return false+ const quantity = Number(rung.minQuantity)+ return !Number.isInteger(quantity) || quantity < 2 || toCanonical(rung.value) === null+ })+ const duplicateQuantity =+ new Set(draft.map((rung) => rung.minQuantity.trim())).size !== draft.length++ async function handleSave() {+ const upserts: PriceBulkUpsertRow[] = draft+ .filter((rung) => !rung.locked)+ .map((rung) => ({+ variant_id: variantId,+ currency,+ price_list_id: priceListId,+ min_quantity: Number(rung.minQuantity),+ amount: toCanonical(rung.value),+ }))++ // A rung the merchant deleted is a stored row this draft no longer names.+ const keptIds = new Set(draft.map((rung) => rung.priceId).filter(Boolean))+ const removedIds = stored+ .filter((rung) => rung.min_quantity > 1 && !keptIds.has(rung.id))+ .map((rung) => rung.id)++ try {+ if (removedIds.length > 0) await adminClient.prices.bulkDestroy({ ids: removedIds })+ if (upserts.length > 0) await bulkUpsertAsync({ prices: upserts })++ await queryClient.invalidateQueries({ queryKey: ['prices'] })+ toastManager.add({+ type: 'success',+ title: t('admin.pages.products.price_lists.tiers.save_success', { count: upserts.length }),+ })+ onOpenChange(false)+ } catch (error) {+ toastManager.add({+ type: 'error',+ title:+ error instanceof Error+ ? error.message+ : t('admin.pages.products.price_lists.tiers.save_failed'),+ })+ }+ }++ const tierCount = draft.filter((rung) => !rung.locked).length++ return (+ <Dialog open={open} onOpenChange={onOpenChange} modal>+ <DialogContent className="sm:max-w-lg">+ <DialogHeader>+ <DialogTitle>+ {t('admin.pages.products.price_lists.tiers.title', { variant: variantLabel })}+ </DialogTitle>+ </DialogHeader>+ <DialogBody>+ {isLoading ? (+ <p className="text-sm text-muted-foreground">{t('admin.common.loading')}</p>+ ) : (+ <QuantityTierEditor+ rows={draft}+ labels={{+ quantity: t('admin.pages.products.price_lists.tiers.quantity'),+ value: t('admin.pages.products.price_lists.tiers.unit_price'),+ add: t('admin.pages.products.price_lists.tiers.add'),+ remove: t('admin.pages.products.price_lists.tiers.remove'),+ empty: t('admin.pages.products.price_lists.tiers.empty'),+ hint: t('admin.pages.products.price_lists.tiers.help'),+ }}+ valueAddon={symbol}+ canAdd={tierCount < MAXIMUM_QUANTITY_TIERS}+ disabled={isSaving}+ error={+ duplicateQuantity+ ? t('admin.pages.products.price_lists.tiers.duplicate_quantity')+ : invalidRung+ ? t('admin.pages.products.price_lists.tiers.invalid_rung')+ : undefined+ }+ onChange={(id, field, next) =>+ setDraft((prev) =>+ prev.map((rung) =>+ rung.id === id+ ? { ...rung, [field === 'minQuantity' ? 'minQuantity' : 'value']: next }+ : rung,+ ),+ )+ }+ onAdd={() => {+ setDraft((prev) => [+ ...prev,+ { id: `${rowIdPrefix}-new-${nextLocalId}`, minQuantity: '', value: '' },+ ])+ setNextLocalId((previous) => previous + 1)+ }}+ onRemove={(id) => setDraft((prev) => prev.filter((rung) => rung.id !== id))}+ />+ )}+ </DialogBody>+ <DialogFooter>+ <Button type="button" variant="outline" onClick={() => onOpenChange(false)}>+ {t('admin.common.cancel')}+ </Button>+ <Button+ type="button"+ onClick={handleSave}+ disabled={isSaving || isLoading || !!invalidRung || duplicateQuantity}+ >+ {t('admin.common.save')}+ </Button>+ </DialogFooter>+ </DialogContent>+ </Dialog>+ )+}diff --git a/packages/dashboard/src/locales/ar.json b/packages/dashboard/src/locales/ar.jsonindex ffa2d06f90..1f65561aae 100644--- a/packages/dashboard/src/locales/ar.json+++ b/packages/dashboard/src/locales/ar.json@@ -3347,6 +3347,7 @@"price": "سعر","product": "منتج","sku": "SKU",+ "tiers": "المستويات","variant": "البديل"},"compare_at_aria": "Compare-at price لـ {{label}}",@@ -3422,6 +3423,23 @@"sheet_title_create": "إنشاء قائمة الأسعار","sheet_title_edit": "تعديل قائمة الأسعار","subtitle": "تسعير مستهدف لمجموعات العملاء أو المناطق أو شرائح الحجم.",+ "tiers": {+ "add": "إضافة مستوى كمية",+ "add_short": "إضافة",+ "count_badge": "{{count}} مستويات",+ "count_badge_one": "مستوى {{count}}",+ "duplicate_quantity": "لا يمكن أن يبدأ مستويان من الكمية نفسها.",+ "empty": "لا توجد مستويات — يُحتسب هذا المتغير بسعر واحد مهما كان حجم الطلب.",+ "help": "من كل كمية فصاعدًا يُحتسب السطر بسعر الوحدة هذا. المتغير الذي له مستويات يُسعَّر بها وحدها — ولا تنطبق عليه نسبة القائمة.",+ "invalid_rung": "كل مستوى يحتاج كمية أكبر من 1 وسعر وحدة.",+ "quantity": "من الكمية",+ "remove": "إزالة المستوى من {quantity}",+ "save_failed": "تعذّر حفظ مستويات الكمية.",+ "save_success_one": "تم حفظ مستوى كمية واحد.",+ "save_success_other": "تم حفظ {{count}} مستويات كمية.",+ "title": "مستويات الكمية — {{variant}}",+ "unit_price": "سعر الوحدة"+ },"title": "Price Lists","unschedule": "إلغاء الجدول الزمني","unschedule_confirm": {diff --git a/packages/dashboard/src/locales/de.json b/packages/dashboard/src/locales/de.jsonindex 4a8daa370e..28ec2cbf1a 100644--- a/packages/dashboard/src/locales/de.json+++ b/packages/dashboard/src/locales/de.json@@ -3330,6 +3330,7 @@"price": "Preis","product": "Produkt","sku": "SKU",+ "tiers": "Staffeln","variant": "Variante"},"compare_at_aria": "Vergleichspreis für {{label}}",@@ -3405,6 +3406,23 @@"sheet_title_create": "Preisliste erstellen","sheet_title_edit": "Preisliste bearbeiten","subtitle": "Gezielte Preisgestaltung für Kundengruppen, Regionen oder Mengenstaffeln.",+ "tiers": {+ "add": "Mengenstaffel hinzufügen",+ "add_short": "Hinzufügen",+ "count_badge": "{{count}} Staffeln",+ "count_badge_one": "{{count}} Staffel",+ "duplicate_quantity": "Zwei Staffeln können nicht bei derselben Menge beginnen.",+ "empty": "Keine Staffeln — diese Variante kostet unabhängig von der Bestellmenge dasselbe.",+ "help": "Ab der jeweiligen Menge gilt dieser Stückpreis. Eine Variante mit Staffeln wird ausschließlich danach berechnet — der Prozentsatz der Liste gilt für sie nicht.",+ "invalid_rung": "Jede Staffel braucht eine Menge über 1 und einen Stückpreis.",+ "quantity": "Ab Menge",+ "remove": "Staffel ab {quantity} entfernen",+ "save_failed": "Die Mengenstaffeln konnten nicht gespeichert werden.",+ "save_success_one": "{{count}} Mengenstaffel gespeichert.",+ "save_success_other": "{{count}} Mengenstaffeln gespeichert.",+ "title": "Mengenstaffeln — {{variant}}",+ "unit_price": "Stückpreis"+ },"title": "Preislisten","unschedule": "Planung aufheben","unschedule_confirm": {diff --git a/packages/dashboard/src/locales/en.json b/packages/dashboard/src/locales/en.jsonindex 58d4b631ec..e6bc3aa8c2 100644--- a/packages/dashboard/src/locales/en.json+++ b/packages/dashboard/src/locales/en.json@@ -3330,6 +3330,7 @@"price": "Price","product": "Product","sku": "SKU",+ "tiers": "Tiers","variant": "Variant"},"compare_at_aria": "Compare-at price for {{label}}",@@ -3405,6 +3406,23 @@"sheet_title_create": "Create price list","sheet_title_edit": "Edit price list","subtitle": "Targeted pricing for customer groups, regions, or volume tiers.",+ "tiers": {+ "add": "Add quantity break",+ "add_short": "Add",+ "count_badge": "{{count}} tiers",+ "count_badge_one": "{{count}} tier",+ "duplicate_quantity": "Two breaks cannot start at the same quantity.",+ "empty": "No breaks — this variant is charged one price whatever the order size.",+ "help": "From each quantity up, a line is charged this unit price. A variant with breaks is priced by them alone — the list’s percentage does not apply to it.",+ "invalid_rung": "Each break needs a quantity above 1 and a unit price.",+ "quantity": "From quantity",+ "remove": "Remove the break from {quantity}",+ "save_failed": "Could not save the quantity breaks.",+ "save_success_one": "Saved {{count}} quantity break.",+ "save_success_other": "Saved {{count}} quantity breaks.",+ "title": "Quantity breaks — {{variant}}",+ "unit_price": "Unit price"+ },"title": "Price Lists","unschedule": "Unschedule","unschedule_confirm": {diff --git a/packages/dashboard/src/locales/fr.json b/packages/dashboard/src/locales/fr.jsonindex 6bde8ff29c..6cec13e139 100644--- a/packages/dashboard/src/locales/fr.json+++ b/packages/dashboard/src/locales/fr.json@@ -3330,6 +3330,7 @@"price": "Prix","product": "Produit","sku": "SKU",+ "tiers": "Paliers","variant": "Variante"},"compare_at_aria": "Prix de comparaison pour {{label}}",@@ -3405,6 +3406,23 @@"sheet_title_create": "Créer une liste de prix","sheet_title_edit": "Modifier la liste de prix","subtitle": "Tarification ciblée pour des groupes de clients, des régions ou des paliers de volume.",+ "tiers": {+ "add": "Ajouter un palier de quantité",+ "add_short": "Ajouter",+ "count_badge": "{{count}} paliers",+ "count_badge_one": "{{count}} palier",+ "duplicate_quantity": "Deux paliers ne peuvent pas commencer à la même quantité.",+ "empty": "Aucun palier — cette déclinaison est facturée au même prix quelle que soit la quantité.",+ "help": "À partir de chaque quantité, la ligne est facturée à ce prix unitaire. Une déclinaison à paliers est facturée uniquement ainsi — le pourcentage de la liste ne s’y applique pas.",+ "invalid_rung": "Chaque palier a besoin d’une quantité supérieure à 1 et d’un prix unitaire.",+ "quantity": "À partir de",+ "remove": "Supprimer le palier à partir de {quantity}",+ "save_failed": "Impossible d’enregistrer les paliers de quantité.",+ "save_success_one": "{{count}} palier de quantité enregistré.",+ "save_success_other": "{{count}} paliers de quantité enregistrés.",+ "title": "Paliers de quantité — {{variant}}",+ "unit_price": "Prix unitaire"+ },"title": "Listes de prix","unschedule": "Déplanifier","unschedule_confirm": {diff --git a/packages/dashboard/src/locales/pl.json b/packages/dashboard/src/locales/pl.jsonindex 5fea943751..e4c95c3d6e 100644--- a/packages/dashboard/src/locales/pl.json+++ b/packages/dashboard/src/locales/pl.json@@ -3358,6 +3358,7 @@"price": "Cena","product": "Produkt","sku": "SKU",+ "tiers": "Progi","variant": "Wariant"},"compare_at_aria": "Cena porównawcza dla {{label}}",@@ -3441,6 +3442,23 @@"sheet_title_create": "Utwórz cennik","sheet_title_edit": "Edytuj cennik","subtitle": "Ceny ukierunkowane na grupy klientów, regiony lub progi ilościowe.",+ "tiers": {+ "add": "Dodaj próg ilościowy",+ "add_short": "Dodaj",+ "count_badge": "progi: {{count}}",+ "count_badge_one": "próg: {{count}}",+ "duplicate_quantity": "Dwa progi nie mogą zaczynać się od tej samej ilości.",+ "empty": "Brak progów — ten wariant kosztuje tyle samo niezależnie od wielkości zamówienia.",+ "help": "Od danej ilości w górę linia jest liczona po tej cenie jednostkowej. Wariant z progami jest wyceniany wyłącznie przez nie — procent listy go nie dotyczy.",+ "invalid_rung": "Każdy próg potrzebuje ilości powyżej 1 i ceny jednostkowej.",+ "quantity": "Od ilości",+ "remove": "Usuń próg od {quantity}",+ "save_failed": "Nie udało się zapisać progów ilościowych.",+ "save_success_one": "Zapisano {{count}} próg ilościowy.",+ "save_success_other": "Zapisano progi ilościowe: {{count}}.",+ "title": "Progi ilościowe — {{variant}}",+ "unit_price": "Cena jednostkowa"+ },"title": "Cenniki","unschedule": "Anuluj harmonogram","unschedule_confirm": {diff --git a/packages/dashboard/src/locales/zh-CN.json b/packages/dashboard/src/locales/zh-CN.jsonindex affc6c1841..85583fa812 100644--- a/packages/dashboard/src/locales/zh-CN.json+++ b/packages/dashboard/src/locales/zh-CN.json@@ -3322,6 +3322,7 @@"price": "价格","product": "商品","sku": "SKU",+ "tiers": "阶梯","variant": "变体"},"compare_at_aria": "{{label}} 的对比价",@@ -3397,6 +3398,23 @@"sheet_title_create": "创建价格表","sheet_title_edit": "编辑价格表","subtitle": "针对客户群体、地区或批量层级的定向定价。",+ "tiers": {+ "add": "添加数量阶梯",+ "add_short": "添加",+ "count_badge": "{{count}} 档",+ "count_badge_one": "{{count}} 档",+ "duplicate_quantity": "两档不能从同一数量开始。",+ "empty": "暂无阶梯——无论订购多少,此变体都按同一价格计费。",+ "help": "达到各档数量后,该行按此单价计费。设有阶梯的变体只按阶梯定价,列表的百分比对它不适用。",+ "invalid_rung": "每一档都需要大于 1 的数量和单价。",+ "quantity": "起订量",+ "remove": "删除 {quantity} 起的阶梯",+ "save_failed": "无法保存数量阶梯。",+ "save_success_one": "已保存 {{count}} 个数量阶梯。",+ "save_success_other": "已保存 {{count}} 个数量阶梯。",+ "title": "数量阶梯 — {{variant}}",+ "unit_price": "单价"+ },"title": "价格表","unschedule": "取消安排","unschedule_confirm": {